From 6ade49b8a453fde18ee054021006ad8be6361865 Mon Sep 17 00:00:00 2001 From: leiyu3 Date: Thu, 17 Jul 2025 15:04:31 -0400 Subject: some fixes --- assets/css/custom.css | 67 +++----------------------------------------- assets/css/main.css | 28 +----------------- assets/css/vars.css | 4 +-- content/til-i-see-you.md | 2 +- layouts/_default/baseof.html | 14 ++++++++- layouts/_default/single.html | 4 +-- 6 files changed, 23 insertions(+), 96 deletions(-) diff --git a/assets/css/custom.css b/assets/css/custom.css index abf5151..acbff4f 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -101,13 +101,6 @@ td { flex-wrap: wrap; } -div#gallery { - display: flex; - flex-wrap: wrap; - gap: 1em; - justify-content: center; -} - em, i { color: #c38f88; @@ -212,62 +205,6 @@ img { margin: auto; } -figcaption { - text-align: center; -} - -/* Books */ -.abook { - overflow: hidden; - margin: 0 0 5em 0; -} - -.abook figure { - float: left; - margin-right: 1rem; - width: 120px; -} - -.abook small { - display: block; - margin: 0.5rem 0; - color: #aaa; -} - -.book { - display: flex; /* NEW: use flexbox */ - align-items: flex-start; /* Align top edges */ - overflow: hidden; - margin: 0 0 1em 0; -} - -.book figure { - flex-shrink: 0; - margin-right: 1rem; - width: 120px; -} - -.book-info { - display: flex; /* NEW: make inner div flex */ - flex-direction: column; /* Stack title and small vertically */ - justify-content: space-between; /* Push small to bottom */ -} - -.book-title { - margin: 0px; -} - -.book small { - color: #aaa; - display: block; - margin-top: 1rem; -} - -table { - width: fit-content; - margin: 0 auto; -} - .chord-line { position: relative; font-family: monospace; @@ -346,6 +283,10 @@ body.hide-chords .chord { display: none; } +body.hide-chords .key-selector{ + display: none; +} + body.hide-chords .chord-line { line-height: 1.2em; font-size: 1em; diff --git a/assets/css/main.css b/assets/css/main.css index b552953..458c903 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -78,33 +78,7 @@ pre::-webkit-scrollbar { display: none; } -code span { - display: inline !important; -} - -code { - -webkit-font-smoothing: antialiased; - -moz-font-feature-settings: "liga=1, dlig=1"; - -ms-font-feature-settings: "liga", "dlig"; - -webkit-font-feature-settings: "liga", "dlig"; - -o-font-feature-settings: "liga", "dlig"; - font-feature-settings: "liga", "dlig"; - font-variant-ligatures: contextual; - font-family: "Monaspace"; - font-size: 0.9em; - line-height: 0; -} -.katex-display { - overflow-x: auto; - overflow-y: hidden; - -ms-overflow-style: none; - scrollbar-width: none; -} - -.katex-display::-webkit-scrollbar { - display: none; -} /* Footnotes */ @@ -219,7 +193,7 @@ footer a { .single-intro-container { margin-top: 1rem; - margin-bottom: 2rem; + margin-bottom: 0.5rem; } .single-title { diff --git a/assets/css/vars.css b/assets/css/vars.css index 01fba59..92c7efc 100644 --- a/assets/css/vars.css +++ b/assets/css/vars.css @@ -18,8 +18,8 @@ --h2-margin-bottom: 1.5rem; --hx-margin-top: 1.5rem; --hx-margin-bottom: 1rem; - --p-margin-top: 1rem; - --p-margin-bottom: 1rem; + --p-margin-top: 0.1rem; + --p-margin-bottom: 0.1em; --code-margin-top: 2rem; --code-margin-bottom: 2rem; diff --git a/content/til-i-see-you.md b/content/til-i-see-you.md index 0a847bf..4a39253 100644 --- a/content/til-i-see-you.md +++ b/content/til-i-see-you.md @@ -27,7 +27,7 @@ And grace a[C#m7]mazing takes me home, I'll trust [A]in You I will [C#m7]live to [E/G#]bring You praise I will [A]live a [B]child in awe of [C#m7]You [B] {{< /chords >}} -D + {{< chords >}} You are the [A]voice that called the [B]universe to [C#m7]be You are the [A]whisper in my [B]heart that speaks to [C#m7]me diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index fa1b3b7..d505868 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -126,7 +126,19 @@ document.addEventListener("DOMContentLoaded", () => { document.addEventListener("DOMContentLoaded", () => { const toggle = document.getElementById("toggle-chords"); - toggle?.addEventListener("change", () => { + if (!toggle) return; + + // ✅ Restore saved state + const savedState = localStorage.getItem("chords-toggle"); + if (savedState !== null) { + const isChecked = savedState === "true"; + toggle.checked = isChecked; + document.body.classList.toggle("hide-chords", !isChecked); + } + + // ✅ Save on change + toggle.addEventListener("change", () => { + localStorage.setItem("chords-toggle", toggle.checked); document.body.classList.toggle("hide-chords", !toggle.checked); }); }); diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 38cf763..ad55680 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -22,7 +22,7 @@ -
+
-- cgit v1.2.3