stagit

Fork of `stagit` for git.knutsen.co.
git clone git://git.knutsen.co/stagit
Log | Files | Refs | README | LICENSE

commit c4f46c3f9ccded868ccc32b2aaac89cf40d9b196
parent dd32948ba00cb30c852de72260255a5ebb24ccff
Author: Demonstrandum <moi@knutsen.co>
Date:   Wed,  1 Jul 2020 16:52:20 +0100

Use local stagit build.

Diffstat:
Mrepo-gen.sh | 14++++++++++----
Mstyle.css | 33++++++++++++++++++++++++++++++++-
2 files changed, 42 insertions(+), 5 deletions(-)

diff --git a/repo-gen.sh b/repo-gen.sh @@ -6,22 +6,28 @@ for arg in "$@"; do [ "$arg" = "--fresh" ] && fresh=true done +STAGIT=/var/www/git/stagit +[ ! -f "$STAGIT" ] && STAGIT=stagit + +STAGIT_INDEX=/var/www/git/stagit-index +[ ! -f "$STAGIT_INDEX" ] && STAGIT_INDEX=stagit-index + for repo in /srv/git/*.git; do repo="$(basename "$repo" | cut -f 1 -d '.')" - + [ "$fresh" = true ] \ && echo "Deleting HTML for $repo." \ && rm -fr "/var/www/git/$repo" mkdir -p "/var/www/git/$repo" cd "/var/www/git/$repo" - + [ ! -f style.css ] && ln -s ../style.css ./ [ ! -f favicon.png ] && ln -s ../favicon.png ./ [ ! -f logo.png ] && ln -s ../logo.png ./ echo "git://git.knutsen.co/$repo" > "/srv/git/$repo.git/url" - stagit "/srv/git/$repo.git" + "$STAGIT" "/srv/git/$repo.git" done -stagit-index /srv/git/*.git > /var/www/git/index.html +"$STAGIT_INDEX" /srv/git/*.git > /var/www/git/index.html diff --git a/style.css b/style.css @@ -1,7 +1,14 @@ +html { + font-size: 12px; + height: 100%; +} + body { - color: #000; + margin: 5rem auto; + color: #222; background-color: #fff; font-family: monospace; + width: 66rem; } h1, h2, h3, h4, h5, h6 { @@ -28,6 +35,14 @@ a.line { text-decoration: none; } +.loc { + margin-left: 0.9em; +} + +.line { + user-select: none; +} + #blob a { color: #777; } @@ -104,3 +119,19 @@ pre a.i:hover, pre a.d:hover { text-decoration: none; } + +.url td:nth-child(2) { + padding-top: 0.2em; + padding-bottom: 0.9em; +} + +.url td:nth-child(2) span { + padding: 1px 5px 2px 5px; + background-color: #eee; + border: 1px solid #ddd; + border-radius: 5px; +} + +.url td:nth-child(2) span a { + color: #444; +}