From 80f6abcbaa5764e0c44be9908a4c9b25e22845ec Mon Sep 17 00:00:00 2001 From: luxick Date: Mon, 4 May 2026 10:10:20 +0200 Subject: [PATCH] Move actions into floatin action button --- assets/page.html | 33 ++++++++++++++++----------------- assets/style.css | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 18 deletions(-) diff --git a/assets/page.html b/assets/page.html index 8180436..e628f45 100644 --- a/assets/page.html +++ b/assets/page.html @@ -1,21 +1,5 @@ {{define "headScripts"}}{{end}} -{{define "headerActions"}} -{{if .CanEdit}} - -{{end}} -{{end}} - {{define "content"}} {{if .Content}}
{{.Content}}
@@ -49,4 +33,19 @@ {{end}} {{end}} -{{define "extras"}}{{if .SidebarWidget}}{{.SidebarWidget}}{{end}}{{end}} +{{define "extras"}} +{{if .SidebarWidget}}{{.SidebarWidget}}{{end}} +{{if .CanEdit}} + +{{end}} +{{end}} diff --git a/assets/style.css b/assets/style.css index e46780b..1b324a7 100644 --- a/assets/style.css +++ b/assets/style.css @@ -323,10 +323,44 @@ main { right: 0; } +.dropdown-menu.open-up { + top: auto; + bottom: 100%; + margin-bottom: 0.4rem; +} + .dropdown-menu.is-open { display: block; } +/* === Floating action button === */ +.fab { + position: fixed; + bottom: 1rem; + right: 1rem; + z-index: 50; +} + +.btn-fab { + background: var(--bg-panel); + border: 1px solid var(--secondary); + width: 3rem; + height: 3rem; + font-size: 1.5rem; + line-height: 1; + display: inline-flex; + align-items: center; + justify-content: center; +} +.btn-fab::before, +.btn-fab::after { + content: none; +} +.btn-fab:hover { + background: var(--bg-panel-hover); + color: var(--primary-hover); +} + .dropdown-item { display: block; width: 100%; @@ -459,7 +493,7 @@ hr { top: 1rem; right: 1rem; width: 14rem; - max-height: calc(100vh - 2rem); + max-height: calc(100vh - 6rem); overflow-y: auto; border: 1px solid var(--secondary); background: var(--bg);