diff options
| -rwxr-xr-x | include/mkman | 39 | ||||
| -rw-r--r-- | src/index.gsp | 1 | ||||
| -rw-r--r-- | src/man/index.gsp | 39 | ||||
| -rw-r--r-- | src/man/links | 13 | ||||
| -rw-r--r-- | src/man/style.css | 115 | ||||
| -rw-r--r-- | src/style.css | 8 | 
6 files changed, 212 insertions, 3 deletions
| diff --git a/include/mkman b/include/mkman new file mode 100755 index 0000000..30250eb --- /dev/null +++ b/include/mkman @@ -0,0 +1,39 @@ +#!/usr/local/bin/andy + +func dl link { +	set man `basename $link +	set dst out/man/$man + +	mkdir -p $dst +	set name `echo $man | sed -E 's/(.*)\.(.)/\U\1(\2)/' +	{ +		echo "header { div { h1 {-$name Manual Page}" +		cat include/nav.gsp +		echo "}} hr{}" +	} | gsp -d | read head +	curl -LSs $link +	| mandoc -Thtml -Ostyle=/man/style.css +	| awk -v head=$head ' +		!/^<body>/ +		 /^<body>/ { print $0, head } +	' >!$dst/index.html + +	printf 'li {a href="%s" {-%s — %s}}\n' ( +		$man +		`printf $name | tr A-Z a-z +		`htmlq -t .Nd <$dst/index.html | tr -d \n | tr -s ' ' +	) +} + +cd `dirname $args[0] +cd .. + +if ! test -f src/man/links { +	set argv0 `basename $args[0] +	echo "$argv0: Links file does not exist" >/dev/stderr +	exit 1 +} + +while read -d\n -n1 _ { +	dl $_ +} <src/man/links | sort diff --git a/src/index.gsp b/src/index.gsp index b9fa5a4..b519b5e 100644 --- a/src/index.gsp +++ b/src/index.gsp @@ -41,6 +41,7 @@ html lang="en" {  			}  			ul { +				li {a href="man"  {-Manual Pages}}  				li {a href="prj"  {-Documentation}}  				li {a href="blog" {-Blog Posts}}  				li {a href="www"  {-Other Websites}} diff --git a/src/man/index.gsp b/src/man/index.gsp new file mode 100644 index 0000000..8da15dc --- /dev/null +++ b/src/man/index.gsp @@ -0,0 +1,39 @@ +html lang="en" { +	head { m4_include(head.gsp) } +	body { +		header { +			div { +				h1 {-Manual Pages} +				m4_include(nav.gsp) +			} + +			figure .quote { +				blockquote .de { +					p {= +						Alles Große und Gescheite existiert in der Minorität.  Es ist nie +						daran zu denken, dass die Vernunft populär werde.  Leidenschaft und +						Gefühle mögen populär werden, aber die Vernunft wird immer nur im +						Besitze einzelner Vorzüglicher sein. +					} +				} +				figcaption {-Johann Wolfgang von Goethe} +			} +		} + +		main { +			p {- +				In this section of the website you can find the manual pages for all my +				command-line utilities, C library functions, and more. +			} + +			p {-Manuals:} +			ul { +				m4_esyscmd(mkman) +			} +		} + +		hr{} + +		footer { m4_footer } +	} +} diff --git a/src/man/links b/src/man/links new file mode 100644 index 0000000..0597a57 --- /dev/null +++ b/src/man/links @@ -0,0 +1,13 @@ +https://git.sr.ht/~mango/center/blob/master/center.1 +https://git.sr.ht/~mango/grab/blob/master/grab.1 +https://git.sr.ht/~mango/gsp/blob/master/gsp.1 +https://git.sr.ht/~mango/gsp/blob/master/gsp.5 +https://git.sr.ht/~mango/liblux/blob/master/man/lux.3 +https://git.sr.ht/~mango/liblux/blob/master/man/luxget.3 +https://git.sr.ht/~mango/liblux/blob/master/man/luxinit.3 +https://git.sr.ht/~mango/liblux/blob/master/man/luxset.3 +https://git.sr.ht/~mango/lux/blob/master/lux.1 +https://git.sr.ht/~mango/mkpass/blob/master/mkpass.1 +https://git.sr.ht/~mango/mmv/blob/master/mmv.1 +https://git.sr.ht/~mango/ordinal/blob/master/ordinal.1 +https://git.sr.ht/~mango/totp/blob/master/totp.1 diff --git a/src/man/style.css b/src/man/style.css new file mode 100644 index 0000000..f1367e2 --- /dev/null +++ b/src/man/style.css @@ -0,0 +1,115 @@ +:root { +	--serif: serif; +	--mono: 'Iosevka Smooth'; +	--bg: #1D1F21; +	--fg: #C5C8C6; +	--accent: #DE935F; +} + +@font-face { +	font-family: 'Iosevka Smooth'; +	src: url('/fonts/iosevka-regular.woff2') format('woff2'); +	font-weight: normal; +	font-style: normal; +} + +@font-face { +	font-family: 'Iosevka Smooth'; +	src: url('/fonts/iosevka-italic.woff2') format('woff2'); +	font-weight: normal; +	font-style: italic; +} + +*, *::before, *::after { +	box-sizing: border-box; +} + +html { +	margin: 0 auto; +	max-width: min(800px, 90%); +} + +body { +	font-family: var(--serif); +	font-variant-numeric: lining-nums; +	text-align: justify; +	color: var(--fg); +	background-color: var(--bg); +	tab-size: 4; +} + +header > div { +	display: flex; +	justify-content: space-between; +	align-items: center; +} + +header > div menu { +	display: flex; +	gap: 2ch; +} + +header > div li { +	list-style: none; +} + +hr { +	margin-block: 4ch; +} + +h1 { +	font-size: 1.8rem; +	margin-bottom: 0; +} + +h2 { +	font-size: 1.2em; +} + +a { +	color: var(--accent); +} + +a:hover { +	text-decoration: none; +} + +pre, code, kbd, samp { +	font-family: var(--mono); +	font-size: 0.9em; +} + +code { +	white-space: nowrap; +} + +.head, .foot { +	display: flex; +	justify-content: space-between; +} + +.tbl { +	width: 100%; +	border-spacing: 0; +	border-collapse: collapse; +	border-width: 1px; +} + +.tbl :is(tr, td) { +	border-width: 1px; +} + +.tbl + .tbl { +	margin-block: 1em; +} + +.tbl td { +	padding-inline: 8px; +} + +@media (min-width: 800px) { +	body { +		font-size: 1.3rem; +		line-height: 1.5; +	} +} diff --git a/src/style.css b/src/style.css index 70419ed..19a32ab 100644 --- a/src/style.css +++ b/src/style.css @@ -63,9 +63,11 @@ h2                 { font-size: 1.2rem; }  a       { color: var(--accent);  }  a:hover { text-decoration: none; } -blockquote > p:first-child::before  { content: '‘';  } -blockquote > p:last-child::after    { content: '’';  } -blockquote + figcaption::before     { content: '— '; } +blockquote    > p:first-child::before  { content: '‘';  } +blockquote    > p:last-child::after    { content: '’';  } +blockquote.de > p:first-child::before  { content: '„';  } +blockquote.de > p:last-child::after    { content: '“';  } +blockquote    + figcaption::before     { content: '— '; }  blockquote, blockquote + figcaption { font-style: italic; } |