diff options
| -rw-r--r-- | GNUmakefile (renamed from makefile) | 5 | ||||
| -rw-r--r-- | README (renamed from README.md) | 17 | ||||
| -rw-r--r-- | src/contact.md | 2 | ||||
| -rw-r--r-- | src/index.md | 2 | ||||
| -rw-r--r-- | static/buttons/gentoo-badge.png | bin | 3723 -> 0 bytes | |||
| -rw-r--r-- | static/buttons/girlrot.gif | bin | 5216 -> 0 bytes | |||
| -rw-r--r-- | static/stylesheet.css | 31 | ||||
| -rw-r--r-- | template.html | 34 | ||||
| -rwxr-xr-x | template.pl | 19 |
9 files changed, 76 insertions, 34 deletions
@@ -1,5 +1,3 @@ -all: build - build: $(patsubst src/%.md, out/%.html, $(shell find src -type f)) \ $(patsubst static/%, out/%, $(shell find static -type f)) \ $(patsubst src/%, out/%, $(shell find src -type f ! -name "*.md")) @@ -24,7 +22,8 @@ out/%: static/% cp $< $@ compress: build # for gzip-static, check the openbsd httpd.conf(5) man page - find out/ -type f \( -name "*.html" -o -name "*.css" \) \ +# grep -Il skips binary files + find out/ -type f -exec grep -Il . {} \; \ -exec gzip -k {} \; publish: compress build @@ -1,20 +1,18 @@ # slimegirl.nexus -my website and blog found @ https://slimegirl.nexus.\ -everything is generated from markdown with md2html and a perl script +my website and blog found @ https://slimegirl.nexus. +everything is generated from markdown with md4c and a perl script that does the templating and html post-processing work (template.pl). -## dependencies +# dependencies -build: make, perl5, Mojo::DOM, md2html (md4c)\ -dev: python3, entr\ -publish: rsync\ -a typical linux/bsd system will have most of these already. +build: gnu make, perl5, mojolicious, md2html (md4c) +dev: python3, entr +publish: rsync -## loicense +# loicense intellectual property is a spook. -``` _,_ /7/Y/^\ vuVV|C)| __ _ @@ -77,4 +75,3 @@ L>_ _-< 7/|_-__,__-)\,__)(". \_>-<_/D / |( /7||\\ ()U cUu" -```
\ No newline at end of file diff --git a/src/contact.md b/src/contact.md index 0369b87..0093e25 100644 --- a/src/contact.md +++ b/src/contact.md @@ -7,5 +7,5 @@ ## donations -monero: `83FxBRziyTQWuPKqGTesWGjLfM5Vai8QSbikur5zGHWKFc584cgmbKHjWpQoJzR9Su7NVEX9GVg23iksCKp8doBFCVSsGca` +monero: <pre>83FxBRziyTQWuPKqGTesWGjLfM5Vai8QSbikur5zGHWKFc584cgmbKHjWpQoJzR9Su7NVEX9GVg23iksCKp8doBFCVSsGca</pre> 
\ No newline at end of file diff --git a/src/index.md b/src/index.md index ac17203..8c275bb 100644 --- a/src/index.md +++ b/src/index.md @@ -3,4 +3,4 @@ ## about This is the personal website of philomena (she/her) also known as lemurianmage and azureazure in other places. My interests include mathematics, philosophy, -C, Unix, Lisp and electrical engineering. My paws are big and my tail is fluffy.
\ No newline at end of file +C, UNIX, Lisp and electrical engineering. My paws are big and my tail is fluffy.
\ No newline at end of file diff --git a/static/buttons/gentoo-badge.png b/static/buttons/gentoo-badge.png Binary files differdeleted file mode 100644 index 971ffe2..0000000 --- a/static/buttons/gentoo-badge.png +++ /dev/null diff --git a/static/buttons/girlrot.gif b/static/buttons/girlrot.gif Binary files differdeleted file mode 100644 index 8e18810..0000000 --- a/static/buttons/girlrot.gif +++ /dev/null diff --git a/static/stylesheet.css b/static/stylesheet.css index df916fb..80240d8 100644 --- a/static/stylesheet.css +++ b/static/stylesheet.css @@ -1,11 +1,16 @@ +* +{ + color-scheme: light dark; +} + body { - background-color: white; - color: black; max-width: 80ch; margin: auto; - font-family: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', sans-serif; + font-family: serif; font-size: 1.2em; + overflow: hidden; + padding: 0 1em; } nav { text-align: center; } @@ -16,7 +21,7 @@ hr border-bottom: 1px dashed; } -img +article img { display: block; margin: auto; @@ -24,13 +29,15 @@ img margin-bottom: 1em; } -@media (prefers-color-scheme: dark) +footer { - body - { - background-color: #1e1f21; - color: #eeeff1; - } - :link { color: #bad7ff; } - :visited { color: #f6baff; } + text-align: center; + font-size: 0.9em; } + +pre +{ + overflow: scroll; +} + +a { text-decoration: none; } diff --git a/template.html b/template.html index f85cd94..37f314e 100644 --- a/template.html +++ b/template.html @@ -9,14 +9,42 @@ <body> <h2> <nav> - <a href="/">HOME</a> + <a href="/">home</a> / - <a href="..">UP</a> + <a href=".." id="go-up">go up</a> </nav> </h2> <article></article> <hr> - <address><a href="contact.html">contact</a></address> + + <footer> + <address><a href="contact.html">contact</a></address> + <br> + <a href="https://www.gnu.org/software/emacs/"> + <img src="/buttons/emacs.png" title="emacs"> + </a> + <a href="https://kittenlikeasmallcat.neocities.org"> + <img src="/buttons/kitten.gif" title="kittenlikeasmallcat"> + </a> + <a href="https://quasivoid.net"> + <img src="/buttons/quasivoid.gif" title="vivienne"> + </a> + <a href="https://unlife.nyx.land"> + <img src="/buttons/unlife.png" title="nyx"> + </a> + <a href="https://social.xenofem.me"> + <img src="/buttons/xnfm.png" title="xenofem.me"> + </a> + <a href="https://secondshell.net"> + <img src="/buttons/secondshell.webp" title="secondshell"> + </a> + <a href="https://twinningl00m.neocities.org"> + <img src="/buttons/murrumurgreen.png" title="twinningl00m"> + </a> + <a href="https://magentahardcore.com"> + <img src="/buttons/n1l.gif" title="n1l"> + </a> + </footer> </html> diff --git a/template.pl b/template.pl index 747ac7c..651d7aa 100755 --- a/template.pl +++ b/template.pl @@ -1,15 +1,16 @@ #!/usr/bin/env perl -# this script is generally responsible for all html postprocessing that md2html can't do +# this script is generally responsible for all html postprocessing use v5.39; use utf8; use autodie; use Mojo::DOM; +use File::Basename; my $template = do { - local $/ = undef; + local $/; open my $fh, '<', 'template.html'; <$fh>; }; @@ -17,16 +18,26 @@ my $template = do { my $dom = Mojo::DOM->new($template); my $content = `md2html $ARGV[0]`; + # inject content @ <article> -$dom->at('article')->append_content($content); +$dom->at('article')->content($content); # replace <title> with the contents of the first <h1> +# also append a <hr> after the first <h1> my $title_dom = $dom->at('h1'); $dom->at('title')->content($title_dom->text) if ($title_dom); +$title_dom->append('<hr>'); + +# makes the up button go up a directory +my $parent = dirname $ARGV[0]; +$parent =~ s/^(?:.+?)(\/.*)/$1/; +$parent = dirname $parent if (basename($ARGV[0]) eq 'index.md' or $parent eq "src"); +$dom->at('#go-up')->attr(href => $parent); +# give title the same contents as alt if it exists for my $img ($dom->find('img')->each) { my $alt = $img->attr('alt'); - $img->attr(title => $alt); + $img->attr(title => $alt) if ($alt); } say "$dom"; |
