|
1 | 1 | (ns tryclojure.views.home |
2 | | - (:require [noir.core :refer [defpartial defpage]] |
3 | | - [hiccup.element :refer [javascript-tag link-to unordered-list]] |
4 | | - [hiccup.page :refer [include-css include-js html5]])) |
| 2 | + (:require [hiccup.element :refer [javascript-tag link-to unordered-list]] |
| 3 | + [hiccup.page :refer [include-css include-js html5]] |
| 4 | + [hiccup.core :refer [html]])) |
5 | 5 |
|
6 | | -(defpartial links-html [] |
7 | | - (unordered-list |
8 | | - [(link-to "http://clojure.org" "The official Clojure website") |
9 | | - (link-to "http://clojure-doc.org/" "Clojure tutorials and documentation") |
10 | | - (link-to "http://groups.google.com/group/clojure" "Clojure mailing list") |
11 | | - (link-to "http://joyofclojure.com/" "The Joy of Clojure: a book by Michael Fogus and Chris Houser") |
12 | | - (link-to "http://disclojure.org" "Disclojure") |
13 | | - (link-to "http://planet.clojure.in" "Planet Clojure")])) |
| 6 | +(defn links-html [] |
| 7 | + (html |
| 8 | + (unordered-list |
| 9 | + [(link-to "http://clojure.org" "The official Clojure website") |
| 10 | + (link-to "http://clojure-doc.org/" "Clojure tutorials and documentation") |
| 11 | + (link-to "http://groups.google.com/group/clojure" "Clojure mailing list") |
| 12 | + (link-to "http://joyofclojure.com/" "The Joy of Clojure: a book by Michael Fogus and Chris Houser") |
| 13 | + (link-to "http://disclojure.org" "Disclojure") |
| 14 | + (link-to "http://planet.clojure.in" "Planet Clojure")]))) |
14 | 15 |
|
15 | | -(defpartial about-html [] |
16 | | - [:p.bottom |
17 | | - "Welcome to Try Clojure - a quick tour of Clojure for absolute beginners." |
18 | | - ] |
19 | | - [:p.bottom |
20 | | - "Here is our only disclaimer: this site is an introduction to Clojure, not a generic Clojure REPL. " |
21 | | - "You won't be able to do everything in it that you could do in your local interpreter. " |
22 | | - "Also, the interpreter deletes the data that you enter if you define too many things, or after 15 minutes."] |
23 | | - [:p.bottom |
24 | | - "TryClojure is written in Clojure and JavaScript with " |
25 | | - (link-to "http://webnoir.org" "Noir") ", " |
26 | | - (link-to "https://github.com/flatland/clojail" "clojail") ", and Chris Done's " |
27 | | - (link-to "https://github.com/chrisdone/jquery-console" "jquery-console") ". " |
28 | | - " The design is by " (link-to "http://apgwoz.com" "Andrew Gwozdziewycz") "." |
29 | | - ]) |
| 16 | +(defn about-html [] |
| 17 | + (html |
| 18 | + [:p.bottom |
| 19 | + "Welcome to Try Clojure - a quick tour of Clojure for absolute beginners."] |
| 20 | + [:p.bottom |
| 21 | + "Here is our only disclaimer: this site is an introduction to Clojure, not a generic Clojure REPL. " |
| 22 | + "You won't be able to do everything in it that you could do in your local interpreter. " |
| 23 | + "Also, the interpreter deletes the data that you enter if you define too many things, or after 15 minutes."] |
| 24 | + [:p.bottom |
| 25 | + "TryClojure is written in Clojure and JavaScript with " |
| 26 | + (link-to "https://github.com/weavejester/compojure" "Compojure") ", " |
| 27 | + (link-to "https://github.com/noir-clojure/lib-noir" "lib-noir") ", " |
| 28 | + (link-to "https://github.com/flatland/clojail" "clojail") ", and Chris Done's " |
| 29 | + (link-to "https://github.com/chrisdone/jquery-console" "jquery-console") ". " |
| 30 | + " The design is by " (link-to "http://apgwoz.com" "Andrew Gwozdziewycz") "."])) |
30 | 31 |
|
31 | | -(defpartial home-html [] |
32 | | - [:p.bottom |
33 | | - "Welcome to Clojure! " |
34 | | - "You can see a Clojure interpreter above - we call it a <em>REPL</em>." |
35 | | - ] |
36 | | - [:p.bottom |
37 | | - "Type <code>next</code> in the REPL to begin." |
38 | | - ]) |
| 32 | +(defn home-html [] |
| 33 | + (html |
| 34 | + [:p.bottom |
| 35 | + "Welcome to Clojure! " |
| 36 | + "You can see a Clojure interpreter above - we call it a <em>REPL</em>."] |
| 37 | + [:p.bottom "Type <code>next</code> in the REPL to begin." ])) |
39 | 38 |
|
40 | 39 | (defn root-html [] |
41 | 40 | (html5 |
42 | 41 | [:head |
43 | | - (include-css "/resources/public/css/tryclojure.css" |
44 | | - "/resources/public/css/gh-fork-ribbon.css") |
| 42 | + (include-css "/css/tryclojure.css" |
| 43 | + "/css/gh-fork-ribbon.css") |
45 | 44 | (include-js "http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" |
46 | | - "/resources/public/javascript/jquery-console/jquery.console.js" |
47 | | - "/resources/public/javascript/tryclojure.js") |
| 45 | + "/javascript/jquery-console/jquery.console.js" |
| 46 | + "/javascript/tryclojure.js") |
48 | 47 | [:title "Try Clojure"]] |
49 | 48 | [:body |
50 | 49 | [:div#wrapper |
51 | | - [:div.github-fork-ribbon-wrapper.right |
52 | | - [:div.github-fork-ribbon |
53 | | - (link-to "https://github.com/Raynes/tryclojure" "Fork me on GitHub") |
54 | | - ] |
55 | | - ] |
| 50 | + [:div.github-fork-ribbon-wrapper.right |
| 51 | + [:div.github-fork-ribbon |
| 52 | + (link-to "https://github.com/Raynes/tryclojure" "Fork me on GitHub")]] |
56 | 53 | [:div#content |
57 | 54 | [:div#header |
58 | 55 | [:h1 |
|
77 | 74 | var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
78 | 75 | })();")]]])) |
79 | 76 |
|
80 | | -(defpage "/" [] |
81 | | - (root-html)) |
82 | | - |
83 | | -(defpage "/home" [] |
84 | | - (home-html)) |
85 | | - |
86 | | -(defpage "/about" [] |
87 | | - (about-html)) |
88 | | - |
89 | | -(defpage "/links" [] |
90 | | - (links-html)) |
0 commit comments