From f956f998a2db10fc4ac6486d8df958034ae9d53a Mon Sep 17 00:00:00 2001 From: afiw Date: Wed, 11 Feb 2026 13:36:33 +0100 Subject: [PATCH] Initial commit --- .gitignore | 2 + README.org | 4 ++ assets/style.css | 43 +++++++++++++++++++ haunt.scm | 88 ++++++++++++++++++++++++++++++++++++++ static/contact/index.sxml | 10 +++++ static/index.sxml | 13 ++++++ static/projects/index.sxml | 13 ++++++ 7 files changed, 173 insertions(+) create mode 100644 .gitignore create mode 100644 README.org create mode 100644 assets/style.css create mode 100644 haunt.scm create mode 100644 static/contact/index.sxml create mode 100644 static/index.sxml create mode 100644 static/projects/index.sxml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a990195 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +out +dist diff --git a/README.org b/README.org new file mode 100644 index 0000000..76c1163 --- /dev/null +++ b/README.org @@ -0,0 +1,4 @@ +* Copyleft + +All content on this website may be assumed to be licensed under the Creative Commons Attribution–ShareAlike +license, version 4.0, unless specified otherwise. diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..efe6864 --- /dev/null +++ b/assets/style.css @@ -0,0 +1,43 @@ +html { + font-size: 100%; } + +h1 { + font-size: 2rem; } + +h2 { + font-size: 1.6rem; } + +h3 { + font-size: 1.2rem; } + +small { + font-size: 0.8rem; } + +body { + font-family: "Terminus", monospace; } + +@media screen { + body { + padding-left: 1em; + padding-right: 1em; } } + +@media screen and (min-width: 768px) { + body { + padding-left: 5em; + padding-right: 5em; } } + +a { + color: hotpink; } + +@media (prefers-color-scheme: light) { + body { + color: black; + background-color: white; } } + +@media (prefers-color-scheme: dark) { + body { + color: white; + background-color: black; } } + +address { + display: inline; } diff --git a/haunt.scm b/haunt.scm new file mode 100644 index 0000000..8540d57 --- /dev/null +++ b/haunt.scm @@ -0,0 +1,88 @@ +(use-modules (haunt asset) + (haunt builder blog) + (haunt builder atom) + (haunt builder assets) + (haunt builder rss) + (haunt builder flat-pages) + (haunt post) + (haunt publisher rsync) + (haunt reader) + (haunt site) + (srfi srfi-19)) + +(define (my-layout site title sxml) + `((doctype HTML) + (html + (@ (lang "en")) + (head + (meta (@ (http-equiv "Content-Type") (content "text/html; charset=utf-8"))) + (meta (@ (http-equiv "Content-Security-Policy") (content "default-src 'self';"))) + (meta (@ (name "viewport") (content "width=device-width, initial-scale=1.0"))) + (meta (@ (name "description") (content ,(site-title site)))) + (meta (@ (name "color-scheme") (content "light dark"))) + (link (@ (href "/~afiw/assets/style.css") (rel "stylesheet") (type "text/css"))) + (link (@ (href "/~afiw/assets/favicon.ico") (rel "icon") (type "image/x-icon"))) + (link (@ (href "/~afiw/assets/favicon.png") (rel "icon") (type "image/png"))) + (link (@ (href "/~afiw/assets/favicon.gif") (rel "icon") (type "image/gif"))) + (link (@ (href "/~afiw/feed.xml") (rel "alternate") (type "application/atom+xml"))) + (link (@ (href "/~afiw/rss-feed.xml") (rel "alternate") (type "application/rss+xml"))) + (title ,(format #f "~a – afiw" title))) + (body + (header + (strong "afiw's blog") + (nav + (ul + (li (a (@ (href "/~afiw")) "about")) + (li (a (@ (href "/~afiw/contact")) "contact")) + (li (a (@ (href "/~afiw/posts")) "posts")) + (li (a (@ (href "/~afiw/projects")) "projects")) + (li (a (@ (href "/")) "tilde"))))) + (main + (article + (h1 ,title) + ,sxml)) + (footer + (small + "made with " (a (@ (href "https://dthompson.us/projects/haunt.html")) "haunt") " • " + "copyleft " ,(integer->char #x1f12f) " afiw 2026, all rights reversed • cc-by-sa-4.0 • " + (a (@ (href "https://git.linuxposting.xyz/afiw/webbedsite")) "source"))))))) + +(define my-theme + (theme #:name "em's theme" + #:layout my-layout + #:post-template (lambda (post) + `((h3 ,(date->string (post-date post) "~1")) + ,(post-sxml post))) + #:collection-template (lambda (site title posts prefix) + `((ul + ,@(map (lambda (post) + `(li + (a (@ (href ,(string-append "/~afiw/" + (or prefix "") + "/" + (site-post-slug site post) + ".html"))) + ,(post-ref post 'title) + " – " + ,(date->string (post-date post) "~1")))) + posts)))))) + +(site #:title "afiw's blog" + #:domain "tilde.linuxposting.xyz" + #:default-metadata + '((author . "afiw") + (email . "afiw@linuxposting.xyz")) + #:readers (list sxml-reader) + #:build-directory "out" + #:builders (list (blog #:prefix "posts" + #:theme my-theme + #:collections `(("posts" "posts/index.html" + ,posts/reverse-chronological))) + (atom-feed) + (atom-feeds-by-tag) + (rss-feed) + (static-directory "assets") + (static-directory "dist") + (flat-pages "static" #:template my-layout)) + #:publishers (list (rsync-publisher #:name 'tilde + #:destination "afiw@tilde.linuxposting.xyz:public"))) diff --git a/static/contact/index.sxml b/static/contact/index.sxml new file mode 100644 index 0000000..c7a76cc --- /dev/null +++ b/static/contact/index.sxml @@ -0,0 +1,10 @@ +;; -*- scheme -*- + +`((title . "contact") + (content + (ul + (li "irc: " (address "afiw () libera.chat")) + (li "email: " (address "afiw () linuxposting.xyz") " (temporarily unavailable)") + (li "fedi: " (address "afiw () linuxposting.xyz")) + (li "matrix: " (address "() afiw () linuxposting.xyz")) + (li "other sites: " (a (@ (href "https://tilde.town/~afiw")) "tilde.town"))))) diff --git a/static/index.sxml b/static/index.sxml new file mode 100644 index 0000000..22bc127 --- /dev/null +++ b/static/index.sxml @@ -0,0 +1,13 @@ +;; -*- scheme -*- +`((title . "about") + (content + (p "hi i'm afiw/emily (she/her), i'm some sort of linuxposter") + (p "my interests include:") + (ul + (li "C programming") + (li "Scheme programming") + (li "Standard ML programming") + (li "compiler theory") + (li "linguistics and conlanging") + (li "music")) + (p "i use gentoo and openbsd btw"))) diff --git a/static/projects/index.sxml b/static/projects/index.sxml new file mode 100644 index 0000000..5f8e722 --- /dev/null +++ b/static/projects/index.sxml @@ -0,0 +1,13 @@ +;; -*- scheme -*- + +(define (aux-project name desc vers) + `(li (strong ,name) " – " ,desc " – " + (a (@ (href ,(format #f "https://git.linuxposting.xyz/afiw/~a" name))) "git") + ", " + (a (@ (href ,(format #f "/~~afiw/dist/~a-~a.tar.gz" name vers))) "tar.gz"))) + +`((title . "projects") + (content + (ul + ,(aux-project "can" "query filesystem permissions" "1.0") + ,(aux-project "cwm" "linux port of the openbsd calm window manager" "7.8.1.1"))))