summaryrefslogtreecommitdiff
path: root/src/mulk/benki/util.clj
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-02-22 14:10:38 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-02-22 14:10:38 +0100
commita2aba31dbf353ebe484e2ecd526ff2dcfbd36817 (patch)
tree0c727db736e3b81a26538fb50cfd053a79c41731 /src/mulk/benki/util.clj
parent35ed93dc3bebd8256277eb72193a0f91b68a092f (diff)
Make the layout procedure flexible with regard to <head/> content.
Diffstat (limited to 'src/mulk/benki/util.clj')
-rw-r--r--src/mulk/benki/util.clj12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mulk/benki/util.clj b/src/mulk/benki/util.clj
index ba43581..4dac73b 100644
--- a/src/mulk/benki/util.clj
+++ b/src/mulk/benki/util.clj
@@ -23,22 +23,14 @@
;; defpartial is just defn + html.
-(defpartial layout [title & content]
+(defpartial layout [kind title & content]
(html5 {:xml? true}
[:head
[:title title]
;; jQuery
[:script {:type "text/javascript"
:src (resolve-uri "/3rdparty/jquery/jquery-1.7.min.js")}]
- ;; Aloha Editor
- [:link {:rel "stylesheet"
- :href (resolve-uri "/3rdparty/alohaeditor/aloha/css/aloha.css")}]
- [:script {:type "text/javascript"
- :src (resolve-uri "/3rdparty/alohaeditor/aloha/lib/aloha.js")
- :data-aloha-plugins "common/format,common/highlighteditables,common/list,common/link,common/undo,common/paste,common/block"}]
- ;; JavaScript
- [:script {:type "text/javascript"
- :src (resolve-uri "/js/wiki.js")}]]
+ (:head kind)]
[:body [:h1 title]
content]))