diff options
| author | Preston Pan <ret2pop@gmail.com> | 2026-02-17 19:21:56 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@gmail.com> | 2026-02-17 19:21:56 -0800 |
| commit | 243ebf35c43c9bb6f64c1fd1a51794e55f640780 (patch) | |
| tree | 7aa3f10c69967c5a1641917910306eeb02c7a632 /nix/data | |
| parent | 40f5a8b407c0c771005c3f64b72d3c9b9da4c586 (diff) | |
| parent | 9a930ea12bd743e9ca57b70911f8c35d97af3320 (diff) | |
Merge branch 'main' of ret2pop.net:/srv/git/monorepo
Diffstat (limited to 'nix/data')
| -rw-r--r-- | nix/data/public-inbox.css | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/nix/data/public-inbox.css b/nix/data/public-inbox.css new file mode 100644 index 0000000..df94873 --- /dev/null +++ b/nix/data/public-inbox.css @@ -0,0 +1,143 @@ +:root { + --bg: #f8f9fa; + --fg: #2e3440; + --link: #5e81ac; + --link-hover: #81a1c1; + --border: #d8dee9; + --card-bg: #ffffff; + --meta-fg: #4c566a; /* Darker gray for better legibility */ + --btn-fg: #ffffff; + --max-width: 780px; +} + +@media (prefers-color-scheme: dark) { + :root { + --bg: #1a1b26; + --fg: #a9b1d6; + --link: #7aa2f7; + --link-hover: #bb9af7; + --border: #414868; /* Distinct border for dark mode */ + --card-bg: #1f2335; + --meta-fg: #9aa5ce; /* Brighter gray for dark mode */ + --btn-fg: #1a1b26; + } +} + +span.q { + color: var(--meta-fg); + font-style: italic; +} + +body { + background-color: var(--bg); + color: var(--fg); + line-height: 1.6; + max-width: var(--max-width); + margin: 3rem auto; + padding: 0 1.5rem; + font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; + + /* Keep this for smoother rendering on macOS/iOS */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/* 1. Global Link Fixes */ +body a, body a:visited { + color: var(--link); +} + +/* 2. Card Styling */ +body pre { + white-space: pre-wrap; + background: var(--card-bg); + padding: 2rem; + border-radius: 12px; + border: 1px solid var(--border); + margin-bottom: 2.5rem; +} + +/* 3. Header Cleanup */ +body pre b:first-of-type { + font-weight: 700; + color: var(--link); + font-size: 1.1rem; + display: block; + margin-bottom: 0.5rem; +} + +/* 4. Fixing the "Permalink" label on documentation */ +/* We target links ending in / but EXCLUDE system paths like help or mirror */ +body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]) { + font-size: 0; + text-decoration: none; + margin-right: 10px; +} + +body pre a[href$="/"]:not([href*="_/"]):not([href*="new.atom"]):after { + content: "permalink"; + font-size: 11px; + font-weight: bold; + color: var(--fg); /* Use main text color for high contrast */ + background: var(--bg); + border: 1px solid var(--link); /* Use link color for the border */ + padding: 4px 10px; + border-radius: 4px; + display: inline-block; +} + +/* 5. Fixing the "Raw" button contrast */ +body pre a[href$="/raw"] { + font-size: 0; + text-decoration: none; +} + +body pre a[href$="/raw"]:after { + content: "raw"; + font-size: 11px; + font-weight: bold; + color: var(--fg); + background: var(--bg); + border: 1px solid var(--link); + padding: 4px 10px; + border-radius: 4px; + display: inline-block; +} + +/* Hover effect for ghost buttons: solid color shift */ +body pre a[href$="/"]:hover:after, +body pre a[href$="/raw"]:hover:after { + background: var(--link); + color: var(--btn-fg); +} + +/* 6. The Reply Button (Primary Action) */ +body pre a[href$="#R"], body pre a[href$="#R"]:visited { + font-size: 0; + text-decoration: none; +} + +body pre a[href$="#R"]:after { + content: "REPLY"; + font-size: 12px; + font-weight: bold; + padding: 6px 20px; + background: var(--link); + color: var(--btn-fg); + border-radius: 6px; + display: inline-block; + margin-left: 10px; +} + +/* 7. Hide clutter */ +body pre a[href^="#r"], body pre a[href^="#r"] + b, body hr { + display: none; +} + +/* Fix: Mathematically outscore the header rule to keep link text inline */ +body pre a[href] b:first-of-type { + display: inline; + font-size: inherit; + margin-bottom: 0; + color: inherit; +} |
