From d85c97433b4034bb01f553addcf6e08325b6657e Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Tue, 29 May 2007 14:33:47 +0200 Subject: Add a stylesheet based on the Benkard.de one. darcs-hash:5dbcb12b35f5bba18ca06a9f0ff6b35cbc5f0084 --- journal.css | 57 ++++++++++++++++++++++++++++++++++++++++++++ journal.lisp | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 journal.css diff --git a/journal.css b/journal.css new file mode 100644 index 0000000..8bd58e1 --- /dev/null +++ b/journal.css @@ -0,0 +1,57 @@ +#MAIN-TITLE { + font-stretch: wider; + font-variant: small-caps; + text-align: center; +} + +#MAIN-TITLE a { + text-decoration: none; +} + +#MAIN-SUBTITLE { + text-align: center; +} + +#MAIN-TITLE-BOX { +} + +.JOURNAL-ENTRY-HEADER { + font-size: x-small; + color: #444; + font-weight: lighter; + text-align: left; +} + +div.JOURNAL-ENTRY > h2 { + border-bottom: 2px solid #000; + //font-variant: small-caps; +} + +.JOURNAL-ENTRY > h2 > a { + text-decoration: none; +} + +div.JOURNAL-ENTRY { + border: 3px outset #666; + background-color: #f8f8e0; + margin: 1em 0 0 0; + padding: 0 0.3em 0 0.3em; + text-align: justify; +} + +div.JOURNAL-ENTRY-BODY p { + text-indent: 1em; +} + +img.JOURNAL-ENTRY-PORTRAIT { + margin-right: 6px; + margin-bottom: 6px; + float: left; +} + +.JOURNAL-ENTRY-FOOTER { + font-size: small; + padding-top: 0.5em; + text-align: right; + clear: both; +} diff --git a/journal.lisp b/journal.lisp index 95cfe61..e62598f 100755 --- a/journal.lisp +++ b/journal.lisp @@ -89,7 +89,11 @@ (categories :type list :accessor categories-of :initarg :categories - :initform '()))) + :initform '()) + (comments :type list + :accessor comments-about + :initarg :comments + :initform '()))) (defmethod shared-initialize ((journal-entry journal-entry) slot-names @@ -256,12 +260,60 @@ after another in any arbitrary order." (defun show-journal-entry (journal-entry) (<:div :class :journal-entry - (<:h2 (<:as-html (title-of journal-entry))) - (<:div :class :journal-entry-date - (<:as-html - (format-date nil "%@day-of-week, den %day.%mon.%yr, %hr:%min." - (date-of journal-entry)))) - (<:as-is (journal-markup->html (body-of journal-entry))))) + (<:h2 (<:a :href (format nil + "journal.cgi?action=view&post=~D" + (id-of journal-entry)) + (<:as-html (title-of journal-entry)))) + (<:div :class :journal-entry-header + (<:span :class :journal-entry-date + (<:as-html + (format-date nil "%@day-of-week, den %day.%mon.%yr, %hr:%min." + (date-of journal-entry)))) + (unless (null (categories-of journal-entry)) + (<:span :class :journal-entry-category + (<:as-html + (format nil "Abgeheftet unter ..."))))) + (<:div :class :journal-entry-body + (<:as-is (journal-markup->html (body-of journal-entry)))) + (<:div :class :journal-entry-footer + (<:form :class :journal-entry-delete-button-form + :style "display: inline;" + :method "DELETE" + :action "journal.cgi" + (<:input :type "hidden" + :name "action" + :value "delete") + (<:input :type "hidden" + :name "post" + :value (prin1-to-string (id-of journal-entry))) + (<:button :type "submit" + ;;:style "display: inline;" + (<:as-is "Löschen"))) + " | " + (<:form :class :journal-entry-delete-button-form + :style "display: inline;" + :method "GET" + :action "journal.cgi" + (<:input :type "hidden" + :name "action" + :value "edit") + (<:input :type "hidden" + :name "post" + :value (prin1-to-string (id-of journal-entry))) + (<:button :type "submit" + ;;:style "display: inline;" + (<:as-is "Bearbeiten"))) + #+nil + (<:a :href (format nil + "journal.cgi?action=edit&post=~D" + (id-of journal-entry)) + (<:as-is "Bearbeiten")) + " | " + (<:a :href (format nil + "journal.cgi?action=view&post=~D" + (id-of journal-entry)) + (<:as-is + (format nil "~D Kommentare" (length (comments-about journal-entry)))))))) (defun show-web-journal () @@ -275,9 +327,16 @@ after another in any arbitrary order." (if (member *action* '(:view :edit :preview)) (format nil "~A -- Kompottkins Weisheiten" (title-of (find-entry *post-number*))) - "Kompottkins Weisheiten")))) + "Kompottkins Weisheiten"))) + (<:link :rel "stylesheet" :type "text/css" :href "../journal.css")) (<:body - (<:h1 :id :main-title "Kompottkins Weisheiten") + (<:div :id :main-title-box + (<:h1 :id :main-title + (<:a :href "journal.cgi?action=index" + "Kompottkins Weisheiten")) + (<:div :id :main-subtitle (<:as-is + "NEU! Jetzt ohne regelmäßige + Serverabstürze!"))) (<:div :id :contents (case *action* ((:index nil) -- cgit v1.2.3