summaryrefslogtreecommitdiff
path: root/journal.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-05-29 14:33:47 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-05-29 14:33:47 +0200
commitd85c97433b4034bb01f553addcf6e08325b6657e (patch)
tree88c0f45a8095a8a1e87c3b42e9deb0244ca1fec1 /journal.lisp
parentcd86bea65ef609c49748e6de2c4477a74b9a4c87 (diff)
Add a stylesheet based on the Benkard.de one.
darcs-hash:5dbcb12b35f5bba18ca06a9f0ff6b35cbc5f0084
Diffstat (limited to 'journal.lisp')
-rwxr-xr-xjournal.lisp77
1 files changed, 68 insertions, 9 deletions
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&ouml;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&auml;&szlig;ige
+ Serverabst&uuml;rze!")))
(<:div :id :contents
(case *action*
((:index nil)