From cd03f22952ea5b6783ad12a486b34bb3aef0dffc Mon Sep 17 00:00:00 2001 From: gapry Date: Thu, 26 Nov 2026 16:40:10 +0800 Subject: [PATCH] site: refactor styles; read post title from frontmatter; fix lint --- post.config.js | 4 +- ...f-Compiler-Optimisations-Study-Notes-01.md | 1 + ...f-Compiler-Optimisations-Study-Notes-02.md | 1 + ...f-Compiler-Optimisations-Study-Notes-03.md | 1 + ...f-Compiler-Optimisations-Study-Notes-04.md | 1 + ...f-Compiler-Optimisations-Study-Notes-05.md | 1 + ...f-Compiler-Optimisations-Study-Notes-06.md | 1 + ...f-Compiler-Optimisations-Study-Notes-07.md | 1 + ...f-Compiler-Optimisations-Study-Notes-08.md | 1 + ...f-Compiler-Optimisations-Study-Notes-09.md | 1 + ...f-Compiler-Optimisations-Study-Notes-10.md | 1 + ...f-Compiler-Optimisations-Study-Notes-11.md | 1 + src/components/Analytics.jsx | 2 +- src/components/Footer/Footer.css | 16 +-- src/components/Header/Header.css | 30 ++-- .../MarkdownRenderer/MarkdownRenderer.css | 113 ++++++++++++--- .../MarkdownRenderer/MarkdownRenderer.jsx | 14 +- src/pages/Home/Home.css | 70 ++------- src/pages/Home/Home.jsx | 25 ++-- src/pages/NotFound/NotFound.css | 19 +-- src/pages/NotFound/NotFound.jsx | 2 +- src/pages/Tags/Tags.css | 34 ++--- src/pages/Tags/Tags.jsx | 18 ++- src/styles/App.css | 134 ++---------------- src/styles/index.css | 71 +++++++--- 25 files changed, 246 insertions(+), 317 deletions(-) diff --git a/post.config.js b/post.config.js index fb457c1..cf4c69b 100644 --- a/post.config.js +++ b/post.config.js @@ -27,6 +27,8 @@ years.forEach(year => { .filter(Boolean); } + const titleMatch = content.match(/^title:\s*(.*)$/m); + const fileName = file.replace('.md', ''); const parts = fileName.split('-'); @@ -42,7 +44,7 @@ years.forEach(year => { slug, tags, originalName : fileName, - title : slug.replace(/-/g, ' '), + title : titleMatch ? titleMatch[1].trim() : slug.replace(/-/g, ' '), date : `${y}-${m}-${d}` }); } diff --git a/public/posts/2026/2026-01-01-Advent-of-Compiler-Optimisations-Study-Notes-01.md b/public/posts/2026/2026-01-01-Advent-of-Compiler-Optimisations-Study-Notes-01.md index 40a6569..bcfd10e 100644 --- a/public/posts/2026/2026-01-01-Advent-of-Compiler-Optimisations-Study-Notes-01.md +++ b/public/posts/2026/2026-01-01-Advent-of-Compiler-Optimisations-Study-Notes-01.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 01 --- ## Study Notes: Why xor eax, eax?, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-02.md b/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-02.md index 5c2c15f..4a44c24 100644 --- a/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-02.md +++ b/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-02.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 02 --- ## Study Notes: Addressing the adding situation, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-03.md b/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-03.md index be3ce98..60170e9 100644 --- a/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-03.md +++ b/public/posts/2026/2026-01-31-Advent-of-Compiler-Optimisations-Study-Notes-03.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, arm +title: Advent of Compiler Optimisations Study Notes 03 --- ## Study Notes: You can't fool the optimiser, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-02-27-Advent-of-Compiler-Optimisations-Study-Notes-04.md b/public/posts/2026/2026-02-27-Advent-of-Compiler-Optimisations-Study-Notes-04.md index f5934c2..1b9da0e 100644 --- a/public/posts/2026/2026-02-27-Advent-of-Compiler-Optimisations-Study-Notes-04.md +++ b/public/posts/2026/2026-02-27-Advent-of-Compiler-Optimisations-Study-Notes-04.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 04 --- ## Study Notes: Multiplying with a constant, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-05.md b/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-05.md index aaa74c2..9ba5b30 100644 --- a/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-05.md +++ b/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-05.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, arm +title: Advent of Compiler Optimisations Study Notes 05 --- ## Study Notes: ARM's barrel shifter tricks, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-06.md b/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-06.md index 0031d25..e583788 100644 --- a/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-06.md +++ b/public/posts/2026/2026-02-28-Advent-of-Compiler-Optimisations-Study-Notes-06.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86, arm +title: Advent of Compiler Optimisations Study Notes 06 --- ## Study Notes: Division, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-07.md b/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-07.md index ce2ff63..c97cb0b 100644 --- a/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-07.md +++ b/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-07.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 07 --- ## Study Notes: Division by a Constant, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-08.md b/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-08.md index f1d2c8c..cb75d20 100644 --- a/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-08.md +++ b/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-08.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 08 --- ## Study Notes: Going loopy, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-09.md b/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-09.md index 208094f..1d61d5e 100644 --- a/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-09.md +++ b/public/posts/2026/2026-03-31-Advent-of-Compiler-Optimisations-Study-Notes-09.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 09 --- ## Study Notes: Induction variables and loops, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-04-30-Advent-of-Compiler-Optimisations-Study-Notes-10.md b/public/posts/2026/2026-04-30-Advent-of-Compiler-Optimisations-Study-Notes-10.md index 37dff4e..6616a08 100644 --- a/public/posts/2026/2026-04-30-Advent-of-Compiler-Optimisations-Study-Notes-10.md +++ b/public/posts/2026/2026-04-30-Advent-of-Compiler-Optimisations-Study-Notes-10.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 10 --- ## Study Notes: Unrolling loops, Advent of Compiler Optimisations 2025 diff --git a/public/posts/2026/2026-05-31-Advent-of-Compiler-Optimisations-Study-Notes-11.md b/public/posts/2026/2026-05-31-Advent-of-Compiler-Optimisations-Study-Notes-11.md index eeed716..d0b6c8e 100644 --- a/public/posts/2026/2026-05-31-Advent-of-Compiler-Optimisations-Study-Notes-11.md +++ b/public/posts/2026/2026-05-31-Advent-of-Compiler-Optimisations-Study-Notes-11.md @@ -1,5 +1,6 @@ --- tags: AoCO2025, Compiler, x86 +title: Advent of Compiler Optimisations Study Notes 11 --- ## Study Notes: Counting Bits, Advent of Compiler Optimisations 2025 diff --git a/src/components/Analytics.jsx b/src/components/Analytics.jsx index 3f84caa..1df3c09 100644 --- a/src/components/Analytics.jsx +++ b/src/components/Analytics.jsx @@ -31,7 +31,7 @@ export default function Analytics() { script.async = true; document.head.appendChild(script); - }, [trackingId, siteConfig.analytics.anonymizeIp]); + }, [trackingId]); return null; } \ No newline at end of file diff --git a/src/components/Footer/Footer.css b/src/components/Footer/Footer.css index 60f7d1f..a8e7b1f 100644 --- a/src/components/Footer/Footer.css +++ b/src/components/Footer/Footer.css @@ -1,18 +1,16 @@ .site-footer { - margin-top: 4rem; - padding: 2rem 1rem; - border-top: 1px solid #333; + margin-top: 64px; + padding: 32px 16px; + border-top: 1px solid var(--color-border); text-align: center; - color: #888; - font-size: 0.9rem; + color: var(--color-text-faint); + font-size: 14.4px; } .footer-content a { - color: #ff7875; - text-decoration: none; + color: var(--color-accent); } .footer-content a:hover { - color: #ff4d4f; - text-decoration: underline; + color: var(--color-accent-strong); } diff --git a/src/components/Header/Header.css b/src/components/Header/Header.css index cb7cf49..2ed9a9f 100644 --- a/src/components/Header/Header.css +++ b/src/components/Header/Header.css @@ -1,26 +1,24 @@ .site-header { - width: 100%; - border-bottom: 1px solid #333; - padding: 1.5rem 0 0.5rem 0; + border-bottom: 1px solid var(--color-border); + padding: 24px 0 8px; margin-bottom: 10px; } .header-container { display: flex; + flex-wrap: wrap; justify-content: space-between; - align-items: center; - max-width: 800px; - margin: 0 auto; - padding: 0 0px; - box-sizing: border-box; + align-items: center; + gap: 8px 20px; } .logo { - font-size: 2.0rem; + font-size: clamp(20px, 6vw, 32px); font-weight: bold; - text-decoration: none; - color: #fff; line-height: 1; + white-space: nowrap; + color: var(--color-text-strong); + text-decoration: none; } .nav-menu { @@ -35,12 +33,12 @@ .nav-menu a { display: flex; align-items: center; - text-decoration: none; - color: #aaa; - transition: color 0.2s; line-height: 1; + white-space: nowrap; + color: var(--color-text-muted); + text-decoration: none; } .nav-menu a:hover { - color: #646cff; -} \ No newline at end of file + color: var(--color-link); +} diff --git a/src/components/MarkdownRenderer/MarkdownRenderer.css b/src/components/MarkdownRenderer/MarkdownRenderer.css index 2801ece..d6a17bc 100644 --- a/src/components/MarkdownRenderer/MarkdownRenderer.css +++ b/src/components/MarkdownRenderer/MarkdownRenderer.css @@ -1,43 +1,112 @@ .post-metadata { - margin: 0; + --tag-gap: 10px; padding: 15px 0; - display: flex; - align-items: center; -} - -.post-tags-row { - display: flex; - flex-wrap: wrap; - gap: 10px; - margin: 0; - line-height: 1; } .blog-post-tags { - font-family: 'SFMono-Regular', Consolas, monospace; - font-size: 0.8rem; - background: #252525; - color: #c04d4d; + display: inline-flex; + align-items: center; + font-family: var(--font-mono); + font-size: 12.8px; + line-height: 1; + background: var(--color-surface); + color: var(--color-accent); padding: 4px 10px; border-radius: 4px; text-decoration: none; - display: inline-flex; - align-items: center; } .blog-post-tags:hover { - background: #121212; - color: #ff4d4f; - text-decoration: none; + background: var(--color-bg-sunken); + color: var(--color-accent-strong); font-weight: bold; } +.markdown-body { + font-size: 17.6px; + overflow-wrap: break-word; +} + +.markdown-body h1, +.markdown-body h2, +.markdown-body h3 { + color: var(--color-text-strong); + margin-top: 16px; + margin-bottom: 0.5em; +} + .markdown-body h2 { - margin-top: 0px !important; + margin-top: 0; +} + +.markdown-body > :is(h1, h2, h3, p):first-child { + margin-top: 8px; +} + +.markdown-body hr { + margin: 0; + border: 0; + border-top: 1px solid var(--color-border); +} + +.markdown-body img { + max-width: 100%; + height: auto; +} + +.markdown-body table { + display: block; + border-collapse: collapse; + margin: 20px 0; + font-size: 15.2px; + overflow-x: auto; +} + +.markdown-body th, +.markdown-body td { + border: 1px solid var(--color-border); + padding: 12px; + text-align: left; +} + +.markdown-body th { + background-color: var(--color-surface); + color: var(--color-text-strong); +} + +.markdown-body tr:nth-child(even) { + background-color: var(--color-surface-subtle); +} + +.markdown-body code { + font-family: var(--font-code); + background-color: var(--color-surface-raised); + padding: 0.2em 0.4em; + border-radius: 4px; + font-size: 85%; + color: var(--color-accent); +} + +.markdown-body pre { + overflow-x: auto; +} + +.markdown-body pre code { + background-color: transparent; + padding: 0; + color: var(--color-text); +} + +.markdown-body :is(pre, pre div, table) { + scrollbar-width: none; +} + +.markdown-body :is(pre, pre div, table)::-webkit-scrollbar { + display: none; } .katex { - color: #e0e0e0; + color: var(--color-text); font-size: 1.1em; } diff --git a/src/components/MarkdownRenderer/MarkdownRenderer.jsx b/src/components/MarkdownRenderer/MarkdownRenderer.jsx index faec488..efad521 100644 --- a/src/components/MarkdownRenderer/MarkdownRenderer.jsx +++ b/src/components/MarkdownRenderer/MarkdownRenderer.jsx @@ -81,14 +81,12 @@ export default function MarkdownRenderer({ content }) { return (
{tags.length > 0 && ( -
-
- {tags.map(tag => ( - - #{tag} - - ))} -
+
+ {tags.map(tag => ( + + #{tag} + + ))}
)} diff --git a/src/pages/Home/Home.css b/src/pages/Home/Home.css index d724c1d..7833727 100644 --- a/src/pages/Home/Home.css +++ b/src/pages/Home/Home.css @@ -1,26 +1,7 @@ -.home-container { - width: 100%; -} - .home-title { - font-size: 1.5rem; + font-size: 24px; margin-bottom: 20px; - color: #ffffff; -} - -.tag-filter-info { - margin-bottom: 25px; -} - -.clear-filter { - font-size: 0.9rem; - color: #666; - text-decoration: none; - transition: color 0.2s; -} - -.clear-filter:hover { - color: #1890ff; + color: var(--color-text-strong); } .post-list { @@ -30,49 +11,28 @@ .post-item { margin-bottom: 20px; - font-size: 1.1rem; -} - -.post-info { - font-size: 1.1rem; + font-size: 17.6px; } .post-date { - font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; - color: #999; + font-family: var(--font-mono); + color: var(--color-text-muted); margin-right: 10px; } -.post-link { - color: #1890ff; - text-decoration: none; - transition: color 0.2s, text-decoration 0.2s; -} - -.post-link:hover { - color: #40a9ff; - text-decoration: underline; -} - .post-tags { - display: flex; - flex-wrap: wrap; - gap: 12px; margin-top: 6px; - margin-left: 2px; + margin-left: 2px; } .tag-link { - font-family: 'SFMono-Regular', Consolas, monospace; - font-size: 0.85rem; - color: #666; - text-decoration: none; - transition: color 0.2s; + font-family: var(--font-mono); + font-size: 13.6px; + color: var(--color-text-faint); } .tag-link:hover { - color: #ff4d4f; - text-decoration: underline; + color: var(--color-accent-strong); } .pagination { @@ -84,14 +44,8 @@ .pagination-btn { background: none; border: none; - color: #1890ff; cursor: pointer; - font-size: 1rem; + font-family: inherit; + font-size: 16px; padding: 0; - transition: color 0.2s; -} - -.pagination-btn:hover { - color: #40a9ff; - text-decoration: underline; } diff --git a/src/pages/Home/Home.jsx b/src/pages/Home/Home.jsx index b237722..ec3f088 100644 --- a/src/pages/Home/Home.jsx +++ b/src/pages/Home/Home.jsx @@ -1,14 +1,16 @@ -import { useState, useEffect } from 'react'; +import { useState } from 'react'; import './Home.css'; const POSTS_PER_PAGE = 10; export default function Home({ posts }) { const [currentPage, setCurrentPage] = useState(0); + const [prevPosts , setPrevPosts] = useState(posts); - useEffect(() => { + if (posts !== prevPosts) { + setPrevPosts(posts); setCurrentPage(0); - }, [posts]); + } const startIndex = currentPage * POSTS_PER_PAGE; const currentPosts = posts.slice(startIndex, startIndex + POSTS_PER_PAGE); @@ -16,24 +18,21 @@ export default function Home({ posts }) { const hasPrev = currentPage > 0; return ( -
+

Recent Posts

    {currentPosts.map(post => (
  • -
    +
    [{post.date}] -- - + {post.title}
    - + {post.tags && post.tags.length > 0 && ( -
    +
    {post.tags.map(tag => ( #{tag} @@ -48,7 +47,7 @@ export default function Home({ posts }) {
    diff --git a/src/pages/Tags/Tags.css b/src/pages/Tags/Tags.css index f5136e8..0bdad88 100644 --- a/src/pages/Tags/Tags.css +++ b/src/pages/Tags/Tags.css @@ -1,47 +1,39 @@ .tags-page { - width: 100%; padding-top: 20px; } -.tags-cloud-wrapper { - display: flex; - flex-wrap: wrap; - gap: 12px; - justify-content: flex-start; -} - .tag-cloud-item { display: flex; align-items: center; - background: #1a1a1a; - border: 1px solid #333; + background: var(--color-bg); + border: 1px solid var(--color-border); padding: 8px 16px; - border-radius: 20px; + border-radius: 20px; text-decoration: none; } .tag-cloud-item:hover { - border-color: #1890ff; - background: #222; + border-color: var(--color-link); + background: var(--color-surface-subtle); } .tag-hash { - color: #1890ff; + color: var(--color-link); margin-right: 4px; font-weight: bold; } .tag-name { - color: #eee; - font-size: 1rem; - font-family: 'SFMono-Regular', Consolas, monospace; + color: var(--color-text); + font-size: 16px; + font-family: var(--font-mono); } .tag-count { - color: #666; - font-size: 0.8rem; + color: var(--color-text-muted); + font-size: 12.8px; margin-left: 8px; - background: #2a2a2a; + background: var(--color-surface-raised); padding: 2px 6px; border-radius: 10px; -} \ No newline at end of file +} diff --git a/src/pages/Tags/Tags.jsx b/src/pages/Tags/Tags.jsx index 665a75e..a50c0f7 100644 --- a/src/pages/Tags/Tags.jsx +++ b/src/pages/Tags/Tags.jsx @@ -13,16 +13,14 @@ export default function Tags({ allPosts }) { }, [allPosts]); return ( -
    -
    - {tagStats.map(([tag, count]) => ( - - # - {tag} - {count} - - ))} -
    +
    + {tagStats.map(([tag, count]) => ( + + # + {tag} + {count} + + ))}
    ); } \ No newline at end of file diff --git a/src/styles/App.css b/src/styles/App.css index 62a87a2..e8953df 100644 --- a/src/styles/App.css +++ b/src/styles/App.css @@ -1,132 +1,20 @@ -body { - margin: 0; - background-color: #1a1a1a; - color: #e0e0e0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; - -webkit-font-smoothing: antialiased; -} - .app-shell { - max-width: 800px; - margin: 0 auto; - padding: 0px 20px; - line-height: 1.7; - min-height: 100vh; display: flex; flex-direction: column; - width: 100%; - box-sizing: border-box; - overflow-x: hidden; + box-sizing: border-box; + max-width: 800px; + min-height: 100vh; + min-height: 100dvh; + margin: 0 auto; + padding: 0 20px; } .main-container { - flex: 1; - width: 100%; - min-width: 0; -} - -a { - color: #1890ff; - text-decoration: none; - transition: color 0.2s; + flex: 1; } -a:hover { - text-decoration: underline; - color: #40a9ff; +@media (min-width: 801px) { + .app-shell { + width: fit-content; + } } - -.markdown-body { - font-size: 1.1rem; - margin-top: 0; -} - -.markdown-body h1, .markdown-body h2, .markdown-body h3 { - color: #ffffff; - margin-top: 1rem; - margin-bottom: 0.5em; -} - -.markdown-body > h1:first-child, -.markdown-body > h2:first-child, -.markdown-body > h3:first-child, -.markdown-body > p:first-child { - margin-top: 0.5rem !important; -} - -.markdown-body hr { - margin: 0; - border: 0; - border-top: 1px solid #333; -} - -.markdown-body table { - display: block; - width: 100%; - border-collapse: collapse; - margin: 20px 0; - font-size: 0.95rem; - overflow-x: hidden; -} - -.markdown-body th, .markdown-body td { - border: 1px solid #333; - padding: 12px; - text-align: left; -} - -.markdown-body th { - background-color: #252525; - color: #ffffff; -} - -.markdown-body tr:nth-child(even) { - background-color: #212121; -} - -.markdown-body code { - font-family: 'Fira Code', 'Cascadia Code', monospace; - background-color: #2d2d2d; - padding: 0.2em 0.4em; - border-radius: 4px; - font-size: 85%; - color: #ff7875; -} - -.markdown-body pre { - background-color: transparent !important; - border: none !important; - padding: 0 !important; - max-width: 100%; - white-space: pre; - overflow-x: auto !important; - scrollbar-width: none !important; - -ms-overflow-style: none !important; -} - -.markdown-body pre code { - background-color: transparent; - padding: 0; - color: #e0e0e0; -} - -.markdown-body pre::-webkit-scrollbar, -.markdown-body div::-webkit-scrollbar, -.markdown-body code::-webkit-scrollbar { - display: none !important; - width: 0 !important; - height: 0 !important; - background: transparent !important; -} - -.markdown-body pre, -.markdown-body div, -.markdown-body code { - scrollbar-width: none !important; -} - -.markdown-body pre, -.markdown-body div, -.markdown-body code { - -ms-overflow-style: none !important; -} \ No newline at end of file diff --git a/src/styles/index.css b/src/styles/index.css index 16992a1..c000530 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -1,25 +1,58 @@ +:root { + color-scheme: dark; + + --color-bg: #1a1a1a; + --color-bg-sunken: #121212; + --color-surface-subtle: #212121; + --color-surface: #252525; + --color-surface-raised: #2d2d2d; + --color-border: #333; + + --color-text-strong: #fff; + --color-text: #e0e0e0; + --color-text-muted: #999; + --color-text-faint: #888; + + --color-link: #1890ff; + --color-link-hover: #40a9ff; + + --color-accent: #ff7875; + --color-accent-strong: #ff4d4f; + + --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; + --font-code: 'Fira Code', 'Cascadia Code', monospace; + + --transition-color: color 0.2s; +} + +html { + -webkit-text-size-adjust: 100%; + text-size-adjust: 100%; +} + body { margin: 0; - display: block; - justify-content: center; - align-items: center; - min-height: 100vh; - font-family: system-ui, -apple-system, sans-serif; - background-color: #ffffff; - color: #333333; + font-family: var(--font-sans); + line-height: 1.7; + background-color: var(--color-bg); + color: var(--color-text); + -webkit-font-smoothing: antialiased; } -@media (prefers-color-scheme: dark) { - body { - background-color: #1a1a1a; - color: #f0f0f0; - } +:where(a, .link) { + color: var(--color-link); + text-decoration: none; + transition: var(--transition-color); } -@media (min-width: 801px) { - body { - display: flex; - justify-content: center; - align-items: center; - } -} \ No newline at end of file +:where(a, .link):hover { + color: var(--color-link-hover); + text-decoration: underline; +} + +.tag-list { + display: flex; + flex-wrap: wrap; + gap: var(--tag-gap, 12px); +}