From d2d204130ac6d5906d555bb8ad5c46ea7ddd865c Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Fri, 28 Nov 2025 02:16:41 -0500 Subject: [PATCH] fix styles --- public/styles/git.css | 2 +- public/styles/index.css | 67 +++++++++++++++++++++++------ public/styles/posts.css | 25 +++++++++++ src/content/git/auto-theme.nvim.mdx | 9 ++++ src/content/software/cp.nvim.mdx | 5 --- 5 files changed, 88 insertions(+), 20 deletions(-) create mode 100644 src/content/git/auto-theme.nvim.mdx delete mode 100644 src/content/software/cp.nvim.mdx diff --git a/public/styles/git.css b/public/styles/git.css index 1d8748f..ded792b 100644 --- a/public/styles/git.css +++ b/public/styles/git.css @@ -1,7 +1,7 @@ .clone-line { font-family: "Apercu Mono", monospace; font-size: 1.2em; - margin: 0 1em; + margin: 0 1em 0 0; text-align: left; user-select: all; } diff --git a/public/styles/index.css b/public/styles/index.css index bccfa4f..a3fd17e 100644 --- a/public/styles/index.css +++ b/public/styles/index.css @@ -4,39 +4,60 @@ html { } body { - display: grid; - grid-template-rows: auto 1fr auto; - height: 100%; + display: flex; + flex-direction: column; + height: 100vh; overflow: hidden; } +/* Fixed header and footer for list pages */ +body:has(.content) header { + flex-shrink: 0; +} + +body:has(.content) footer { + flex-shrink: 0; +} + .main { - height: 100%; + flex: 1; overflow: hidden; + display: flex; + align-items: center; } .content { width: 100%; height: 100%; padding: 40px; - overflow-x: auto; - overflow-y: hidden; box-sizing: border-box; - display: grid; - place-items: center; + display: flex; + gap: 80px; + align-items: center; + justify-content: space-between; + overflow: hidden; } .topics { font-size: 3em; - min-height: 0; - max-height: 100%; - width: 100%; + max-height: calc(100vh - 200px); column-count: 2; column-gap: 80px; column-fill: auto; margin: 0; padding: 0; - box-sizing: border-box; + list-style: none; + overflow-y: auto; + overflow-x: hidden; +} + +.topics::-webkit-scrollbar { + display: none; +} + +.topics { + -ms-overflow-style: none; + scrollbar-width: none; } .topics li:first-child { @@ -50,7 +71,14 @@ body { .posts { font-size: 2.2em; text-align: right; - flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + min-height: 0; +} + +.posts:empty { + display: none; } a { @@ -63,7 +91,7 @@ a { ul { list-style: none; - margin: none; + margin: 0; } .topic a { @@ -95,10 +123,21 @@ ul { right: 0; } +body:has(.topics:only-child) .content { + justify-content: flex-start; +} + +body:has(.topics:only-child) .topics { + column-count: 2; + column-fill: auto; + max-width: 1200px; +} + @media (max-width: 768px) { .topics { font-size: 2em; padding: 0 20px; + column-count: 1; } .posts { diff --git a/public/styles/posts.css b/public/styles/posts.css index 67f35ae..b9b7892 100644 --- a/public/styles/posts.css +++ b/public/styles/posts.css @@ -1,3 +1,28 @@ +body:has(.post-container) { + display: flex; + flex-direction: column; + height: 100vh; + overflow: hidden; +} + +body:has(.post-container) header { + flex-shrink: 0; + position: sticky; + top: 0; + z-index: 100; + background: var(--background); +} + +body:has(.post-container) .main { + flex: 1; + overflow-y: auto; + overflow-x: hidden; +} + +body:has(.post-container) footer { + flex-shrink: 0; +} + li { margin: 5px 0; } diff --git a/src/content/git/auto-theme.nvim.mdx b/src/content/git/auto-theme.nvim.mdx new file mode 100644 index 0000000..5d56370 --- /dev/null +++ b/src/content/git/auto-theme.nvim.mdx @@ -0,0 +1,9 @@ +--- +title: "auto-theme.nvim" +slug: "auto-theme.nvim" +date: "11/28/2025" +--- + +[Source code](https://github.com/barrett-ruth/auto-theme.nvim) + +wip diff --git a/src/content/software/cp.nvim.mdx b/src/content/software/cp.nvim.mdx deleted file mode 100644 index 62b5706..0000000 --- a/src/content/software/cp.nvim.mdx +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "cp.nvim" -slug: "cp.nvim" -redirect: /git/cp.nvim.html ----