Sfoglia il codice sorgente

basic pollen processing

George C. Privon 5 anni fa
parent
commit
f2f993e955
1 ha cambiato i file con 28 aggiunte e 0 eliminazioni
  1. 28 0
      pollen.rkt

+ 28 - 0
pollen.rkt

@@ -0,0 +1,28 @@
+#lang racket/base
+
+(require pollen/tag
+         info)
+
+(provide (all-defined-out))
+
+(define title (default-tag-function 'h1))
+(define section (default-tag-function 'h2))
+(define subsection (default-tag-function 'h3))
+(define items (default-tag-function 'ul))
+(define item (default-tag-function 'li))
+(define (link url text) `(a ((href ,url)) ,text))
+
+(define (div . parts)
+  `(div ,@parts))
+
+; image inclusion
+(define (img impath
+             #:title [title ""]
+             #:alt [alt-text ""])
+  '(em "Images not yet implemented."))
+
+;; writing/copy-editing assistance
+
+; tag a word which should be later replaced by another word
+(define-tag-function (reword attrs elems)
+  `(div ,attrs (em (strong ,@elems))))