Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jesselau76/hugo-w3-simple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/post/single.html')
-rw-r--r--layouts/post/single.html46
1 files changed, 1 insertions, 45 deletions
diff --git a/layouts/post/single.html b/layouts/post/single.html
index 53c1808..fd29ef9 100644
--- a/layouts/post/single.html
+++ b/layouts/post/single.html
@@ -15,51 +15,7 @@
</div>
{{ end }}
- <!-- Back to top -->
- {{ if .Site.Params.backtotop }}
- <div id="backtotop" class="w3-hide-small w3-hide-medium">
-
- <button onclick="topFunction()" class="w3-btn w3-red w3-large" style="width:160px">{{ T "backtotop"}}
- &rarr;</button>
-
- </div>
-
- <script>
- function topFunction() {
- document.body.scrollTop = 0;
- document.documentElement.scrollTop = 0;
- }
- </script>
-
-
- {{ end }}
-<script>
-// When the user scrolls down 50px from the top of the document, show the button
-window.onscroll = function() {scrollFunction()};
-
-function scrollFunction() {
- <!-- TOC -->
- {{ if and (ge (len .TableOfContents) 100) (ne .Params.toc "false") }}
-
- if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
- document.getElementById("toc").style.display = "block";
- } else {
- document.getElementById("toc").style.display = "none";
- }
- {{ end }}
-<!-- Back to top -->
- {{ if .Site.Params.backtotop }}
- if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
- document.getElementById("backtotop").style.display = "block";
- } else {
- document.getElementById("backtotop").style.display = "none";
- }
- {{ end }}
-}
-
-
-</script>
-
+