From ab22952e3d7bc1bea364447a48f7acb073d23d46 Mon Sep 17 00:00:00 2001 From: luxick Date: Mon, 13 Apr 2026 13:50:23 +0200 Subject: [PATCH] Unify button CSS --- assets/page.html | 32 ++++++++++----------- assets/style.css | 75 ++++-------------------------------------------- 2 files changed, 22 insertions(+), 85 deletions(-) diff --git a/assets/page.html b/assets/page.html index 541e09a..fefaa84 100644 --- a/assets/page.html +++ b/assets/page.html @@ -16,32 +16,32 @@ >{{.Name}}{{end}} {{if .EditMode}} - CANCEL - + CANCEL + {{else if .CanEdit}} - - EDIT + + EDIT {{end}}
{{if .EditMode}}
- - + + - - - + + + - - + + - - - - - + + + + +
diff --git a/assets/style.css b/assets/style.css index bc3e427..2607fa6 100644 --- a/assets/style.css +++ b/assets/style.css @@ -82,7 +82,7 @@ header { color: #060; } -.edit-btn { +.btn { background: none; border: none; color: #ffb300; @@ -90,34 +90,17 @@ header { cursor: pointer; padding: 0; text-decoration: none; + display: inline-block; white-space: nowrap; + text-shadow: inherit; } -.edit-btn::before { +.btn::before { content: "["; } -.edit-btn::after { +.btn::after { content: "]"; } -.edit-btn:hover { - color: #ffd54f; -} - -.new-btn { - background: none; - border: none; - color: #ffb300; - font: inherit; - cursor: pointer; - padding: 0; - white-space: nowrap; -} -.new-btn::before { - content: "["; -} -.new-btn::after { - content: "]"; -} -.new-btn:hover { +.btn:hover { color: #ffd54f; } @@ -268,22 +251,15 @@ main { } .btn-tool { - background: none; - border: none; color: #0f0; - font: inherit; font-size: 0.85rem; - cursor: pointer; padding: 0 0.15rem; text-shadow: 0 0 4px #0a0; - white-space: nowrap; } .btn-tool::before { - content: "["; color: #060; } .btn-tool::after { - content: "]"; color: #060; } .btn-tool:hover { @@ -326,45 +302,6 @@ textarea:focus { box-shadow: 0 0 5px #0a0; } -.btn-save { - background: none; - border: none; - color: #ffb300; - font: inherit; - cursor: pointer; - text-shadow: inherit; - padding: 0; -} -.btn-save::before { - content: "["; -} -.btn-save::after { - content: "]"; -} -.btn-save:hover { - color: #ffd54f; -} - -.btn-cancel { - background: none; - border: none; - color: #ffb300; - font: inherit; - text-shadow: inherit; - cursor: pointer; - padding: 0; - text-decoration: none; - display: inline-block; -} -.btn-cancel::before { - content: "["; -} -.btn-cancel::after { - content: "]"; -} -.btn-cancel:hover { - color: #ffb300; -} /* === Diary views === */ .diary-section {