Created
May 7, 2010 19:07
-
-
Save devn/393875 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn application [text body] | |
| (html | |
| [:html | |
| [:head | |
| (include-js "/javascript/jquery.js" | |
| "/javascript/syntaxhilighter/scripts/shCore.js" | |
| "/javascript/syntaxhilighter/scripts/shBrushClojure.js" | |
| "/javascript/application.js") | |
| (include-css "/javascript/syntaxhilighter/styles/shCore.css" | |
| "/javascript/syntaxhilighter/styles/shThemeDefault.css" | |
| "/css/application.css") | |
| (javascript-tag "SyntaxHighlighter.defaults['gutter'] = false; | |
| SyntaxHighlighter.defaults['toolbar'] = false; | |
| SyntaxHighlighter.defaults['light'] = true; | |
| SyntaxHighlighter.all();") | |
| [:title text]] | |
| [:body | |
| [:div#wrapper | |
| [:div#nav] | |
| [:div#content | |
| [:div.doc-header | |
| [:div.docstring | |
| [:h1 text] | |
| (let [sym (-> (str "clojure.core/" text) symbol find-var)] | |
| (if (meta sym) | |
| [:div.arglist (code* (str (:arglists (meta sym))))]))] | |
| (let [sym (-> (str "clojure.core/" text) symbol find-var)] | |
| (if (meta sym) | |
| (html [:p | |
| (when (:macro (meta sym)) | |
| [:b "Macro" [:br]]) | |
| [:i (str (ns-name (:ns (meta sym))) "/" | |
| (:name (meta sym)))] ": " | |
| (str (:doc (meta sym)))])))] | |
| [:div.examples | |
| body]]]]])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment