A pastebin for markdown pages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

(ns NoteHub.views.common
(:use
[NoteHub.views.css-generator]
[noir.core :only [defpartial]]
[hiccup.page :only [include-js html5]]
[hiccup.element :only [javascript-tag]]))
(defpartial generate-layout
[params title & content]
(html5
[:head
[:title "NoteHub — " title]
[:link {:href (str "http://fonts.googleapis.com/css?family="
"PT+Serif:700|Noticia+Text:700"
"&subset=latin,cyrillic" )
14 years ago
:rel "stylesheet"
:type "text/css"}]
[:style {:type "text/css"} (global-css (params :theme))]]
(if (params :js)
[:body content
(javascript-tag "var CLOSURE_NO_DEPS = true;")
(include-js "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js")
(include-js "/cljs/main.js")]
[:body content])))
(defn layout [& args]
(if (map? (first args))
(apply generate-layout args)
(apply generate-layout {} args)))