mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 17:57:28 -05:00
Add back to top button
This commit is contained in:
@ -4,6 +4,8 @@
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body>
|
||||
<a id="top"></a>
|
||||
|
||||
<div class="top">
|
||||
{{ partial "top.html" . }}
|
||||
</div>
|
||||
@ -13,9 +15,9 @@
|
||||
{{ end }}
|
||||
|
||||
<div class="content">
|
||||
{{ block "main" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ block "main" . }}
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ with .Site.Copyright }}
|
||||
@ -26,6 +28,10 @@
|
||||
</small>
|
||||
</footer>
|
||||
{{ end }}
|
||||
|
||||
<a id="back-to-top" href="#top">
|
||||
{{ partial "icon.html" "chevron-up" }}
|
||||
</a>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -12,6 +12,9 @@
|
||||
{{ with resources.Get "css/syntax-light.css" | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ with resources.Get "js/back-to-top.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.faviconICO }}
|
||||
<link rel="icon" type="image/x-icon" href="{{ . | absURL }}" />
|
||||
|
Reference in New Issue
Block a user