From 78ebe65e0d8a5dc06d4be04698d3dcd933b75614 Mon Sep 17 00:00:00 2001 From: Caine Date: Thu, 26 Mar 2026 22:40:15 +0000 Subject: Initial theme: dark palette with warm amber/gold accents --- README.md | 23 ++++ cgit.css | 366 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 389 insertions(+) create mode 100644 README.md create mode 100644 cgit.css diff --git a/README.md b/README.md new file mode 100644 index 0000000..798635e --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# cgit-theme + +Custom dark theme for cgit on git.tomflux.xyz. + +## Palette + +| Hex | Role | +|-----|------| +| `#333543` | Background | +| `#fbc997` | Primary text | +| `#b78760` | Secondary/muted | +| `#c89931` | Links (gold) | +| `#ec8499` | Highlights (pink) | +| `#a459b7` | File paths (purple) | +| `#618b50` | Additions (green) | +| `#5b64c5` | Branches/refs (indigo) | +| `#ff5638` | Deletions/warnings (red) | + +## Install + +```bash +sudo cp cgit.css /usr/share/cgit/cgit.css +``` diff --git a/cgit.css b/cgit.css new file mode 100644 index 0000000..9b51764 --- /dev/null +++ b/cgit.css @@ -0,0 +1,366 @@ +/* + * cgit custom theme + * Palette: #333543 #fbc997 #b78760 #c89931 #ec8499 #a459b7 #618b50 #5b64c5 #ff5638 + */ + +/* ── Reset & Base ── */ +* { box-sizing: border-box; } + +body { + margin: 0; + padding: 0; + font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace; + font-size: 14px; + line-height: 1.6; + color: #fbc997; + background: #333543; +} + +a { color: #c89931; text-decoration: none; } +a:hover { color: #fbc997; text-decoration: underline; } + +/* ── Layout ── */ +div#cgit { + max-width: 1100px; + margin: 0 auto; + padding: 20px 30px; +} + +/* ── Header / Logo ── */ +table#header { + width: 100%; + border: none; + margin-bottom: 10px; +} + +table#header td.logo { + display: none; /* hide default logo */ +} + +table#header td.main { + padding: 0; +} + +table#header td.main .header { + font-size: 1.6em; + font-weight: bold; + color: #fbc997; +} + +table#header td.sub { + color: #b78760; + font-size: 0.85em; +} + +/* ── Navigation / Tabs ── */ +table#header td.form { + padding: 8px 0; +} + +table#header td.form form { + text-align: right; +} + +table#header td.form input, +table#header td.form select { + background: #2a2c3a; + color: #fbc997; + border: 1px solid #b78760; + padding: 4px 8px; + border-radius: 3px; + font-family: inherit; + font-size: 0.9em; +} + +table#header td.form input:focus, +table#header td.form select:focus { + border-color: #c89931; + outline: none; +} + +div.path { + color: #a459b7; + margin: 8px 0; + font-size: 0.95em; +} + +div.path a { color: #a459b7; } +div.path a:hover { color: #ec8499; } + +/* ── Content Tables ── */ +table.list { + width: 100%; + border-collapse: collapse; + margin: 10px 0; +} + +table.list tr { border-bottom: 1px solid #2a2c3a; } +table.list tr:hover { background: #2a2c3a; } + +table.list th { + text-align: left; + padding: 8px 10px; + color: #b78760; + font-weight: normal; + font-size: 0.8em; + text-transform: uppercase; + letter-spacing: 0.05em; + border-bottom: 2px solid #b78760; +} + +table.list td { + padding: 6px 10px; + vertical-align: top; +} + +table.list td a { color: #c89931; } +table.list td a:hover { color: #fbc997; } + +table.list td.sublevel-repo { padding-left: 30px; } + +/* Age column */ +table.list td span.age-days, +table.list td span.age-hours, +table.list td span.age-mins { + color: #618b50; +} + +table.list td span.age-weeks, +table.list td span.age-months { + color: #b78760; +} + +table.list td span.age-years { + color: #ff5638; +} + +/* ── Repo page tabs ── */ +ul.tabs { + list-style: none; + padding: 0; + margin: 15px 0 5px; + display: flex; + gap: 0; + border-bottom: 2px solid #b78760; +} + +ul.tabs li { + margin: 0; +} + +ul.tabs li a { + display: block; + padding: 6px 16px; + color: #b78760; + border: 1px solid transparent; + border-bottom: none; + border-radius: 4px 4px 0 0; + margin-bottom: -2px; +} + +ul.tabs li a:hover { + color: #fbc997; + background: #2a2c3a; + text-decoration: none; +} + +ul.tabs li.tab-selected a, +ul.tabs li a.active { + color: #fbc997; + background: #333543; + border-color: #b78760; + border-bottom-color: #333543; +} + +/* ── Commit Log ── */ +div.commit-subject { color: #fbc997; font-weight: bold; } +div.commit-msg { color: #b78760; white-space: pre-wrap; } +div.commit-info { color: #b78760; font-size: 0.9em; } + +table.commit-info { + margin: 10px 0; + border-collapse: collapse; +} + +table.commit-info td { + padding: 3px 10px 3px 0; + color: #b78760; +} + +table.commit-info td.label { + font-weight: bold; + color: #fbc997; +} + +table.commit-info td.sha1 a { color: #5b64c5; } + +span.age { color: #b78760; } + +/* ── Diff ── */ +table.diff { + width: 100%; + border-collapse: collapse; +} + +table.diff td { + font-family: inherit; + font-size: 0.9em; + padding: 1px 8px; + white-space: pre-wrap; +} + +div.diff-info { + color: #b78760; + padding: 8px 0; + border-bottom: 1px solid #2a2c3a; +} + +div.diffstat-header { color: #fbc997; font-weight: bold; margin: 10px 0 5px; } + +table.diffstat { + border-collapse: collapse; + margin: 5px 0 15px; +} + +table.diffstat td { + padding: 2px 6px; +} + +table.diffstat td.mode { color: #b78760; } +table.diffstat td span.add { color: #618b50; } +table.diffstat td span.del { color: #ff5638; } +table.diffstat td span.upd { color: #5b64c5; } + +/* Line-level diff */ +div.diff td.add { color: #618b50; background: rgba(97, 139, 80, 0.1); } +div.diff td.del { color: #ff5638; background: rgba(255, 86, 56, 0.1); } +div.diff td.hunk { + color: #5b64c5; + background: rgba(91, 100, 197, 0.1); + font-weight: bold; +} + +td.linenumbers a { color: #b78760; } +td.linenumbers a:hover { color: #fbc997; } + +/* ── Tree / Blob ── */ +table.blob { + width: 100%; + border-collapse: collapse; +} + +table.blob td { + font-family: inherit; + font-size: 0.9em; + padding: 1px 8px; +} + +table.blob td.linenumbers { color: #b78760; user-select: none; } +table.blob td.lines { color: #fbc997; white-space: pre-wrap; } + +div.ls-dir a { color: #5b64c5; font-weight: bold; } +div.ls-blob a { color: #c89931; } + +/* ── Refs / Branches / Tags ── */ +span.branch-deco, +span.tag-deco, +span.remote-deco, +span.deco { + font-size: 0.8em; + padding: 2px 6px; + border-radius: 3px; + margin-left: 6px; + font-weight: bold; +} + +span.branch-deco { + background: rgba(91, 100, 197, 0.2); + color: #5b64c5; + border: 1px solid #5b64c5; +} + +span.tag-deco { + background: rgba(200, 153, 49, 0.2); + color: #c89931; + border: 1px solid #c89931; +} + +span.remote-deco { + background: rgba(164, 89, 183, 0.2); + color: #a459b7; + border: 1px solid #a459b7; +} + +span.head-deco { + background: rgba(236, 132, 153, 0.2); + color: #ec8499; + border: 1px solid #ec8499; +} + +/* ── Stats ── */ +div.cgit-panel table { + border-collapse: collapse; +} + +div.cgit-panel td { + padding: 3px 8px; + color: #b78760; +} + +/* ── Footer ── */ +div.footer { + text-align: center; + color: #b78760; + font-size: 0.8em; + margin-top: 30px; + padding-top: 10px; + border-top: 1px solid #2a2c3a; +} + +div.footer a { color: #b78760; } + +/* ── Misc ── */ +div.error { color: #ff5638; font-weight: bold; } + +div.content { margin: 10px 0; } + +table.tabs td { padding: 0; } + +textarea { + background: #2a2c3a; + color: #fbc997; + border: 1px solid #b78760; + font-family: inherit; + border-radius: 3px; + padding: 8px; +} + +/* Highlighted rows */ +tr.logheader { background: #2a2c3a; } + +/* Summary page desc */ +div.readme { color: #fbc997; line-height: 1.7; } +div.readme h1, div.readme h2, div.readme h3 { color: #fbc997; } +div.readme code { + background: #2a2c3a; + padding: 2px 5px; + border-radius: 3px; + color: #ec8499; +} +div.readme pre { + background: #2a2c3a; + padding: 12px; + border-radius: 4px; + overflow-x: auto; + border: 1px solid #b78760; +} + +/* Section headers */ +div.section-header { + font-size: 1.1em; + font-weight: bold; + color: #fbc997; + padding: 8px 0; + border-bottom: 1px solid #b78760; + margin: 15px 0 10px; +} -- cgit v1.2.3