dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
commit b46dc646c93d6780f33db09e030ec2cfba3e9ca1 parent 34454b581f3aab01af0ae5795af2924089ad03f6 Author: maydayv7 <maydayv7@gmail.com> Date: Sat, 3 Jan 2026 18:06:04 +0530 fix(site): Styling
Diffstat:
| M | .github/workflows/website-git.yaml | | | 7 | +++---- |
| M | flake.lock | | | 6 | +++--- |
| M | site/README.md | | | 2 | +- |
| M | site/content/blog/_index.md | | | 4 | +--- |
| D | site/git/base.css | | | 542 | ------------------------------------------------------------------------------- |
| A | site/git/style.css | | | 614 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| M | site/git/theme.nix | | | 4 | ++-- |
| M | site/sass/_logo.scss | | | 3 | ++- |
| M | site/sass/_search.scss | | | 2 | +- |
| M | site/static/js/clipboard.js | | | 4 | ++-- |
| M | site/templates/macros/posts.html | | | 49 | +++++++++++++++++++++++++++++++++---------------- |
11 files changed, 662 insertions(+), 575 deletions(-)
diff --git a/.github/workflows/website-git.yaml b/.github/workflows/website-git.yaml @@ -1,14 +1,13 @@ name: "ci: Build and Deploy Git Site" on: workflow_dispatch: + schedule: + - cron: "0 0 * * 0" push: branches: - stable paths: - "site/git/**" - pull_request: - paths: - - "site/git/**" jobs: deploy: runs-on: ubuntu-latest @@ -35,7 +34,7 @@ jobs: with: workingDirectory: "site/git" wranglerVersion: "latest" - command: deploy ${{ github.ref == 'refs/heads/stable' && '--env production' || '' }} + command: deploy --env production accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} gitHubToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/flake.lock b/flake.lock @@ -747,11 +747,11 @@ ] }, "locked": { - "lastModified": 1767422312, - "narHash": "sha256-EIiMVhO0kO5GjZgSfTZBjJSCeqvi0m322rwkvyLUyaU=", + "lastModified": 1767443609, + "narHash": "sha256-AvtBGydW0tS5a3Bq4+W5W0ylSI5ZorA8XG5H4/ncJWE=", "owner": "maydayv7", "repo": "stagit", - "rev": "deb822c63f0298af256d313754b7d81bec708ab5", + "rev": "80db600fc5483d5f4b7acd52b318b52aab3e23db", "type": "github" }, "original": { diff --git a/site/README.md b/site/README.md @@ -46,7 +46,7 @@ To override the URL, run: <pre><code>nix build --impure --expr "with import ../p - [x] GitHub : Star Count - <code>{{ github(repo="<b>USER</b>/<b>NAME</b>") }}</code> - [x] YouTube : Embed Video - <code>{{ youtube(id="<b>ID</b>") }}</code> -## Git frontend +## `git` frontend The [`git`](./git) directory contains the configuration for my static `git` frontend, hosted at [git.maydayv7.cc](https://maydayv7.cc) It is built using my `stagit` [fork](https://github.com/maydayv7/stagit) to generate static HTML pages for my repositories diff --git a/site/content/blog/_index.md b/site/content/blog/_index.md @@ -1,5 +1,5 @@ +++ -title = "The Blog" +title = "My Blog" sort_by = "update_date" paginate_by = 5 insert_anchor_links = "right" @@ -10,7 +10,5 @@ blog_search = true feed_discovery = true +++ -# Welcome to My Blog! - - View the {{ url(path="archive", text="Archive") }} - View all {{ url(path="series", text="Series") }} or {{ url(path="tags", text="Tags") }} diff --git a/site/git/base.css b/site/git/base.css @@ -1,542 +0,0 @@ -/* Fonts */ -@font-face { - font-family: "JetBrainsMono Nerd Font"; - src: url("/fonts/JetBrainsMono-Nerd-Regular.woff2") format("woff2"); - font-weight: normal; - font-style: normal; -} -@font-face { - font-family: "JetBrainsMono Nerd Font"; - src: url("/fonts/JetBrainsMono-Nerd-Bold.woff2") format("woff2"); - font-weight: bold; - font-style: normal; -} -@font-face { - font-family: "JetBrainsMono Nerd Font"; - src: url("/fonts/JetBrainsMono-Nerd-Italic.woff2") format("woff2"); - font-weight: normal; - font-style: italic; -} - -:root { - --font-main: "JetBrainsMono Nerd Font", monospace; -} - -body { - font-family: var(--font-main); - color: var(--fg); - background-color: var(--bg); - padding: 0; - margin: 0; - line-height: 1.5; -} - -a { - text-decoration: none; - color: var(--accent); - &:hover { - text-decoration: underline; - color: var(--secondary); - } -} - -.container { - max-width: 900px; - margin: 0 auto; - padding: 30px; - border-left: 1px solid var(--border-subtle); - border-right: 1px solid var(--border-subtle); - min-height: 100vh; - display: flex; - flex-direction: column; -} - -@media (max-width: 684px) { - .container { - padding: 20px; - } -} - -/* Navigation Styling */ -.menu-desktop { - margin-top: 10px; -} - -.menu-inner { - display: flex; - flex-wrap: wrap; - list-style: none; - margin: 0; - padding: 0; -} - -.menu-inner li { - flex: 0 0 auto; -} - -.menu-inner li:not(:last-child) { - margin-right: 20px; -} - -.menu-inner li a { - font-weight: bold; - color: var(--fg); - text-decoration: underline; - text-underline-offset: 4px; -} - -.menu-inner li a:hover { - color: var(--secondary); -} - -/* Header */ -.header { - display: flex; - flex-direction: column; - position: relative; - margin-bottom: 2rem; - width: 100%; -} - -.header-inner { - align-items: center; - display: flex; - justify-content: space-between; - width: 100%; -} - -/* Bars */ -.header-logo { - display: flex; - flex: 1; - align-items: center; -} - -.header-logo::after { - content: ""; - display: block; - width: 100%; - height: 40px; - margin-left: 15px; - background: linear-gradient( - 90deg, - var(--accent) 0% 12%, - transparent 12% 50%, - var(--secondary) 50% 62%, - transparent 62% - ); - background-position: left center; - background-repeat: repeat-x; - background-size: 40px 100%; -} - -/* Button */ -.header-logo a { - flex: 0 0 auto; - text-decoration: none; - font-weight: bold; - font-size: 1.2em; - color: var(--bg); - background-color: var(--accent); - padding: 5px 10px; - border-radius: 3px; - border: 1px solid var(--border-subtle); - - &:hover { - color: var(--secondary); - text-decoration: none; - } - - &:focus { - outline: dotted 2px var(--fg); - } -} - -/* Repo Header */ -#repo-header { - display: flex; - justify-content: space-between; - align-items: center; - flex-wrap: wrap; - gap: 1rem; - margin-bottom: 1rem; - padding-bottom: 1rem; - border-bottom: 1px solid var(--border-subtle); -} - -.repo-title h1 { - margin: 0; - font-size: 1.5em; - line-height: 1.2; -} - -.repo-title .desc { - font-size: 0.9em; - margin-top: 0.2rem; - color: var(--fg-dim); -} - -#repo-header .url { - font-family: var(--font-main); - background-color: var(--bg-code); - padding: 0.5em 0.8em; - border-radius: 4px; - font-size: 0.9em; - white-space: nowrap; - border: 1px solid var(--border-subtle); -} - -/* Tables */ -table { - width: 100%; - border-collapse: collapse; - table-layout: fixed; - min-width: 800px; -} - -td, -th { - padding: 0.25em 0.5em; - text-align: left; - border: 1px solid var(--bg); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -td:empty { - border: none; - background: transparent !important; -} - -#content tr:hover td { - background-color: var(--bg-hover); -} - -th { - font-weight: bold; - border-bottom: 1px solid var(--border); -} - -/* Index Page */ -#index td:nth-child(1) { - /* Name */ - width: 7em; - font-weight: bold; -} -#index td:nth-child(2) { - /* Description */ - width: auto; -} -#index td:nth-child(3) { - /* Owner */ - width: 5em; - text-align: center; -} -#index td:nth-child(4) { - /* Last Commit */ - width: 10em; -} - -/* Log Page */ -#log td:nth-child(1) { - /* Date */ - width: 10em; -} -#log td:nth-child(2) { - /* Message */ - width: auto; -} -#log td:nth-child(3) { - /* Author */ - width: 6em; -} -#log td:nth-child(4) { - /* Files */ - width: 4em; - text-align: right; -} -#log td:nth-child(5) { - /* + */ - width: 3em; - text-align: right; -} -#log td:nth-child(6) { - /* - */ - width: 3em; - text-align: right; -} - -/* Files Page */ -#files td:nth-child(1) { - /* Mode */ - width: 8em; -} -#files td:nth-child(2) { - /* Name */ - width: auto; -} -#files td:nth-child(3) { - /* Size */ - width: 6em; - text-align: right; -} - -/* Refs Page */ -#branches td:nth-child(1), -#tags td:nth-child(1) { - /* Name */ - width: auto; -} -#branches td:nth-child(2), -#tags td:nth-child(2) { - /* Date */ - width: 10em; -} -#branches td:nth-child(3), -#tags td:nth-child(3) { - /* Author */ - width: 10em; -} - -/* Diffstat Table */ -#diffstat td:nth-child(1) { - /* Status */ - width: 2em; - text-align: center; - padding: 0.25em 0; -} -#diffstat td:nth-child(2) { - /* Filename */ - width: auto; -} -#diffstat td:nth-child(3) { - /* Separator */ - width: 2em; - text-align: center; - color: var(--fg-dim); -} -#diffstat td:nth-child(4) { - /* Changes */ - width: 3em; - text-align: right; - font-variant-numeric: tabular-nums; -} -#diffstat td:nth-child(5) { - /* +/- */ - width: auto; - color: var(--fg-dim); -} - -/* Code Blocks */ -pre { - font-family: var(--font-main); - padding: 0.8em; - overflow: auto; - background-color: var(--bg-code); - border: 1px solid var(--border-subtle); - border-radius: 2px; -} - -/* Diff (File View) */ -.i { - color: var(--diff-add); - &:hover { - color: var(--diff-add); - } -} -.d { - color: var(--diff-del); - &:hover { - color: var(--diff-del); - } -} -.h { - color: var(--diff-mod); - &:hover { - color: var(--diff-mod); - } -} -pre span.i, -pre span.d, -pre span.h { - font-weight: bold; -} - -/* Status (Log View) */ -.A { - color: var(--diff-add); - font-weight: bold; -} -.D { - color: var(--diff-del); - font-weight: bold; -} -.M { - color: var(--diff-mod); - font-weight: bold; -} -.R { - font-weight: bold; -} - -/* Blob View */ -#blob a { - color: var(--fg-dim); - &:hover { - color: var(--fg); - text-decoration: none; - } -} - -/* Metadata */ -.desc { - color: var(--fg-dim); - display: block; - margin-top: 0.2rem; -} - -/* Commits Remaining */ -#log-msg { - text-align: center; - padding: 1em 0.5em; - font-weight: bold; - color: var(--fg-dim); - border-top: 1px solid var(--border-subtle); -} - -/* Syntax Highlighting */ - -table#blob.chroma { - width: 100%; - border-collapse: collapse; - font-family: var(--font-main); - background-color: var(--bg-code); - border: 1px solid var(--border-subtle); - border-radius: 2px; - margin-top: 0; - display: table; - table-layout: fixed; -} - -#blob.chroma td { - padding: 0 0.5em; - vertical-align: top; - line-height: 1.5; - border: none; -} - -#blob.chroma td.num { - width: 3em; - text-align: right; - border-right: 1px solid var(--border-subtle); - background-color: var(--code-bg-line-num); - color: var(--fg-dim); - user-select: none; - white-space: nowrap; - overflow: visible; - text-overflow: clip; -} - -#blob.chroma td.code { - width: 100%; - white-space: pre-wrap; - word-break: break-all; - padding-left: 1em; -} - -#blob.chroma td.num a { - text-decoration: none; - color: inherit; -} -#blob.chroma td.num a:hover { - color: var(--fg); -} - -/* Syntax Colors */ -.chroma .c, -.chroma .c1, -.chroma .cs, -.chroma .cm { - color: var(--fg-dim); - font-style: italic; -} - -/* Keywords */ -.chroma .k, -.chroma .kd, -.chroma .kn, -.chroma .kp, -.chroma .kr { - color: var(--accent-alpha-70); - font-weight: bold; -} - -/* Strings */ -.chroma .s, -.chroma .sa, -.chroma .sb, -.chroma .sc, -.chroma .dl, -.chroma .sd, -.chroma .s2, -.chroma .se, -.chroma .sh, -.chroma .si, -.chroma .sx, -.chroma .sr, -.chroma .s1, -.chroma .ss { - color: var(--fg); -} - -/* Numbers */ -.chroma .m, -.chroma .mb, -.chroma .mf, -.chroma .mh, -.chroma .mi, -.chroma .il, -.chroma .mo { - color: var(--accent-alpha-70); -} - -/* Types/Classes */ -.chroma .kt, -.chroma .nc, -.chroma .no, -.chroma .nd { - color: var(--secondary); - font-weight: bold; -} - -/* Variables */ -.chroma .nv, -.chroma .vc, -.chroma .vg, -.chroma .vi { - color: var(--secondary); - font-weight: bold; -} - -/* Functions */ -.chroma .nf, -.chroma .fm { - color: var(--secondary-alpha-70); -} - -/* Tags */ -.chroma .nt { - color: var(--accent-alpha-70); -} - -/* Attributes */ -.chroma .na { - color: var(--secondary); -} - -/* Operators */ -.chroma .o, -.chroma .ow { - color: var(--accent-alpha-70); -} diff --git a/site/git/style.css b/site/git/style.css @@ -0,0 +1,614 @@ +/* Fonts */ +@font-face { + font-family: "JetBrainsMono Nerd Font"; + src: url("/fonts/JetBrainsMono-Nerd-Regular.woff2") format("woff2"); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: "JetBrainsMono Nerd Font"; + src: url("/fonts/JetBrainsMono-Nerd-Bold.woff2") format("woff2"); + font-weight: bold; + font-style: normal; +} +@font-face { + font-family: "JetBrainsMono Nerd Font"; + src: url("/fonts/JetBrainsMono-Nerd-Italic.woff2") format("woff2"); + font-weight: normal; + font-style: italic; +} + +:root { + --font-main: "JetBrainsMono Nerd Font", Menlo, DejaVu Sans Mono, monospace; +} + +html { + box-sizing: border-box; + scroll-behavior: smooth; +} + +*, +*:after, +*:before { + box-sizing: inherit; +} + +body { + font-family: var(--font-main); + color: var(--fg); + background-color: var(--bg); + font-size: 1rem; + line-height: 1.54; + margin: 0; + padding: 0; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -webkit-text-size-adjust: 100%; +} + +a { + text-decoration: none; + color: var(--accent); + transition: color 0.2s; + &:hover { + text-decoration: underline; + color: var(--secondary); + } +} + +.container { + display: flex; + flex-direction: column; + max-width: 900px; + margin: 0 auto; + padding: 30px; + border-left: 1px solid var(--border); + border-right: 1px solid var(--border); + min-height: 100vh; +} + +@media (max-width: 900px) { + .container { + border: none; + max-width: 100%; + } +} + +@media (max-width: 684px) { + .container { + padding: 20px; + } + + body { + font-size: 1rem; + } +} + +/* Navigation Styling */ +.menu { + margin-top: 15px; +} + +.menu-inner { + display: flex; + flex-wrap: wrap; + list-style: none; + margin: 0; + padding: 0; +} + +.menu-inner li { + flex: 0 0 auto; +} + +.menu-inner li:not(:last-child) { + margin-right: 20px; +} + +.menu-inner li a { + font-weight: bold; + color: var(--fg); + text-decoration: underline; + text-underline-offset: 4px; +} + +.menu-inner li a:hover { + color: var(--secondary); +} + +/* Header */ +.header { + display: flex; + flex-direction: column; + position: relative; + margin-bottom: 2rem; + width: 100%; +} + +.header-inner { + align-items: center; + display: flex; + justify-content: space-between; + width: 100%; +} + +/* Bars */ +.header-logo { + display: flex; + flex: 1; + align-items: center; +} + +.header-logo::after { + content: ""; + display: block; + width: 100%; + height: 40px; + margin: 0px 0px 0px 10px; + background: linear-gradient( + 90deg, + var(--accent) 0% 12%, + transparent 12% 50%, + var(--secondary) 50% 62%, + transparent 62% + ); + background-position: left center; + background-repeat: repeat-x; + background-size: 40px 100%; +} + +/* Button */ +.header-logo a { + flex: 0 0 auto; + text-decoration: none; + font-weight: bold; + font-size: 1.2em; + color: var(--bg); + background-color: var(--accent); + padding: 5px 10px; + border-radius: 3px; + + &:hover { + color: var(--secondary); + text-decoration: none; + } + + &:focus { + outline: dotted 2px var(--fg); + } +} + +@media (max-width: 684px) { + .header-inner { + flex-direction: column; + align-items: flex-start; + } + + .header-logo { + width: 100%; + margin-bottom: 15px; + } + + .header-logo::after { + margin: 0px 15px 0px 10px; + } + + .menu-inner { + flex-direction: column; + width: 100%; + } + + .menu-inner li { + margin-right: 0; + margin-bottom: 10px; + padding: 5px 0; + border-bottom: 1px solid var(--bg-hover); + } +} + +/* Repo Header */ +#repo-header { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + gap: 1rem; + margin-bottom: 1rem; + padding-bottom: 1rem; + border-bottom: 1px solid var(--border-subtle); +} + +.repo-title h1 { + margin: 0; + font-size: 1.5em; + line-height: 1.2; +} + +.repo-title .desc { + font-size: 0.9em; + margin-top: 0.2rem; + color: var(--fg-dim); +} + +#repo-header .url { + font-family: var(--font-main); + background-color: var(--bg-code); + padding: 0.5em 0.8em; + border-radius: 3px; + font-size: 0.9em; + white-space: nowrap; + border: 1px solid var(--border-subtle); +} + +/* Tables */ +table { + width: 100%; + border-collapse: collapse; + table-layout: fixed; + min-width: 800px; +} + +@media (max-width: 684px) { + table { + display: block; + overflow-x: auto; + width: 100%; + min-width: 0; + } +} + +td, +th { + padding: 0.25em 0.5em; + text-align: left; + border: 1px solid var(--bg); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +td:empty { + border: none; + background: transparent !important; +} + +#content tr:hover td { + background-color: var(--bg-hover); +} + +th { + font-weight: bold; + border-bottom: 1px solid var(--border); + color: var(--accent); +} + +/* --- Page-specific sizing --- */ + +/* Index Page */ +#index td:nth-child(1) { + /* Name */ + width: 7em; + font-weight: bold; +} +#index td:nth-child(2) { + /* Description */ + width: auto; +} +#index td:nth-child(3) { + /* Owner */ + width: 5em; + text-align: center; +} +#index td:nth-child(4) { + /* Last Commit */ + width: 11em; +} + +/* Log Page */ +#log td:nth-child(1) { + /* Date */ + width: 11em; +} +#log td:nth-child(2) { + /* Message */ + width: auto; +} +#log td:nth-child(3) { + /* Author */ + width: 6em; +} +#log td:nth-child(4) { + /* Files */ + width: 5em; + text-align: right; +} +#log td:nth-child(5), +#log td:nth-child(6) { + /* +/- */ + width: 4em; + text-align: right; + text-overflow: clip; +} + +/* Files Page */ +#files td:nth-child(1) { + /* Mode */ + width: 8em; +} +#files td:nth-child(2) { + /* Name */ + width: auto; +} +#files td:nth-child(3) { + /* Size */ + width: 6em; + text-align: right; +} + +/* Refs Page */ +#branches td:nth-child(1), +#tags td:nth-child(1) { + /* Name */ + width: auto; +} +#branches td:nth-child(2), +#tags td:nth-child(2) { + /* Date */ + width: 11em; +} +#branches td:nth-child(3), +#tags td:nth-child(3) { + /* Author */ + width: 10em; +} + +/* Diffstat Table */ +#diffstat td:nth-child(1) { + /* Status */ + width: 2em; + text-align: center; + padding: 0.25em 0; +} +#diffstat td:nth-child(2) { + /* Filename */ + width: auto; +} +#diffstat td:nth-child(3) { + /* Separator */ + width: 2em; + text-align: center; + color: var(--fg-dim); +} +#diffstat td:nth-child(4) { + /* Changes */ + width: 3em; + text-align: right; + font-variant-numeric: tabular-nums; +} +#diffstat td:nth-child(5) { + /* +/- */ + width: auto; + color: var(--fg-dim); +} + +/* Code Blocks */ +pre { + font-family: var(--font-main); + padding: 0.8em; + overflow: auto; + background-color: var(--bg-code); + border: 1px solid var(--border-subtle); + border-radius: 2px; +} + +/* Diff (File View) */ +.i { + color: var(--diff-add); + &:hover { + color: var(--diff-add); + } +} +.d { + color: var(--diff-del); + &:hover { + color: var(--diff-del); + } +} +.h { + color: var(--diff-mod); + &:hover { + color: var(--diff-mod); + } +} +pre span.i, +pre span.d, +pre span.h { + font-weight: bold; +} + +/* Status (Log View) */ +.A { + color: var(--diff-add); + font-weight: bold; +} +.D { + color: var(--diff-del); + font-weight: bold; +} +.M { + color: var(--diff-mod); + font-weight: bold; +} +.R { + font-weight: bold; +} + +/* Blob View */ +#blob a { + color: var(--fg-dim); + &:hover { + color: var(--fg); + text-decoration: none; + } +} + +/* Metadata */ +.desc { + color: var(--fg-dim); + display: block; + margin-top: 0.2rem; +} + +/* Commits Remaining */ +#log-msg { + text-align: center; + padding: 1em 0.5em; + font-weight: bold; + color: var(--fg-dim); + border-top: 1px solid var(--border-subtle); +} + +/* --- Syntax Highlighting --- */ + +table#blob.chroma { + width: 100%; + border-collapse: collapse; + font-family: var(--font-main); + background-color: var(--bg-code); + border: 1px solid var(--border-subtle); + border-radius: 2px; + margin-top: 0; + display: table; + table-layout: fixed; +} + +@media (max-width: 684px) { + table#blob.chroma { + display: block; + overflow-x: auto; + } +} + +#blob.chroma td { + padding: 0 0.5em; + vertical-align: top; + line-height: 1.5; + border: none; +} + +/* Line Numbers */ +#blob.chroma td.num { + width: 4em; + text-align: right; + border-right: 1px solid var(--border-subtle); + background-color: var(--bg-hover); + color: var(--fg-dim); + user-select: none; + white-space: nowrap; + overflow: visible; + text-overflow: clip; +} + +#blob.chroma td.code { + width: 100%; + white-space: pre-wrap; + word-break: break-all; + padding-left: 1em; +} + +#blob.chroma td.num a { + text-decoration: none; + color: inherit; +} +#blob.chroma td.num a:hover { + color: var(--fg); +} + +/* --- Syntax Colors --- */ + +.chroma .c, +.chroma .c1, +.chroma .cs, +.chroma .cm { + color: var(--fg-dim); + font-style: italic; +} + +/* Keywords */ +.chroma .k, +.chroma .kd, +.chroma .kn, +.chroma .kp, +.chroma .kr { + color: var(--accent-alpha-70); + font-weight: bold; +} + +/* Strings */ +.chroma .s, +.chroma .sa, +.chroma .sb, +.chroma .sc, +.chroma .dl, +.chroma .sd, +.chroma .s2, +.chroma .se, +.chroma .sh, +.chroma .si, +.chroma .sx, +.chroma .sr, +.chroma .s1, +.chroma .ss { + color: var(--fg); +} + +/* Numbers */ +.chroma .m, +.chroma .mb, +.chroma .mf, +.chroma .mh, +.chroma .mi, +.chroma .il, +.chroma .mo { + color: var(--accent-alpha-70); +} + +/* Types/Classes */ +.chroma .kt, +.chroma .nc, +.chroma .no, +.chroma .nd { + color: var(--secondary); + font-weight: bold; +} + +/* Variables */ +.chroma .nv, +.chroma .vc, +.chroma .vg, +.chroma .vi { + color: var(--secondary); + font-weight: bold; +} + +/* Functions */ +.chroma .nf, +.chroma .fm { + color: var(--secondary-alpha-70); +} + +/* Tags */ +.chroma .nt { + color: var(--accent-alpha-70); +} + +/* Attributes */ +.chroma .na { + color: var(--secondary); +} + +/* Operators */ +.chroma .o, +.chroma .ow { + color: var(--accent-alpha-70); +} diff --git a/site/git/theme.nix b/site/git/theme.nix @@ -1,6 +1,6 @@ pkgs: let - baseCss = builtins.readFile ./base.css; + style = builtins.readFile ./style.css; mkTheme = name: { @@ -17,7 +17,7 @@ let diffMod, }: pkgs.writeText "style-${name}.css" '' - ${baseCss} + ${style} :root { --bg: ${bg}; --fg: ${fg}; diff --git a/site/sass/_logo.scss b/site/sass/_logo.scss @@ -6,8 +6,9 @@ border-radius: $corner-radius; color: black; display: flex; - padding: 8px 10px; + padding: 5px 10px; text-decoration: none; + font-size: 1.2em; &:hover { color: var(--accent-secondary); diff --git a/site/sass/_search.scss b/site/sass/_search.scss @@ -3,7 +3,7 @@ .search { &-container { display: inline-block; - left: 670px; + left: 666px; position: relative; top: -32px; transition: all 0.5s ease-out; diff --git a/site/static/js/clipboard.js b/site/static/js/clipboard.js @@ -2,14 +2,14 @@ document.querySelectorAll("pre > code").forEach(function (codeBlock) { var button = document.createElement("button"); button.className = "copy"; button.type = "button"; - button.innerText = " Copy"; + button.innerText = " Copy"; button.addEventListener("click", function () { navigator.clipboard.writeText(codeBlock.innerText).then( function () { button.blur(); button.innerText = "Copied!"; setTimeout(function () { - button.innerText = " Copy"; + button.innerText = " Copy"; }, 2000); }, function (error) { diff --git a/site/templates/macros/posts.html b/site/templates/macros/posts.html @@ -1,27 +1,44 @@ {% macro meta(page, list=false) %} <div class="post-meta {% if list %}meta-list{% else %}meta-page{% endif %}"> - {{ posts::date(date=page.date, updated=page.updated) }} {%- if page.date and not page.updated -%} :: {%- endif -%} {% if list %} + {{ posts::date(date=page.date, updated=page.updated) }} + {% if page.date or page.updated %} :: {% endif %} + {% if list %} <span class="post-metatitle"> <strong>@<a href="{{ page.permalink | safe }}">{{ page.title }}</a></strong> </span> {% else %} <span class="post-readtime"> <span class="post-icon"></span> <i>{{ page.reading_time }}</i> min </span> :: <span class="post-wordcount"> <span class="post-icon"></span> <i>{{ page.word_count }}</i> words </span> - {% endif %} {{ posts::taxonomies(taxonomy=page.taxonomies) }} + {% endif %} + {{ posts::taxonomies(taxonomy=page.taxonomies) }} </div> -{% endmacro meta %} {% macro date(date, updated) %} +{% endmacro meta %} +{% macro date(date, updated) %} <span class="post-date"> - {%- if date -%} <span class="post-icon"></span> {{ date | date(format="%d.%m.%Y") }} {%- endif -%} {%- if date and updated -%} <span class="post-icon">,</span> {%- endif -%} {%- if - updated -%} <span class="post-icon"></span> {{ updated | date(format="%d.%m.%Y") }} :: {%- endif -%} + {%- if updated -%} + <span class="post-icon"></span> {{ updated | date(format="%d.%m.%Y") }} + {%- if date -%} :: {%- endif -%} + {%- endif -%} + {%- if date -%} + <span class="post-icon"></span> {{ date | date(format="%d.%m.%Y") }} + {%- endif -%} </span> -{% endmacro date %} {% macro taxonomies(taxonomy) %} {% if taxonomy.series -%} -{{ posts::series(series=taxonomy.series) }} {% endif -%} {% if taxonomy.tags -%} -{{ posts::tags(tags=taxonomy.tags) }} {% endif -%} {% endmacro taxonomies %} {% -macro series(series) %} :: {% for siri in series -%} -<strong - >^<a href="{{ get_taxonomy_url(kind="series", name=siri) }}">{{ siri - }}</a></strong -> -{% endfor -%} {% endmacro series %} {% macro tags(tags) %} :: {% for tag in tags --%} #<a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a> {% endfor --%} {% endmacro tags %} +{% endmacro date %} +{% macro taxonomies(taxonomy) %} + {% if taxonomy.series -%} + :: {{ posts::series(series=taxonomy.series) }} + {% endif -%} + {% if taxonomy.tags -%} + :: {{ posts::tags(tags=taxonomy.tags) }} + {% endif -%} +{% endmacro taxonomies %} +{% macro series(series) %} + {% for serie in series -%} + <strong>^<a href="{{ get_taxonomy_url(kind="series", name=serie) }}">{{ serie }}</a></strong> + {% endfor -%} +{% endmacro series %} +{% macro tags(tags) %} + {% for tag in tags -%} + #<a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a> + {% endfor -%} +{% endmacro tags %}