Skip to content

Commit

Permalink
1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nonlinear committed Mar 12, 2021
1 parent d6233c7 commit 7c3ecc1
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions layouts/_default/play.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Site.Title }}</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .Site.Title }}</title>
<style>
{{ if in .Params.features "no-scroll" }}
html {
{{ if in .Params.features "no-scroll" }}
html {
height : 100%;
overflow: hidden;
position: relative;
Expand All @@ -18,9 +18,9 @@
overflow: hidden;
}

{{ end }}
{{ if in .Params.features "no-text-select" }}
* {
{{ end }}
{{ if in .Params.features "no-text-select" }}
* {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
Expand All @@ -29,12 +29,12 @@
user-select: none; /* Non-prefixed version, currently
supported by Chrome, Edge, Opera and Firefox */
}
{{ end }}
{{ end }}
</style>
</head>
<body>
{{ .Content }}
{{ if in .Params.features "jquery" }}

{{ if in .Params.features "jquery" }}
{{ $jquery := resources.Get "js/jquery.min.js" }}
<script src="{{ $jquery.Permalink }}"></script>
{{ end }}
Expand All @@ -44,30 +44,31 @@
{{ $detectizr := resources.Get "js/detectizr.js" }}
<script src="{{ $detectizr.Permalink }}"></script>
{{ end }}
{{ if in .Params.features "p5js" }}
{{ if in .Params.features "p5js" }}
{{ $p5js := resources.Get "js/p5.min.js" }}
<script src="{{ $p5js.Permalink }}"></script>
{{ end }}
{{ if in .Params.features "ml5js" }}
{{ $ml5js := resources.Get "js/ml5.min.js" }}
<script src="{{ $ml5js.Permalink }}"></script>
{{ if in .Params.features "ml5js" }}
<script src="https://unpkg.com/ml5@latest/dist/ml5.min.js"></script>
{{ end }}



<script>
{{ if in .Params.features "no-zoom" }}
{{ if in .Params.features "no-zoom" }}
document.addEventListener('gesturestart', function (e) {
e.preventDefault();
});
{{ end }}
{{ if in .Params.features "smooth-scroll" }}
$('a').click(function(){
{{ end }}
{{ if in .Params.features "smooth-scroll" }}
$('a').click(function(){
$('html, body').animate({
scrollTop: $( $(this).attr('href') ).offset().top
}, 500);
return false;
});
{{ end }}
{{ end }}
</script>
{{ .Content }}
</body>
</html>

0 comments on commit 7c3ecc1

Please sign in to comment.