interactive preview added
This commit is contained in:
@@ -48,6 +48,8 @@
|
||||
(html
|
||||
(javascript-tag "var CLOSURE_NO_DEPS = true;")
|
||||
(include-js "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js")
|
||||
(include-js "/js/pagedown/Markdown.Converter.js")
|
||||
(include-js "/js/pagedown/Markdown.Sanitizer.js")
|
||||
(include-js "/cljs/main.js")))])))
|
||||
|
||||
(defn layout
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
(def central-element
|
||||
(mixin
|
||||
:width (px page-width)
|
||||
:margin-top :5em
|
||||
:margin-bottom :10em
|
||||
:margin-left "auto"
|
||||
:margin-right "auto"))
|
||||
|
||||
@@ -130,6 +128,7 @@
|
||||
:margin :2em))
|
||||
(rule "article"
|
||||
central-element
|
||||
:margin-top :5em
|
||||
:font-family text-fonts
|
||||
:text-align :justify
|
||||
:font-size :1.2em
|
||||
@@ -153,8 +152,7 @@
|
||||
:font-family :Courier
|
||||
:font-size :1em
|
||||
:border :none
|
||||
:height :500px
|
||||
:margin-bottom :2em)
|
||||
:height :500px)
|
||||
(rule ".hidden"
|
||||
:display :none)
|
||||
(rule ".button"
|
||||
@@ -166,10 +164,13 @@
|
||||
:background background)
|
||||
(rule ".central-element"
|
||||
central-element)
|
||||
(rule "fieldset"
|
||||
:border :none)
|
||||
(rule "h1"
|
||||
:font-size :2em)
|
||||
(rule ".dashed-line"
|
||||
:border-bottom [:1px :dashed foreground-halftone]
|
||||
:margin-bottom :5em)
|
||||
:margin-top :3em
|
||||
:margin-bottom :3em)
|
||||
(rule "h1, h2, h3, h4"
|
||||
:font-family header-fonts))))
|
||||
|
||||
@@ -88,19 +88,16 @@
|
||||
; New Note Page
|
||||
(defpage "/new" {}
|
||||
(layout {:js true} (get-message :new-note)
|
||||
[:div.central-element
|
||||
[:article#preview " "]
|
||||
[:div#preview-start-line.dashed-line.hidden]
|
||||
[:div.central-element {:style "margin-bottom: 3em"}
|
||||
(form-to [:post "/post-note"]
|
||||
(hidden-field :session-key (create-session))
|
||||
(hidden-field {:id :session-value} :session-value)
|
||||
(text-area {:class :max-width} :draft (get-message :loading))
|
||||
[:div#buttons.hidden
|
||||
(submit-button {:style "float: left"
|
||||
:class "button ui-border"
|
||||
:id :publish-button} (get-message :publish))
|
||||
[:button#preview-button.button.ui-border {:type :button
|
||||
:style "float: right"} (get-message :preview)]])]
|
||||
[:div#preview-start-line.dashed-line.hidden]
|
||||
[:article#preview]))
|
||||
[:fieldset#input-elems.hidden
|
||||
(submit-button {:class "button ui-border"
|
||||
:id :publish-button} (get-message :publish))])]))
|
||||
|
||||
; Displays the note
|
||||
(defpage "/:year/:month/:day/:title" {:keys [year month day title theme header-font text-font] :as params}
|
||||
|
||||
Reference in New Issue
Block a user