From c8e542e883c8fec8b4a101bcd55c4d771b377e80 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Sat, 3 Jan 2026 20:41:07 +0700 Subject: feat: nextstep-like buttons for toolbar --- static/input.css | 42 +++++++++++++++++++++++++++++++++++++++++ views/layouts/general-page.html | 32 ++++++++++++++++--------------- views/pages/global-map.html | 30 +++++++++++++++-------------- 3 files changed, 75 insertions(+), 29 deletions(-) diff --git a/static/input.css b/static/input.css index 8b69162..110e5fd 100644 --- a/static/input.css +++ b/static/input.css @@ -410,6 +410,48 @@ form.crossable.htmx-request input { border-radius: 50%; } +.toolbar-button::before { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient(135deg, #fff, #000); + opacity: 0.2; + z-index: 1; + content: ""; +} + +.toolbar-button:active::before { + opacity: 0.4; +} + +.toolbar-button:hover:not(:active)::before { + opacity: 0; +} + +.toolbar-button { + background-image: var(--squares-and-triangles-background); + background-repeat: var(--squares-and-triangles-background-repeat); + background-size: calc(var(--squares-and-triangles-background-width-coef) * 0.9rem) calc(var(--squares-and-triangles-background-height-coef) * 0.9rem); + border-top: 0.3rem solid #fff; + border-left: 0.3rem solid #fff; + border-bottom: 0.3rem solid #000; + border-right: 0.3rem solid #000; + position: relative; +} + +.toolbar-button:active { + border-top: 0.3rem solid #000; + border-left: 0.3rem solid #000; + border-bottom: 0.3rem solid #fff; + border-right: 0.3rem solid #fff; +} + +.toolbar-button:active > * { + transform: translateY(0.15rem); +} + .custom-svg-marker { background: transparent; border: none; diff --git a/views/layouts/general-page.html b/views/layouts/general-page.html index fe6bc78..f9a30ef 100644 --- a/views/layouts/general-page.html +++ b/views/layouts/general-page.html @@ -173,23 +173,25 @@
-