Some checks failed
Build and Release / Integration Tests (PostgreSQL) (push) Successful in 5m23s
Build and Release / Create Release (push) Successful in 0s
Build and Release / Lint (push) Successful in 6m8s
Build and Release / Unit Tests (push) Successful in 6m12s
Build and Release / Build Binaries (amd64, linux, linux-latest) (push) Successful in 3m37s
Build and Release / Build Binaries (amd64, windows, windows-latest) (push) Successful in 9h5m0s
Build and Release / Build Binaries (amd64, darwin, macos) (push) Failing after 1s
Build and Release / Build Binaries (arm64, darwin, macos) (push) Failing after 0s
Build and Release / Build Binary (linux/arm64) (push) Failing after 13m52s
Add reading progress bar, table of contents sidebar, and back-to-top button for blog post detail pages. TOC auto-generates from h1-h4 headings with smooth scroll navigation and active section highlighting. Sidebar expands on hover from left edge. Add lightbox for gallery images with keyboard navigation (arrows, escape) and captions. Back-to-top button appears after 400px scroll on all pages. All features use inline styles for portability and minimal CSS conflicts.
29 lines
1.4 KiB
Handlebars
29 lines
1.4 KiB
Handlebars
{{if false}}
|
|
{{/* to make html structure "likely" complete to prevent IDE warnings */}}
|
|
<html>
|
|
<body>
|
|
<div>
|
|
{{end}}
|
|
|
|
{{template "custom/body_inner_post" .}}
|
|
</div>
|
|
{{template "custom/body_outer_post" .}}
|
|
{{template "base/footer_content" .}}
|
|
{{template "custom/footer" .}}
|
|
<button id="back-to-top" style="position:fixed; bottom:32px; right:32px; z-index:9997; width:44px; height:44px; border-radius:50%; border:none; background:var(--color-secondary-bg, rgba(0,0,0,0.65)); color:var(--color-secondary-text, #fff); font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; opacity:0; pointer-events:none; transition:opacity 0.3s, transform 0.3s; transform:translateY(12px); box-shadow:0 2px 12px rgba(0,0,0,0.18);" aria-label="Back to top">
|
|
<svg width="18" height="18" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M8 13V3"/><path d="M3 7l5-5 5 5"/></svg>
|
|
</button>
|
|
<script>
|
|
(function(){
|
|
var b=document.getElementById('back-to-top');
|
|
if(!b)return;
|
|
window.addEventListener('scroll',function(){
|
|
if(window.scrollY>400){b.style.opacity='1';b.style.pointerEvents='auto';b.style.transform='translateY(0)';}
|
|
else{b.style.opacity='0';b.style.pointerEvents='none';b.style.transform='translateY(12px)';}
|
|
});
|
|
b.addEventListener('click',function(){window.scrollTo({top:0,behavior:'smooth'});});
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|