# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## What This Is A custom cgit theme for git.danix.xyz. cgit is a static-feeling git web frontend written in C that generates HTML server-side. This repo contains the theme files only — no build step, no package manager. ## Files - `cgit.css` — main stylesheet; covers all cgit page types - `head.html` — injected into cgit's `
`: font imports + CSS link - `footer.html` — injected as cgit's footer - `syntax-highlight.py` — cgit `source-filter` script; Pygments-based, must stay executable (`chmod +x`) - `images/lampD.png` — logo (sourced from `../danix.xyz-hacker-theme/static/images/`) - `cgitrc.example` — deployment reference; not used at runtime ## Design System Colors, fonts, and token colors are derived from `../danix2-hugo-theme/assets/css/main.css` and `../danix2-hugo-theme/assets/css/chroma-custom.css`. Do not introduce colors or fonts that aren't in those files. | Role | Value | |------|-------| | `--bg` | `#060b10` | | `--accent` | `#a855f7` | | `--accent2` | `#00ff88` | | `--text` | `#c4d6e8` | | Headings | Oxanium | | Prose | IBM Plex Sans | | Code/hashes/filenames | JetBrains Mono | | Syntax tokens | Catppuccin Macchiato | ## cgit HTML Selectors (critical) cgit generates fixed HTML. Key selectors used in `cgit.css`: | Element | Selector | |---------|----------| | Outer wrapper | `div#cgit` | | Header table | `table#header` | | Logo cell | `td.logo` | | Site name cell | `td.main` | | Nav tabs | `table.tabs` | | Breadcrumb | `div.path` | | Main content | `div.content` | | All list tables | `table.list` | | Section header rows | `tr.nohover-highlight td.reposection` | | Repo name cells | `td.toplevel-repo`, `td.sublevel-repo` | | Diff table | `table.diff` | | Diff added rows | `tr.add` / `td.add` | | Diff removed rows | `tr.del` / `td.del` | | Hunk headers | `div.hunk` | | Blob table | `table.blob` | | Line number cell | `td.linenumbers` | | Code cell | `td.lines` | | Footer | `div.footer` | If cgit's generated markup ever differs (version-dependent), inspect the live HTML first before changing selectors. ## Syntax Highlighting `syntax-highlight.py` is a cgit `source-filter`. cgit calls it as: ``` syntax-highlight.py