From 87ab29fad4bd177051569231918fa6b922a0e140 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Wed, 8 Oct 2025 17:18:26 -0600 Subject: [PATCH] feat: improve button style and functionality --- layouts/_default/baseof.html | 62 ++++++++++++++++++++++++++++++++++-- layouts/_default/single.html | 4 ++- layouts/index.html | 4 ++- static/markdown-icon.svg | 4 +++ 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 static/markdown-icon.svg diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 58492b7..d40ddcb 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -94,6 +94,9 @@ font-size: 1.2rem; color: #3d3027; } + .theme-toggle:hover { + background: #eee8dc; + } .copy-btn { position: absolute; top: 1rem; @@ -111,6 +114,12 @@ .copy-btn:hover { background: #eee8dc; } + .copy-icon { + width: 3rem; + height: 3rem; + display: block; + filter: brightness(0) saturate(100%) invert(20%) sepia(15%) saturate(500%) hue-rotate(350deg) brightness(95%) contrast(90%); + } .version-link, .back-link { font-size: 0.9rem; color: #6d5d4b; @@ -130,6 +139,28 @@ border-top: 1px solid #d9cfbb; text-align: center; } + .toast { + position: fixed; + bottom: 2rem; + left: 50%; + transform: translateX(-50%); + background: #3d3027; + color: #faf7f2; + padding: 0.75rem 1.5rem; + border-radius: 6px; + font-size: 0.9rem; + font-weight: 600; + opacity: 0; + pointer-events: none; + transition: opacity 0.3s ease; + z-index: 1000; + } + .toast.show { + opacity: 1; + } + .toast.fade-out { + opacity: 0; + } @media (prefers-color-scheme: dark) { body { background: #252b37; @@ -148,9 +179,15 @@ border-color: #3d4a5c; color: #cbd5e1; } + .theme-toggle:hover { + background: #2d3748; + } .copy-btn:hover { background: #2d3748; } + .copy-icon { + filter: brightness(0) saturate(100%) invert(95%) sepia(0%) saturate(100%) hue-rotate(0deg) brightness(110%) contrast(100%); + } a { color: #74c7ec; } @@ -161,6 +198,10 @@ border-top-color: #3d4a5c; color: #7a8a9a; } + .toast { + background: #cbd5e1; + color: #252b37; + } } body[data-theme="dark"] { background: #252b37; @@ -181,9 +222,15 @@ border-color: #3d4a5c; color: #cbd5e1; } + body[data-theme="dark"] .theme-toggle:hover { + background: #2d3748; + } body[data-theme="dark"] .copy-btn:hover { background: #2d3748; } + body[data-theme="dark"] .copy-icon { + filter: brightness(0) saturate(100%) invert(95%) sepia(0%) saturate(100%) hue-rotate(0deg) brightness(110%) contrast(100%); + } body[data-theme="dark"] a { color: #74c7ec; } @@ -195,6 +242,10 @@ border-top-color: #3d4a5c; color: #7a8a9a; } + body[data-theme="dark"] .toast { + background: #cbd5e1; + color: #252b37; + } body[data-theme="light"] { background: #faf7f2; color: #3d3027; @@ -214,9 +265,15 @@ border-color: #d9cfbb; color: #3d3027; } + body[data-theme="light"] .theme-toggle:hover { + background: #eee8dc; + } body[data-theme="light"] .copy-btn:hover { background: #eee8dc; } + body[data-theme="light"] .copy-icon { + filter: brightness(0) saturate(100%) invert(20%) sepia(15%) saturate(500%) hue-rotate(350deg) brightness(95%) contrast(90%); + } body[data-theme="light"] a { color: #4a8d8f; } @@ -227,11 +284,12 @@ - + {{ block "main" . }}{{ end }} +
Copied!

Licensed under CC0 1.0 • Copyright © 2025 Stephen Waits