Changeset 20060 in project


Ignore:
Timestamp:
09/04/10 02:41:53 (10 years ago)
Author:
Moritz Heidkamp
Message:

gazette: add permalink to all issues, unlink title, remove title.sxml layout and add rudimentary archive page

Location:
gazette
Files:
1 added
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • gazette/hyde.scm

    r19902 r20060  
    1313                   (environment-ref (page-eval-env) 'pages))))
    1414
     15(define (format-seconds seconds)
     16  (time->string (seconds->utc-time seconds) "%Y-%m-%d %Z"))
     17
    1518(for-each (lambda (binding)
    1619            (apply environment-extend! (cons (page-eval-env) binding)))
    1720          `((page-updated ,page-updated)
    18             (all-issues ,(lambda ()
    19                            (sort-by (pages-matching "issues/.+") page-updated)))))
     21            (format-seconds ,format-seconds)
     22            (all-issues ,(let ((issues #f))
     23                           (lambda ()
     24                             (or issues
     25                                 (begin
     26                                   (set! issues (sort-by (pages-matching "issues/.+") page-updated))
     27                                   issues)))))))
  • gazette/layouts/article.sxml

    r19972 r20060  
    11()
    2 `((div (@ (class "article-meta"))
     2`((h1 ,($ 'title))
     3
     4  (div (@ (class "article-meta"))
    35       (p (@ (class "authors"))
    46          "by "
    5           ,(fold (lambda (name authors)
    6                    (append authors
    7                            `(,(and (pair? authors) ", ")
    8                              (span (@ (class "author")) ,name))))
    9                  '()
    10                  ($ 'authors)))
    11        (p  (@ (class "date")) ,(time->string (seconds->utc-time ($ 'date)) "%Y-%m-%d %Z")))
    12   (inject ,contents))
     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))))
     15
     16  (inject ,contents)
     17
     18  (ul (@ (class "links"))
     19      (li (a (@ (href ,(page-path))) "Permalink to this issue"))
     20      (li (a (@ (href "/archive.html")) "The Chicken Gazette Archive"))))
  • gazette/layouts/default.sxml

    r19973 r20060  
    1515              (inject ,contents))
    1616
    17          (p (@ (class "fineprint"))
    18             "The chicken image used in the logo is kindly provided by Manfred Wischner ©"))))
     17         (p (@ (id "fineprint"))
     18            "The chicken image used in the logo is kindly provided and © 2010 by Manfred Wischner"))))
  • gazette/src/feed.atom

    r19905 r20060  
    2424                    entries))
    2525    id: (format ($ 'tag) ($ 'date) "/")
    26     links: (list (make-link uri: (conc ($ 'base-uri) current-path) relation: "self" type: 'atom))
     26    links: (list (make-link uri: (conc ($ 'base-uri) (page-path)) relation: "self" type: 'atom))
    2727    entries: (map (lambda (p)
    2828                    (make-entry title: (make-title ($ 'title p))
  • gazette/src/gazette.scss

    r19971 r20060  
    11()
    2 '((|#content|
    3    (background "#fff")
    4    (padding-top "1em"))
    5 
    6   (|#header|
     2'((|#header|
    73   (float "right")
    84   (margin-left "1em")
    95   (margin-bottom "1em"))
    106
    11   (.date
    12    (font-style "italic"))
     7  (|#content|
     8   (background "#fff")
     9   (padding-top "1em")
     10   (padding-bottom "1em")
     11   (overflow "auto")
    1312
    14   (h1
    15    (margin-left "1em"))
     13   ((// .date)
     14    (font-style "italic"))
    1615
    17   (.article-meta
    18    (margin-left "2.2em")
    19    (margin-bottom "7em"))
     16   ((// h1)
     17    (margin-left "1em"))
    2018
    21   (.fineprint
     19   ((// .article-meta)
     20    (margin-left "2.2em")
     21    (margin-bottom "7em"))
     22
     23   ((// ul.links)
     24    (text-align "right")
     25    (margin-top "2em")
     26    ((// li)
     27     (list-style-type "none"))))
     28
     29  (|#fineprint|
    2230   (text-align "center")
    2331   (font-size ".9em")
  • gazette/src/index.sxml

    r19902 r20060  
    11()
    2 (map (lambda (page)
    3        `((h1 (a (@ (href ,(page-path page)))
    4                 ,($ 'title page)))
    5          (inject ,(read-page page "article.sxml"))))
    6      (all-issues))
     2(let ((latest-issue (fold (lambda (p l)
     3                            (if (> (page-updated p) (page-updated l)) p l))
     4                          (car (all-issues))
     5                          (cdr (all-issues)))))
     6
     7  `((inject ,(read-page latest-issue "article.sxml"))))
  • gazette/src/issues/1.wiki

    r19910 r20060  
    22 (authors "Christian Kellermann")
    33 (date . 1282909270)
    4  (layouts "article.sxml" "title.sxml" "default.sxml"))
     4 (layouts "article.sxml" "default.sxml"))
    55
    66== 0. Introduction
     
    1414things left out, omitted or plainly misunderstood. Feel free to
    1515discuss and add corrections to each issue as you see fit.
    16 
    1716
    1817== 1. New Infrastructure - Update Your Bookmarks!
Note: See TracChangeset for help on using the changeset viewer.