summary refs log tree commit diff
path: root/www/git.causal.agency
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--www/git.causal.agency/.gitignore3
-rw-r--r--www/git.causal.agency/Makefile18
-rw-r--r--www/git.causal.agency/about-filter.sh15
-rw-r--r--www/git.causal.agency/cgitrc27
-rw-r--r--www/git.causal.agency/custom.css87
-rw-r--r--www/git.causal.agency/source-filter.sh3
6 files changed, 153 insertions, 0 deletions
diff --git a/www/git.causal.agency/.gitignore b/www/git.causal.agency/.gitignore
new file mode 100644
index 00000000..8d20f25d
--- /dev/null
+++ b/www/git.causal.agency/.gitignore
@@ -0,0 +1,3 @@
+about-filter
+hi
+source-filter
diff --git a/www/git.causal.agency/Makefile b/www/git.causal.agency/Makefile
new file mode 100644
index 00000000..28e08ba5
--- /dev/null
+++ b/www/git.causal.agency/Makefile
@@ -0,0 +1,18 @@
+ETC = /usr/local/etc
+WWW = /usr/local/www/cgit
+LIBEXEC = /usr/local/libexec
+
+BIN = ../../bin
+BINS = about-filter source-filter hi
+
+install: cgitrc custom.css ${BINS}
+	install -m 644 cgitrc ${ETC}
+	install -m 644 custom.css ${WWW}
+	install ${BINS} ${LIBEXEC}
+
+hi: ${BIN}/hi.c
+	${MAKE} -C ${BIN} $@
+	cp ${BIN}/$@ $@
+
+clean:
+	rm -f ${BINS}
diff --git a/www/git.causal.agency/about-filter.sh b/www/git.causal.agency/about-filter.sh
new file mode 100644
index 00000000..d27d2d48
--- /dev/null
+++ b/www/git.causal.agency/about-filter.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+options=fragment,man=%N.%S,includes=../tree/%I
+
+case "$1" in
+	(README.[1-9])
+		exec /usr/bin/mandoc -T html -O $options
+		;;
+	(*.[1-9])
+		exec /usr/bin/mandoc -T html -O $options,toc
+		;;
+	(*)
+		exec /usr/local/libexec/hi -l text -f html
+		;;
+esac
diff --git a/www/git.causal.agency/cgitrc b/www/git.causal.agency/cgitrc
new file mode 100644
index 00000000..c187e1ee
--- /dev/null
+++ b/www/git.causal.agency/cgitrc
@@ -0,0 +1,27 @@
+root-title=causal agency
+root-desc=“then I'm sorry, no offence, but you write toy programs.”
+
+clone-url=https://$HTTP_HOST/$CGIT_REPO_URL
+snapshots=tar.gz zip
+
+enable-blame=1
+enable-commit-graph=1
+enable-subject-links=1
+enable-follow-links=1
+enable-index-owner=0
+repository-sort=age
+branch-sort=age
+
+css=/custom.css
+email-filter=/usr/local/libexec/cgit-email
+about-filter=/usr/local/libexec/about-filter
+source-filter=/usr/local/libexec/source-filter
+
+readme=:README.7
+readme=:README
+
+remove-suffix=1
+enable-git-config=1
+scan-path=/home/june/pub
+
+cache-size=1024
diff --git a/www/git.causal.agency/custom.css b/www/git.causal.agency/custom.css
new file mode 100644
index 00000000..802882d2
--- /dev/null
+++ b/www/git.causal.agency/custom.css
@@ -0,0 +1,87 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
+
+@import url("cgit.css");
+
+* { line-height: 1.25em; }
+
+div#cgit {
+	max-width: 117ch;
+	margin: auto;
+	font-family: monospace;
+	-moz-tab-size: 4;
+	tab-size: 4;
+}
+
+div#cgit table#header td.logo {
+	display: none;
+}
+div#cgit table#header td.sub {
+	border-top: none;
+}
+div#cgit table.tabs {
+	border-bottom: none;
+}
+div#cgit div.content {
+	border-bottom: none;
+}
+div#cgit table.list th a {
+	color: inherit;
+}
+div#cgit table.list tr:nth-child(even) {
+	background: inherit;
+}
+div#cgit table.list tr:hover {
+	background: inherit;
+}
+div#cgit table.list tr.nohover-highlight:hover:nth-child(even) {
+	background: inherit;
+}
+
+div#cgit table.blob td.linenumbers a:target {
+	color: goldenrod;
+	text-decoration: underline;
+	outline: none;
+}
+
+div#cgit div#summary {
+	max-width: 80ch;
+}
+
+/* from hi(1) */
+div#cgit .hi.Keyword { color: dimgray; }
+div#cgit .hi.Macro { color: green; }
+div#cgit .hi.Tag { color: inherit; text-decoration: underline; }
+div#cgit .hi.String { color: teal; }
+div#cgit .hi.Format { color: teal; font-weight: bold; }
+div#cgit .hi.Interp { color: olive; }
+div#cgit .hi.Comment { color: navy; }
+div#cgit .hi.Todo { color: navy; font-weight: bold; }
+div#cgit .hi.DiffOld { color: red; }
+div#cgit .hi.DiffNew { color: green; }
+div#cgit .hi.Tag:target { color: goldenrod; outline: none; }
+
+/* from mandoc(1) */
+table.head, table.foot { width: 100%; }
+td.head-rtitle, td.foot-os { text-align: right; }
+td.head-vol { text-align: center; }
+div.Pp { margin: 1ex 0ex; }
+div.Nd, div.Bf, div.Op { display: inline; }
+span.Pa, span.Ad { font-style: italic; }
+span.Ms { font-weight: bold; }
+dl.Bl-diag > dt { font-weight: bold; }
+code.Nm, code.Fl, code.Cm, code.Ic, code.In, code.Fd, code.Fn,
+code.Cd { font-weight: bold; font-family: inherit; }
+
+h1.Sh { font-size: 1.5em; }
+table.Nm td:first-child { padding-right: 1ch; }
+code.Fl { white-space: nowrap; }
+span.RsT { font-style: italic; }
+dl.Bl-tag:not(.Bl-compact) dt { margin-top: 1em; }
+ul.Bl-bullet:not(.Bl-compact) li { margin-top: 1em; }
+div.Bd-indent { margin-left: 4ch; }
+table.Bl-column { width: 100%; }
+table.foot { margin-top: 1em; }
+
+div#cgit a.permalink { color: inherit; }
diff --git a/www/git.causal.agency/source-filter.sh b/www/git.causal.agency/source-filter.sh
new file mode 100644
index 00000000..4febc2e0
--- /dev/null
+++ b/www/git.causal.agency/source-filter.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec /usr/local/libexec/hi -t -n "$1" -f html -o anchor