gitserver

self-hosted git server tooling
git clone https://git.ryansepassi.com/git/gitserver.git
Log | Files | Refs | README

commit 17fe438f6532990e17fa8fd5363657e6eb529c9f
parent 166734e6b1424c2764d137d59005f8ab0f48eaab
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Sat, 18 Apr 2026 20:16:31 -0700

css + md formatting

Diffstat:
Massets/style.css | 19+++++++++++++++++++
Mbin/stagit-update | 2+-
2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/assets/style.css b/assets/style.css @@ -1,3 +1,4 @@ +html { color-scheme: light dark; } body { font-family: monospace; margin: 2em auto; max-width: 70em; padding: 0 1em; color: #222; } a { color: #06c; text-decoration: none; } a:hover { text-decoration: underline; } @@ -26,3 +27,21 @@ img { max-width: 100%; } #md table { margin: 0.6em 0; } #md th, #md td { border: 1px solid #ddd; } #md hr { margin: 1.5em 0; } + +@media (prefers-color-scheme: dark) { + body { background: #111; color: #ddd; } + a { color: #6db3ff; } + hr { border-top-color: #333; } + .desc { color: #999; } + .url, .linecount, .O { color: #777; } + .A { color: #7ee787; } + .D { color: #ff7b72; } + .H { background: #222; } + #md h1 { border-bottom-color: #333; } + #md h2 { border-bottom-color: #2a2a2a; } + #md code { background: #1d1d1d; } + #md pre { background: #1d1d1d; } + #md blockquote { border-left-color: #333; color: #999; } + #md th, #md td { border-color: #333; } + img { opacity: 0.9; } +} diff --git a/bin/stagit-update b/bin/stagit-update @@ -36,7 +36,7 @@ render_markdown() { rel=${html#"$out/file/"} rel=${rel%.html} tmp=$(mktemp) - if git --git-dir="$repo" show "HEAD:$rel" 2>/dev/null | md2html > "$tmp" 2>/dev/null; then + if git --git-dir="$repo" show "HEAD:$rel" 2>/dev/null | md2html --github > "$tmp" 2>/dev/null; then awk -v mdfile="$tmp" ' /<pre id="blob">/ { print "<div id=\"md\">"