diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2010-01-31 10:48:05 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2010-01-31 10:48:05 +0100 |
commit | 48bee40f8f87c427bb3efeab89add4e22863466f (patch) | |
tree | b7f054a6f4ae4ab757a6a9323d22f2505bf76f4e | |
parent | 634a0d3fe3a50d34dba8ecab810eae8387b38e63 (diff) |
Take a more conservative HTML 5 approach by using “div” and “span” elements liberally.
Ignore-this: 45f2c97791af7b31490455128bf0008a
darcs-hash:a4438f2f2bf327cb057c91419ca270b136b7d5fb
-rwxr-xr-x | journal.lisp | 234 |
1 files changed, 118 insertions, 116 deletions
diff --git a/journal.lisp b/journal.lisp index 180517f..32bf661 100755 --- a/journal.lisp +++ b/journal.lisp @@ -301,74 +301,76 @@ (format nil "~D Kommentar~:*~[e~;~:;e~]" (length comments))))))) (when *full-entry-view* - (<::article :class :journal-entry - (<:h1 (<:a :href (link-to :view :post-id id) - (<:as-is title))) - (<::header :class :journal-entry-header - (<::time :class :journal-entry-date - :pubdate "pubdate" - :datetime (format-date nil - "%4yr%-%2mon%-%2day%T%2hr%:%2min%:%2sec%Z" - posting-date) - (<:as-html - (format-date nil "%@day-of-week%, den %day%.%mon%.%yr%, %hr%:%2min%." - posting-date))) - (unless (null categories) - (<:span :class :journal-entry-category - (<:as-html - (format nil "Abgeheftet unter ..."))))) + (<:div :class :journal-entry + (<::article + (<:h1 (<:a :href (link-to :view :post-id id) (<:as-is title))) + (<:div :class :journal-entry-header + (<::header + (<:span :class :journal-entry-date + (<::time :pubdate "pubdate" + :datetime (format-date nil + "%4yr%-%2mon%-%2day%T%2hr%:%2min%:%2sec%Z" + posting-date) + (<:as-html + (format-date nil "%@day-of-week%, den %day%.%mon%.%yr%, %hr%:%2min%." + posting-date)))) + (unless (null categories) + (<:span :class :journal-entry-category + (<:as-html + (format nil "Abgeheftet unter ...")))))) (<:div :class :journal-entry-body (<:as-is (if (equal type "html") body (journal-markup->html body)))) - (<::footer :class :journal-entry-footer - (<:form :class :journal-entry-delete-button-form - :style "display: inline;" - :method "post" - :action (link-to :index) - (<:div :style "display: inline;" - (<:input :type "hidden" - :name "action" - :value "delete") - (<:input :type "hidden" - :name "id" - :value (prin1-to-string id)) - (<:input :type "submit" - (<:as-is "Löschen")))) - " | " - (<:form :class :journal-entry-edit-button-form - :style "display: inline;" - :method "get" - :action (link-to :edit :post-id id) - (<:div :style "display: inline;" - (<:input :type "hidden" - :name "id" - :value (prin1-to-string id)) - (<:input :type "submit" - (<:as-is "Bearbeiten")))) - " | " - (<:a :href (link-to :view-comment-feed :post-id id :absolute t) - (<:as-is - (format nil "Kommentarfeed (Atom)" (length comments)))) - " | " - (<:a :href (link-to :view :post-id id) - (<:as-is - (format nil "~D Kommentar~:*~[e~;~:;e~]" (length comments)))))) - - (when (and comments-p (not (null comments))) - (<:div :class :journal-comments - (<:h2 "Kommentare") - (dolist (comment comments) - (show-comment comment)))) - - (when (and comments-p (not (null trackbacks))) - (<:div :class :journal-comments - (<:h2 "Trackbacks") - (dolist (trackback trackbacks) - (show-trackback trackback)))) - - (when comments-p - (<:as-is (format nil "<!-- + (<:div :class :journal-entry-footer + (<::footer + (<:form :class :journal-entry-delete-button-form + :style "display: inline;" + :method "post" + :action (link-to :index) + (<:div :style "display: inline;" + (<:input :type "hidden" + :name "action" + :value "delete") + (<:input :type "hidden" + :name "id" + :value (prin1-to-string id)) + (<:input :type "submit" + (<:as-is "Löschen")))) + " | " + (<:form :class :journal-entry-edit-button-form + :style "display: inline;" + :method "get" + :action (link-to :edit :post-id id) + (<:div :style "display: inline;" + (<:input :type "hidden" + :name "id" + :value (prin1-to-string id)) + (<:input :type "submit" + (<:as-is "Bearbeiten")))) + " | " + (<:a :href (link-to :view-comment-feed :post-id id :absolute t) + (<:as-is + (format nil "Kommentarfeed (Atom)" (length comments)))) + " | " + (<:a :href (link-to :view :post-id id) + (<:as-is + (format nil "~D Kommentar~:*~[e~;~:;e~]" (length comments)))))))) + + (when (and comments-p (not (null comments))) + (<:div :class :journal-comments + (<:h2 "Kommentare") + (dolist (comment comments) + (show-comment comment)))) + + (when (and comments-p (not (null trackbacks))) + (<:div :class :journal-comments + (<:h2 "Trackbacks") + (dolist (trackback trackbacks) + (show-trackback trackback)))) + + (when comments-p + (<:as-is (format nil "<!-- <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:trackback=\"http://madskills.com/public/xml/rss/module/trackback/\"> @@ -379,58 +381,58 @@ trackback:ping=\"~A\" /> </rdf:RDF> -->" (link-to :view :post-id id :absolute t) (ppcre:regex-replace "--" title "—") (link-to :trackback :post-id id :absolute t))) - (<:div :class :journal-new-comment - (<:h2 "Neuen Kommentar schreiben") - (<:p (<:as-is "Bitte beachten Sie, daß E-Mail-Adressen niemals - veröffentlicht werden und nur von Matthias eingesehen - werden können.")) - (<:p (<:strong "Hinweise: ") - "Diese Website verwendet " - (<:a :href "http://akismet.com/" "Akismet") - " zur Spamerkennung. " - (<:as-is "E-Mail-Adressen werden auch gegenüber Akismet - unter Verschluß gehalten. Nur unformatierter - Text ist erlaubt. Leerzeilen trennen - Absätze.")) - (<:form :action (link-to :view :post-id id) - :method "post" - :accept-charset #+(or) "ISO-10646-UTF-1" - "UTF-8" - :enctype #+(or) "multipart/form-data" - "application/x-www-form-urlencoded" - (<:div :style "display: none" - (<:input :type "hidden" - :name "id" - :value (prin1-to-string id)) - (<:input :type "hidden" - :name "action" - :value "post-comment")) - (<:div :style "display: table" - (loop for (name . desc) in '(("author" . "Name (nötig)") - ("email" . "E-Mail") - ("website" . "Website")) - do (<:div :style "display: table-row" - (<:div :style "display: table-cell; vertical-align: top" - (<:label :for name - :style "vertical-align: top" - (<:as-is (format nil "~A: " desc)))) - (<:div :style "display: table-cell;" - (<:input :type "text" - :name name - :id name)))) - (<:div :style "display: table-row" - (<:div :style "display: table-cell; vertical-align: top" - (<:label :for "comment-body" - :style "vertical-align: top" - (<:as-html "Kommentar: "))) - (<:div :style "display: table-cell" - (<:textarea :name "comment-body" - :id "comment-body" - :rows 10 - :cols 40)))) - (<:div - (<:input :type "submit" - (<:as-is "Veröffentlichen")))))))) + (<:div :class :journal-new-comment + (<:h2 "Neuen Kommentar schreiben") + (<:p (<:as-is "Bitte beachten Sie, daß E-Mail-Adressen niemals + veröffentlicht werden und nur von Matthias eingesehen + werden können.")) + (<:p (<:strong "Hinweise: ") + "Diese Website verwendet " + (<:a :href "http://akismet.com/" "Akismet") + " zur Spamerkennung. " + (<:as-is "E-Mail-Adressen werden auch gegenüber Akismet + unter Verschluß gehalten. Nur unformatierter + Text ist erlaubt. Leerzeilen trennen + Absätze.")) + (<:form :action (link-to :view :post-id id) + :method "post" + :accept-charset #+(or) "ISO-10646-UTF-1" + "UTF-8" + :enctype #+(or) "multipart/form-data" + "application/x-www-form-urlencoded" + (<:div :style "display: none" + (<:input :type "hidden" + :name "id" + :value (prin1-to-string id)) + (<:input :type "hidden" + :name "action" + :value "post-comment")) + (<:div :style "display: table" + (loop for (name . desc) in '(("author" . "Name (nötig)") + ("email" . "E-Mail") + ("website" . "Website")) + do (<:div :style "display: table-row" + (<:div :style "display: table-cell; vertical-align: top" + (<:label :for name + :style "vertical-align: top" + (<:as-is (format nil "~A: " desc)))) + (<:div :style "display: table-cell;" + (<:input :type "text" + :name name + :id name)))) + (<:div :style "display: table-row" + (<:div :style "display: table-cell; vertical-align: top" + (<:label :for "comment-body" + :style "vertical-align: top" + (<:as-html "Kommentar: "))) + (<:div :style "display: table-cell" + (<:textarea :name "comment-body" + :id "comment-body" + :rows 10 + :cols 40)))) + (<:div + (<:input :type "submit" + (<:as-is "Veröffentlichen")))))))) (defun call-with-web-journal (page-title thunk &key canonical-uri) |