diff --git a/site/index.html.pm b/site/index.html.pm index a8af549..353fae7 100644 --- a/site/index.html.pm +++ b/site/index.html.pm @@ -1,3 +1,9 @@ #lang pollen -hey, i'm sloane! i'm a professional software engineer and an amateur musician, photographer, wife, chef, and pet mom. +◊title{Hi, I'm Sloane!} + +◊section{ + I'm a professional software engineer and an amateur musician, photographer, wife, chef, and pet mom. + + ◊code{sloane.sh} is my place on the web; however, it is currently under construction. Please check back later. +} diff --git a/site/pollen.rkt b/site/pollen.rkt index 0310490..7e8d591 100644 --- a/site/pollen.rkt +++ b/site/pollen.rkt @@ -2,19 +2,41 @@ (require pollen/decode pollen/misc/tutorial txexpr) (provide (all-defined-out)) +#| utilities |# +(define (splice xs) + (apply append (for/list ([x (in-list xs)]) + (if (and (txexpr? x) (member (get-tag x) '(splice-me))) + (get-elements x) + (list x))))) + #| site globals |# (define site-name "sloane.sh") (define email "sloane@fastmail.com") #| custom elements |# +(define (title . elements) + (txexpr 'h1 empty elements)) +(define (subtitle . elements) + (txexpr 'p '((class "subtitle")) elements)) +(define (heading . elements) + (txexpr 'h2 empty elements)) +(define (low-level-heading . elements) + (txexpr 'h3 empty elements)) + +(define (side-note label . elements) + `(splice-me + (label ((for ,label) (class "margin-toggle sidenote-number"))) + (input ((id ,label) (class "margin-toggle")(type "checkbox"))) + (span ((class "sidenote")) ,@elements))) #| plain text decoding |# -(define txexpr-elements-proc decode-paragraphs) +(define txexpr-elements-proc (compose1 decode-paragraphs splice)) (define string-proc (compose1 smart-quotes smart-dashes)) (define (root . elements) - (txexpr 'root empty (decode-elements elements + (txexpr 'article empty (decode-elements elements #:txexpr-elements-proc txexpr-elements-proc - #:string-proc string-proc))) + #:string-proc string-proc + #:exclude-tags '(pre)))) #| setup |# (module setup racket/base diff --git a/site/template.html.p b/site/template.html.p index 75086fa..ef8c210 100644 --- a/site/template.html.p +++ b/site/template.html.p @@ -3,17 +3,10 @@