alexkarle.com

Source for alexkarle.com
git clone git://git.alexkarle.com/alexkarle.com.git
Log | Files | Refs | README | LICENSE

commit 76b82ea3c3e0863cf01c1d7519371e9d69a0f12a (patch)
parent 4f35645ec9c28283bc0232c9909e6cfa309a8768
Author: Alex Karle <alex@alexkarle.com>
Date:   Wed, 30 Dec 2020 13:45:33 -0500

stagit: Remove custom CSS / setup scripts

I recently migrated to a new server and discovered that stagit itself
ships with pretty awesome example post-receive and setup (create.sh)
scripts, which I easily adapted to my installation.

Also, I went back on the gruvbox styling in favor of the default CSS
(with a small tweak for the background to be the same F5F5F5 as my site)

Diffstat:
Rstagit/logo.png -> logo.png | 0
Dstagit/post-receive | 14--------------
Dstagit/setup.sh | 36------------------------------------
Dstagit/style.css | 121-------------------------------------------------------------------------------
4 files changed, 0 insertions(+), 171 deletions(-)

diff --git a/stagit/logo.png b/logo.png Binary files differ. diff --git a/stagit/post-receive b/stagit/post-receive @@ -1,14 +0,0 @@ -#!/bin/sh -# based off of: https://rgz.ee/stagit.html -set -e -dst="/var/www/htdocs/git/$(basename "$(pwd)" '.git')" -src="$(pwd)" - -# KEY: run in background (saves a slow push) -mkdir -p "$dst" -(cd "$dst" && stagit "$src") -cp -f "$dst/log.html" "$dst/index.html" - -# Assume run as git, so $HOME has the repos -exported="$(ls $HOME/*.git/git-daemon-export-ok | sed 's/\/git-daemon-export-ok//g')" -stagit-index $exported > /var/www/htdocs/git/index.html diff --git a/stagit/setup.sh b/stagit/setup.sh @@ -1,36 +0,0 @@ -#!/bin/sh -# setup.sh -- setup repos in $HOME and index for stagit -# meant to be run as the git user, requires stagit installed - -SCRIPTDIR="$(dirname "$(readlink -f "$0")")" - -# First setup the dest -DEST=/var/www/htdocs/git -cp "$SCRIPTDIR/style.css" "$DEST" -cp "$SCRIPTDIR/logo.png" "$DEST" -cp "$SCRIPTDIR/logo.png" "$DEST/favicon.png" - -cd $HOME -for d in *.git; do - if [ -e "$d/git-daemon-export-ok" ]; then - echo "Processing $d" - - # Setup src - cp "$SCRIPTDIR/post-receive" "$d/hooks" - echo "Alex Karle" > "$d/owner" - echo "git://git.alexkarle.com/$d" > "$d/url" - - # Setup dst - base=`basename $d .git` - mkdir -p "$DEST/$base" - cp "$SCRIPTDIR/style.css" "$DEST/$base" - cp "$SCRIPTDIR/logo.png" "$DEST/$base" - cp "$SCRIPTDIR/logo.png" "$DEST/$base/favicon.png" - (cd $DEST/$base && stagit $HOME/$d) - - # Add to the list of things to index... - exported="$exported $d" - fi -done - -stagit-index $exported > $DEST/index.html diff --git a/stagit/style.css b/stagit/style.css @@ -1,121 +0,0 @@ -/* style.css -- stagit style.css, almost stock from the stagit - * only changes made were to add gruvbox colors */ -body { - color: #ebdbb2; - background-color: #282828; - font-family: "Courrier New", monospace; - font-size: 1.0em; -} - -h1, h2, h3, h4, h5, h6 { - font-size: 1.0em; - margin: 0; -} - -img, h1, h2 { - vertical-align: middle; -} - -img { - border: 0; -} - -a:target { - background-color: #504945; -} - -a.d, -a.h, -a.i, -a.line { - text-decoration: none; -} - -#blob a { - color: #458588; -} - -#blob a:hover { - color: #d79921; - text-decoration: none; -} - -a { - color: #83a598; -} - -a:hover { - color: #d79921; -} - -a:visited { - color: #458588; -} - -table thead td { - font-weight: bold; -} - -table td { - padding: 0 0.4em; -} - -#content table td { - vertical-align: top; - white-space: nowrap; -} - -#branches tr:hover td, -#tags tr:hover td, -#index tr:hover td, -#log tr:hover td, -#files tr:hover td { - background-color: #584945; -} - -#index tr td:nth-child(2), -#tags tr td:nth-child(3), -#branches tr td:nth-child(3), -#log tr td:nth-child(2) { - white-space: normal; -} - -td.num { - text-align: right; -} - -.desc { - color: #689d6a; -} - -hr { - border: 0; - border-top: 1px solid #928374; - height: 1px; -} - -pre { - font-family: "Courrier New", monospace; -} - -pre a.h { - color: #458588; -} - -.A, -span.i, -pre a.i { - color: #98971a; -} - -.D, -span.d, -pre a.d { - color: #cc241d; -} - -pre a.h:hover, -pre a.i:hover, -pre a.d:hover { - text-decoration: none; -}