|
28 | 28 |
|
29 | 29 | (defn main-view
|
30 | 30 | [fiddle user]
|
31 |
| - (base [:hr {:style "margin-top:4px;margin-bottom:4px;"}] |
32 |
| - [:div.row |
33 |
| - [:div.col-lg-12 |
34 |
| - [:button#run-btn.btn.btn-default {:type "Button"} "Run"] " " |
35 |
| - [:button#save-btn.btn.btn-default {:type "Button"} "Save"] " " |
36 |
| - [:button#recent-btn.btn.btn-default {:type "Button"} "Recent"] " " |
37 |
| - [:button#about-btn.btn.btn-default {:type "Button"} "About"] " " |
38 |
| - [:button#about-btn.btn.btn-default {:type "Button"} "Help"] |
39 |
| - [:span.pull-right (if user |
40 |
| - [:a {:href "/logout"} "Logout (" user ")"] |
41 |
| - [:a {:href github-login-url} |
42 |
| - "Login with github"])]]] |
43 |
| - [:hr {:style "margin-top:4px;margin-bottom:4px;"}] |
| 31 | + (base [:nav.navbar.navbar-default {:role "navigation"} |
| 32 | + [:div.navbar-header |
| 33 | + [:button.navbar-toggle {:type "button" |
| 34 | + :data-toggle "collapse" |
| 35 | + :data-target ".navbar-ex1-collapse"} |
| 36 | + [:span.sr-only "Toggle navigation"] |
| 37 | + [:span.icon-bar] |
| 38 | + [:span.icon-bar] |
| 39 | + [:span.icon-bar]] |
| 40 | + [:a.navbar-brand "CLJSFiddle"]] |
| 41 | + [:div.collapse.navbar-collapse.navbar-ex1-collapse |
| 42 | + [:ul.nav.navbar-nav |
| 43 | + [:li [:button#run-btn.btn.btn-default.navbar-btn {:type "button"} "Run"] " "] |
| 44 | + [:li [:button#save-btn.btn.btn-default.navbar-btn {:type "button"} "Save"] " "] |
| 45 | + [:li [:button#about-btn.btn.btn-default.navbar-btn {:type "button"} "About"]]] |
| 46 | + [:ul.nav.navbar-nav.navbar-right |
| 47 | + [:li (if user |
| 48 | + [:a {:href "/logout"} "Logout (" user ")"] |
| 49 | + [:a {:href github-login-url} "Login"])]]]] |
44 | 50 | [:div.row
|
45 | 51 | [:div.col-lg-12
|
46 | 52 | [:div#alert]]]
|
47 | 53 | [:div.row
|
48 |
| - [:div.col-lg-6 [:textarea#html-editor (escape-html (:fiddle/html fiddle))]] |
49 |
| - [:div.col-lg-6 [:textarea#css-editor (escape-html (:fiddle/css fiddle))]]] |
50 |
| - [:div.row |
51 |
| - [:div.col-lg-6 [:textarea#cljs-editor (escape-html (:fiddle/cljs fiddle))]] |
| 54 | + [:div.col-lg-6 [:ul.nav.nav-tabs |
| 55 | + [:li.active [:a {:href "#cljs-editor-tab" :data-toggle "tab"} "cljs"]] |
| 56 | + [:li [:a {:href "#html-editor-tab" :data-toggle "tab"} "html"]] |
| 57 | + [:li [:a {:href "#css-editor-tab" :data-toggle "tab"} "css"]]] |
| 58 | + [:div.tab-content |
| 59 | + [:div#cljs-editor-tab.tab-pane.active |
| 60 | + [:textarea#cljs-editor.tab-pane.active (escape-html (:fiddle/cljs fiddle))]] |
| 61 | + [:div#html-editor-tab.tab-pane |
| 62 | + [:textarea#html-editor.tab-pane (escape-html (:fiddle/html fiddle))]] |
| 63 | + [:div#css-editor-tab.tab-pane |
| 64 | + [:textarea#css-editor.tab-pane (escape-html (:fiddle/css fiddle))]]]] |
52 | 65 | [:div.col-lg-6 [:iframe#result-frame {:seamless "seamless"
|
53 | 66 | :sandbox "allow-scripts"
|
54 | 67 | :width "100%"
|
55 |
| - :style "border: 1px solid lightgray;height:260px;"}]]] |
| 68 | + :style "border: 1px solid lightgray;height:500px;"}]]] |
56 | 69 | [:hr]
|
57 | 70 | [:div.row
|
58 | 71 | [:div.col-lg-12
|
59 | 72 | [:p.text-center {:style "margin-bottom: 10px;"}
|
60 |
| - [:a {:href "http://www.cljsfiddle.net"} "cljsfiddle"] " © 2013 Jonas Enlund"]]])) |
| 73 | + [:a {:href "http://cljsfiddle.net"} "cljsfiddle.net"] " © 2013 Jonas Enlund"]]])) |
0 commit comments