diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-12 20:30:24 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2011-03-12 20:30:24 +0100 |
commit | 1253162e55d3f93d476958907491ef0014777bda (patch) | |
tree | d33126574c2cec3bf93365a3ae0574d02407edb0 | |
parent | 6501daf7d0906f97125613c82af911aeed734971 (diff) |
Improve journal archive table layout and labelling.
-rw-r--r-- | mulkcms.lisp | 12 | ||||
-rw-r--r-- | package.lisp | 5 | ||||
-rw-r--r-- | static-files/style/journal.css | 9 | ||||
-rw-r--r-- | templates/journal_page.html | 16 |
4 files changed, 30 insertions, 12 deletions
diff --git a/mulkcms.lisp b/mulkcms.lisp index f44e4c4..f2070a4 100644 --- a/mulkcms.lisp +++ b/mulkcms.lisp @@ -60,7 +60,10 @@ (defun format-short-human-date (date) ;; FIXME - "(some date)") + (multiple-value-bind (year month day hour minute second millisecond) + (decode-timestamp date) + (declare (ignore second millisecond)) + (format nil "~4,'0D-~2,'0D-~2,'0D ~2,'0D:~2,'0D" year month day hour minute))) (defun format-human-date (date) ;; FIXME @@ -299,7 +302,12 @@ :site-subtitle "" :link "" :full-archive-link "" - :full-archive-label "Full archive (slow!)")) + :full-archive-label "Full archive (slow!)" + :archive-title "Older posts" + :archive-table-caption "Posts by date" + :archive-title-label "Title" + :archive-date-label "Date" + :archive-comments-label "Comments")) (head (expand-template page-template (list* :head t :articles displayed-revisions :minor-articles revisions diff --git a/package.lisp b/package.lisp index 6b0c7cb..d7de2cc 100644 --- a/package.lisp +++ b/package.lisp @@ -1,10 +1,11 @@ (cl:defpackage #:mulkcms (:use #:common-lisp #:split-sequence #:alexandria #:cl-fad #:cl-who - #:cl-ppcre #:postmodern #:json-template) + #:cl-ppcre #:postmodern #:json-template #:simple-date) (:shadow #:copy-file #:copy-stream) (:export #:*base-uri* #:*static-files* #:*templates* #:*server-address* #:*server-port* - #:*site-name*)) + #:*site-name* + #:find-request-handler)) diff --git a/static-files/style/journal.css b/static-files/style/journal.css index 4d35bee..f33e464 100644 --- a/static-files/style/journal.css +++ b/static-files/style/journal.css @@ -190,6 +190,15 @@ table.old-entry-table td { margin: 0 0 0 0; } +table.old-entry-table td.archive-date { + white-space: nowrap; + text-align: right; +} + +table.old-entry-table td.archive-comment-number { + white-space: nowrap; +} + a:link { color: #0c2db2; } diff --git a/templates/journal_page.html b/templates/journal_page.html index 978b3f0..d9646f3 100644 --- a/templates/journal_page.html +++ b/templates/journal_page.html @@ -18,23 +18,23 @@ {.section minor-articles} <div class="old-entries"> - <h2>Ältere Einträge</h2> + <h2>{archive-title}</h2> <p><a href="{full-archive-link|html-attr-value}" rel="archives">{full-archive-label|html}</a></p> <table class="old-entry-table"> - <caption>Einträge nach Datum</caption> + <caption>{archive-table-caption}</caption> <thead> <tr> - <th scope="col">Titel</th> - <th scope="col">Datum</th> - <th scope="col">Kommentare</th> + <th scope="col">{archive-title-label}</th> + <th scope="col">{archive-date-label}</th> + <th scope="col">{archive-comments-label}</th> </tr> </thead> <tbody> {.repeated section @} <tr> - <td><a href="{link|html-attr-value}">{title}</a></td> - <td style="text-align: right">{publishing-date|html-short-human-date}</td> - <td><a href="{comments-link|html-attr-value}">{comments-label|html}</a></td> + <td class="archive-title"><a href="{link|html-attr-value}">{title}</a></td> + <td class="archive-date">{publishing-date|html-short-human-date}</td> + <td class="archive-comment-number"><a href="{comments-link|html-attr-value}">{comments-label|html}</a></td> </tr> {.end} </tbody> |