-
Notifications
You must be signed in to change notification settings - Fork 1
/
screen.clj
45 lines (28 loc) · 868 Bytes
/
screen.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
lein repl
; start the server
(load "linked_in/dev_server")
(linked-in.dev-server/run-server)
;start the browser repl
(require '[cljs.repl]
'[cljs.repl.browser])
(cljs.repl/repl (cljs.repl.browser/repl-env))
(js/alert "Hello World")
; macro
(load "linked_in/app/view_macros/profile")
(linked-in.app.view-macros.profile/template {:lastName "Shashy"})
(require '[clojure.string :as str])
(doc str/replace)
(str/replace "hello\n\n*world" "\\n" "<b>")
(use '[cheshire.core :only (parse-string)])
(def profile (parse-string (slurp "data/profile.json") true))
(def summary (-> profile :positions :values second :summary))
(def lst (str/split summary #"\n"))
(count lst)
(use '[hiccup.core :only (html)])
(def para [:p.desc (map #(list %1 %2)
(str/split summary #"\n")
(repeat [:br]))])
(take 1 para)
para
(html
)