switched to pegdown plugin
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
:dependencies [[org.clojure/clojure "1.4.0"]
|
||||
[hiccup "1.0.0"]
|
||||
[cssgen "0.2.6"]
|
||||
[markdown-clj "0.8"]
|
||||
[org.pegdown/pegdown "1.1.0"]
|
||||
[noir "1.3.0-beta1"]]
|
||||
:plugins [[lein-cljsbuild "0.1.10"]]
|
||||
:cljsbuild {
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
[hiccup.page :only [include-js html5]]
|
||||
[hiccup.element :only [javascript-tag]]))
|
||||
|
||||
(defn gen-comma-list [fonts] (apply str (interpose "," fonts)))
|
||||
(defn gen-comma-list [& fonts] (apply str (interpose "," fonts)))
|
||||
(def helvetica-neue
|
||||
(mixin
|
||||
:font-weight 300
|
||||
:font-family (gen-comma-list "'Helvetica Neue'"
|
||||
"Helvetica"
|
||||
"Arial"
|
||||
"'Lucida Grande'"
|
||||
"sans-serif")))
|
||||
|
||||
(def global-css
|
||||
(css
|
||||
(rule ".centerized"
|
||||
:text-align :center)
|
||||
(def helvetica-neue
|
||||
(mixin
|
||||
:font-weight 300
|
||||
:font-family (gen-comma-list ["'Helvetica Neue'"
|
||||
"Helvetica"
|
||||
"Arial"
|
||||
"'Lucida Grande'"
|
||||
"sans-serif"])))
|
||||
(rule ".button"
|
||||
:box-shadow [0 :2px :5px :#aaa]
|
||||
:text-decoration :none
|
||||
@@ -50,6 +50,7 @@
|
||||
(rule "*:focus"
|
||||
:outline [:0px :none :transparent])
|
||||
(rule "textarea"
|
||||
:width "900px"
|
||||
:font-family :Courier
|
||||
:font-size :1.3em
|
||||
:border :none
|
||||
@@ -68,7 +69,11 @@
|
||||
:margin-bottom :5em
|
||||
:margin-left "auto"
|
||||
:margin-right "auto")
|
||||
(rule "h1, h2, h3, h4" :font-family "'Noticia Text'")))
|
||||
(rule "h1"
|
||||
:font-size :2em)
|
||||
(rule "h1, h2, h3, h4"
|
||||
:font-family (gen-comma-list
|
||||
"'Noticia Text'" "Georgia"))))
|
||||
|
||||
(defpartial layout [title & content]
|
||||
(html5
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
(ns NoteHub.views.pages
|
||||
(:require [NoteHub.views.common :as common])
|
||||
(:use [noir.core :only [defpage]]
|
||||
[hiccup.form]
|
||||
[markdown :only [md-to-html-string]]))
|
||||
[hiccup.form])
|
||||
(:import [org.pegdown PegDownProcessor]))
|
||||
|
||||
(defpage "/" {}
|
||||
(common/layout "Free Markdown Hosting"
|
||||
@@ -25,4 +25,4 @@
|
||||
(defpage [:post "/preview-note"] {:keys [draft]}
|
||||
(common/layout "Preview of ..."
|
||||
[:article.central-body
|
||||
(md-to-html-string draft)]))
|
||||
(.markdownToHtml (PegDownProcessor.) draft)]))
|
||||
|
||||
Reference in New Issue
Block a user