diff options
| author | bdunahu <bdunahu@operationnull.com> | 2026-02-28 12:21:26 -0500 |
|---|---|---|
| committer | bdunahu <bdunahu@operationnull.com> | 2026-02-28 12:21:26 -0500 |
| commit | 3631eae3593112414610fdb6c7791cdd68c1e8dd (patch) | |
| tree | 18ded720b55f4363d49182b0af1bdad16fce3b12 /src/operationnull/theme.scm | |
| parent | 3c46b94b767905db9cfc90f05a03b4bc45f53f28 (diff) | |
theme: separate out layout elements into variables
Diffstat (limited to 'src/operationnull/theme.scm')
| -rw-r--r-- | src/operationnull/theme.scm | 92 |
1 files changed, 51 insertions, 41 deletions
diff --git a/src/operationnull/theme.scm b/src/operationnull/theme.scm index a899575..a398372 100644 --- a/src/operationnull/theme.scm +++ b/src/operationnull/theme.scm @@ -12,6 +12,53 @@ '(a (@ (href "https://creativecommons.org/licenses/by-sa/4.0/")) "CC-BY-SA 4.0")) +(define %intro + (let ((desc + '(p "cs graduate student @ " + (a (@ (href "https://www.cics.umass.edu/")) + "UMass Amherst"))) + (nav + '(nav + (div (ul (li (a (@ (href "gemini://porphyrion.operationnull.com/")) + "porphyrion")) + (li (a (@ (href "https://git.operationnull.com/")) + "git")) + (li (a (@ (href "/posts/")) + "blog")) + (li (a (@ (href "/contact.html")) + "contact")) + (li (a (@ (href "/")) + "home"))))))) + `(intro + (div (img (@ (alt "raven") (class "no-border") + (src "/assets/raven.png")))) + (div (@ (style "text-align: left;")) + (h1 (span (@ (class "white")) bdunahu)) + ,desc + ,nav)))) + +(define %footer + `(footer (@ (class "footer")) + (script (@ (id "umaring_js") + (src "https://umaring.mkr.cx/ring.js?id=bdunahu"))) + (div (@ (id "umaring"))) + ,(date->string (current-date) "Copyright © 2024-~Y bdunahu") + (br) + "Site content available under the " ,%cc-by-sa-link " license " + (a (@ (href "https://git.operationnull.com/operationnull.git/")) + "here") + "." + (br) + "Last updated on " + ,(date->string (current-date) "~b ~d, ~Y") + ". Generated with " + (a (@ (href "https://dthompson.us/projects/haunt.html")) + "Haunt") + " and " + (a (@ (href "https://gnu.org/software/guile")) + "Guile Scheme") + ".")) + (define (first-paragraph post) (let loop ((sxml (post-sxml post))) (match sxml @@ -39,48 +86,11 @@ (href "/assets/favicon.ico"))) (title ,(string-append title " — " (site-title site))) ,(stylesheet "site")) + ,%intro (body - (intro - (div (img (@ (alt "raven") (class "no-border") - (src "/assets/raven.png")))) - (div (@ (style "text-align: left;")) - (h1 (span (@ (class "white")) bdunahu)) - (p "cs graduate student @ " - (a (@ (href "https://www.cics.umass.edu/")) - "UMass Amherst")) - (nav - (div (ul (li (a (@ (href "gemini://porphyrion.operationnull.com/")) - "porphyrion")) - (li (a (@ (href "https://git.operationnull.com/")) - "git")) - (li (a (@ (href "/posts/")) - "blog")) - (li (a (@ (href "/contact.html")) - "contact")) - (li (a (@ (href "/")) - "home"))))))) - (div (@ (class "container")) - ,body) - (footer (@ (class "footer")) - (script (@ (id "umaring_js") - (src "https://umaring.mkr.cx/ring.js?id=bdunahu"))) - (div (@ (id "umaring"))) - "Copyright © 2024-2026 bdunahu" - (br) - "Site content available under the " ,%cc-by-sa-link " license " - (a (@ (href "https://git.operationnull.com/operationnull.git/")) - "here") - "." - (br) - "Last updated on " - ,(date->string (current-date) "~b ~d, ~Y") - ". Generated with " - (a (@ (href "https://dthompson.us/projects/haunt.html")) - "Haunt") - " and " - (a (@ (href "https://gnu.org/software/guile")) - "Guile Scheme") - ".")))) + (div (@ (class "container")) + ,body)) + ,%footer)) #:post-template (lambda (post) `((article |
