tagliatelle

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit a22eaca52f1d141a3d545e139e5a40e7a8a280a4
parent c35f2210f71be213123e41a4ce9368ef5bc2aa32
Author: Peter <peter@minskio.co.uk>
Date:   Wed, 14 Oct 2026 15:26:52 +0100

Add back to top button on notes page

Diffstat:
Mstatic/style.css | 3+++
Mtemplates/_header.html | 2+-
Mtemplates/notes.html | 4++++
3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/static/style.css b/static/style.css @@ -178,6 +178,9 @@ img.file-content-image {max-width:400px} select:focus{outline:none;border-color:#2563eb} select{padding:8px 12px;border:1px solid #d1d5db;border-radius:4px;font-size:14px;cursor:pointer} textarea{flex:1;padding:20px;border:none;font-family:'Monaco','Menlo','Consolas',monospace;font-size:13px;line-height:1.6;resize:none} +.back-to-top {position: fixed; right: 24px; bottom: 24px; z-index: 1000; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: #ffffff; background: #2563eb; border-radius: 50%; text-decoration: none;} +.back-to-top:hover {background: #1d4ed8;} +.back-to-top:focus-visible {outline: 3px solid #93c5fd; outline-offset: 4px;} /* admin 50:50 splits */ div.config-container {display: flex} diff --git a/templates/_header.html b/templates/_header.html @@ -11,7 +11,7 @@ div.gallery-item, div.gallery img, div.gallery-item a{ max-width: var(--gallery-size); max-height: var(--gallery-size); } </style> </head> -<body> +<body id="top"> <nav> <ul> <li><a href="/"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="#000000" d="M4.5 3A2.5 2.5 0 0 0 2 5.5v9A2.5 2.5 0 0 0 4.5 17h11a2.5 2.5 0 0 0 2.5-2.5v-7A2.5 2.5 0 0 0 15.5 5H9.707L8.22 3.513A1.75 1.75 0 0 0 6.982 3H4.5ZM3 5.5A1.5 1.5 0 0 1 4.5 4h2.482a.75.75 0 0 1 .53.22l1.28 1.28L7.44 6.854A.5.5 0 0 1 7.086 7H3V5.5ZM3 8h4.086a1.5 1.5 0 0 0 1.06-.44L9.707 6H15.5A1.5 1.5 0 0 1 17 7.5v7a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 3 14.5V8Z"/></svg><span>Browse</span></a></li> diff --git a/templates/notes.html b/templates/notes.html @@ -102,6 +102,10 @@ ideas > interesting concept">{{.Data.Content}}</textarea> </div> + <a href="#top" class="back-to-top" title="Return to top"> + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m18 15-6-6-6 6"/></svg> + </a> + <script src="/static/notes.js" defer></script> <script src="/static/common.js" defer></script> {{template "_footer"}}