dom access over cljs-lib realized
This commit is contained in:
+5
-2
@@ -1,3 +1,6 @@
|
|||||||
(ns NoteHub.main)
|
(ns NoteHub.main
|
||||||
|
(:require [clojure.browser.dom :as dom]))
|
||||||
|
|
||||||
|
(if-let [write-textarea (dom/get-element "write-textarea")]
|
||||||
|
(dom/append write-textarea "test"))
|
||||||
|
|
||||||
(.log js/console "works !")
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
(ns NoteHub.views.common
|
(ns NoteHub.views.common
|
||||||
(:use [noir.core :only [defpartial]]
|
(:use
|
||||||
[hiccup.page :only [include-js html5]]))
|
[cssgen]
|
||||||
(use 'cssgen)
|
[noir.core :only [defpartial]]
|
||||||
|
[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)))
|
||||||
|
|
||||||
@@ -57,9 +59,11 @@
|
|||||||
(html5
|
(html5
|
||||||
[:head
|
[:head
|
||||||
[:title "NoteHub"]
|
[:title "NoteHub"]
|
||||||
(include-js "/js/main.js")
|
|
||||||
[:link {:href "http://fonts.googleapis.com/css?family=Noticia+Text:400,700"
|
[:link {:href "http://fonts.googleapis.com/css?family=Noticia+Text:400,700"
|
||||||
:rel "stylesheet"
|
:rel "stylesheet"
|
||||||
:type "text/css"}]
|
:type "text/css"}]
|
||||||
[:style {:type "text/css"} global-css]]
|
[:style {:type "text/css"} global-css]]
|
||||||
[:body content]))
|
[:body
|
||||||
|
content
|
||||||
|
(javascript-tag "var CLOSURE_NO_DEPS = true;")
|
||||||
|
(include-js "/js/main.js")]))
|
||||||
|
|||||||
@@ -14,5 +14,5 @@
|
|||||||
(defpage "/new" []
|
(defpage "/new" []
|
||||||
(common/layout
|
(common/layout
|
||||||
[:div.central-body.max-width
|
[:div.central-body.max-width
|
||||||
(text-area {:class "central-body max-width"} :article-write)]))
|
(text-area {:class "central-body max-width"} :write-textarea)]))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user