Changeset 20543 in project
- Timestamp:
- 09/27/10 17:12:27 (10 years ago)
- Location:
- gazette
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
gazette/hyde.scm
r20447 r20543 1 1 (use hyde hyde-atom environments) 2 2 3 (default-page-vars '(((: bos " issues/" (+ any) ".wiki")3 (default-page-vars '(((: bos "/issues/" (+ any) ".html") 4 4 (layouts "article.sxml" "default.sxml")))) 5 5 … … 19 19 (time->string (seconds->utc-time seconds) "%Y-%m-%d %z")) 20 20 21 (define (authors->sxml authors) 22 `(,(car authors) 23 ,@(if (null? (cdr authors)) 24 '() 25 (map (lambda (author) 26 `(,(car author) (span (@ (class "author")) ,(cdr author)))) 27 (append (map (cut cons ", " <>) (butlast (cdr authors))) 28 `((" and " . ,(last authors)))))))) 29 21 30 (for-each (lambda (binding) 22 31 (apply environment-extend! (cons (page-eval-env) binding))) 23 32 `((page-updated ,page-updated) 24 33 (format-seconds ,format-seconds) 34 (authors->sxml ,authors->sxml) 25 35 (all-issues ,(lambda () 26 36 (sort-by (pages-matching "issues/.+") page-updated))))) -
gazette/layouts/article.sxml
r20060 r20543 1 1 () 2 2 `((h1 ,($ 'title)) 3 4 3 (div (@ (class "article-meta")) 5 (p (@ (class "authors")) 6 "by " 7 ,(car ($ 'authors)) 8 ,@(if (null? (cdr ($ 'authors))) 9 '() 10 (map (lambda (author) 11 `(,(car author) (span (@ (class "author")) ,(cdr author)))) 12 (append (map (cut cons ", " <>) (butlast (cdr ($ 'authors)))) 13 `((" and " . ,(last ($ 'authors)))))))) 14 (p (@ (class "date")) ,(format-seconds ($ 'date)))) 4 (p (@ (class "authors")) "by " ,(authors->sxml ($ 'authors))) 5 (p (@ (class "date")) ,(format-seconds ($ 'date)))) 15 6 16 7 (inject ,contents) -
gazette/src/archive.sxml
r20060 r20543 1 1 ((title . "Archive")) 2 2 `(h1 ,($ 'title)) 3 `(dl ,(map (lambda (issue) 4 `((dt (a (@ (href ,(page-path issue))) ,($ 'title issue))) 5 (dd ,(format-seconds ($ 'date issue))))) 6 (reverse (all-issues)))) 3 `(dl (@ (id "archive")) 4 ,(map (lambda (issue) 5 `((dt (a (@ (href ,(page-path issue))) ,($ 'title issue)) 6 " " 7 (span (@ (class "date")) ,(format-seconds ($ 'date issue)))) 8 (dd (@ (class "authors")) 9 "by " ,(authors->sxml ($ 'authors issue))))) 10 (all-issues))) -
gazette/src/gazette.scss
r20060 r20543 21 21 (margin-bottom "7em")) 22 22 23 ((// |#archive|) 24 ((// .date) 25 (font-weight "normal") 26 (margin-top ".5em"))) 27 23 28 ((// ul.links) 24 29 (text-align "right")
Note: See TracChangeset
for help on using the changeset viewer.