pollen.rkt 713 B

12345678910111213141516171819202122232425262728
  1. #lang racket/base
  2. (require pollen/tag
  3. info)
  4. (provide (all-defined-out))
  5. (define title (default-tag-function 'h1))
  6. (define section (default-tag-function 'h2))
  7. (define subsection (default-tag-function 'h3))
  8. (define items (default-tag-function 'ul))
  9. (define item (default-tag-function 'li))
  10. (define (link url text) `(a ((href ,url)) ,text))
  11. (define (div . parts)
  12. `(div ,@parts))
  13. ; image inclusion
  14. (define (img impath
  15. #:title [title ""]
  16. #:alt [alt-text ""])
  17. '(em "Images not yet implemented."))
  18. ;; writing/copy-editing assistance
  19. ; tag a word which should be later replaced by another word
  20. (define-tag-function (reword attrs elems)
  21. `(div ,attrs (em (strong ,@elems))))