Merge branch 'compmstr-master'
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Fira Sans", "Source Sans Pro", "Helvetica Neue", sans-serif;
|
font-family: "Fira Sans", "Source Sans Pro", "Helvetica Neue", sans-serif;
|
||||||
background-color: #293134;
|
background-color: #293134;
|
||||||
@@ -26,18 +24,11 @@ a:hover {
|
|||||||
transition-property: opacity;
|
transition-property: opacity;
|
||||||
transition-duration: 200ms;
|
transition-duration: 200ms;
|
||||||
transition-timing-function: cubic-bezier(.53,.4,.46,.75);
|
transition-timing-function: cubic-bezier(.53,.4,.46,.75);
|
||||||
width: 240px;
|
|
||||||
height: 100%;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
position: fixed;
|
|
||||||
overflow: auto;
|
|
||||||
padding: 0px 0px 0px 10px;
|
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar:hover {
|
.sidebar:hover {
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ns {
|
.ns {
|
||||||
@@ -56,7 +47,6 @@ a:hover {
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 20px 0px 20px 20px;
|
padding: 20px 0px 20px 20px;
|
||||||
margin-left: 250px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content code {
|
.content code {
|
||||||
|
|||||||
9
doclet/resources/nav.js
Normal file
9
doclet/resources/nav.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
function goToHash() {
|
||||||
|
if (window.location.hash != "") {
|
||||||
|
document.getElementById("content-frame").src = window.location.hash.substr(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setHash(link) {
|
||||||
|
window.parent.location.hash = link.getAttribute("newHash")
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
(cons [:div {:class "ns"} ns]
|
(cons [:div {:class "ns"} ns]
|
||||||
(for [{:keys [name]} groups]
|
(for [{:keys [name]} groups]
|
||||||
[:div {:class "name"}
|
[:div {:class "name"}
|
||||||
[:a {:href (str->filename ns name)}
|
[:a {:href (str->filename ns name) :target "content-frame" :onClick (str "setHash(this)") :newHash (str->filename ns name)}
|
||||||
name]])))])
|
name]])))])
|
||||||
|
|
||||||
(defn java-param
|
(defn java-param
|
||||||
@@ -41,12 +41,17 @@
|
|||||||
[:div {:class "j-doc"} text])])
|
[:div {:class "j-doc"} text])])
|
||||||
|
|
||||||
(defn content
|
(defn content
|
||||||
[{:keys [name docstring arglists java raw raw*]}]
|
[{:keys [name docstring arglists java raw raw*]} & [home-link-hash]]
|
||||||
[:div {:class "content"}
|
[:div {:class "content"}
|
||||||
[:div {:class "item"}
|
[:div {:class "item"}
|
||||||
[:div {:class "clj"}
|
[:div {:class "clj"}
|
||||||
(for [args arglists]
|
(for [args arglists]
|
||||||
[:div {:class "c-head"} (pr-str args)])
|
[:div {:class "c-head"}
|
||||||
|
(if home-link-hash
|
||||||
|
[:a {:href (str "index.html" (str "#" home-link-hash))
|
||||||
|
:target "_top"}
|
||||||
|
(pr-str args)]
|
||||||
|
(pr-str args))])
|
||||||
[:div {:class "c-doc"} docstring]]
|
[:div {:class "c-doc"} docstring]]
|
||||||
(when (> (count java) 0)
|
(when (> (count java) 0)
|
||||||
(list [:div {:class "c-head"} "Options"]
|
(list [:div {:class "c-head"} "Options"]
|
||||||
@@ -61,17 +66,17 @@
|
|||||||
[:pre raw]]]])
|
[:pre raw]]]])
|
||||||
|
|
||||||
(defn create-site-file
|
(defn create-site-file
|
||||||
[name sidebar content]
|
([name content]
|
||||||
(html [:html
|
(html [:html
|
||||||
[:head
|
[:head
|
||||||
[:title name]
|
[:title name]
|
||||||
[:link {:rel "stylesheet" :href "highlight.css"}]
|
[:script {:src "nav.js"}]
|
||||||
[:link {:rel "stylesheet" :href "main.css"}]]
|
[:link {:rel "stylesheet" :href "highlight.css"}]
|
||||||
[:body
|
[:link {:rel "stylesheet" :href "main.css"}]]
|
||||||
sidebar
|
[:body
|
||||||
content
|
content
|
||||||
[:script {:src "highlight.js"}]
|
[:script {:src "highlight.js"}]
|
||||||
[:script {:src "main.js"}]]]))
|
[:script {:src "main.js"}]]])))
|
||||||
|
|
||||||
(defn create-embed-file
|
(defn create-embed-file
|
||||||
[content]
|
[content]
|
||||||
@@ -82,19 +87,39 @@
|
|||||||
(spit (io/file dir file-name)
|
(spit (io/file dir file-name)
|
||||||
(-> file-name io/resource slurp)))
|
(-> file-name io/resource slurp)))
|
||||||
|
|
||||||
|
(defn index-frameset
|
||||||
|
[]
|
||||||
|
(html
|
||||||
|
[:html
|
||||||
|
[:head
|
||||||
|
[:title "play-clj docs"]
|
||||||
|
[:script {:src "nav.js"}]
|
||||||
|
[:link {:rel "stylesheet" :href "highlight.css"}]
|
||||||
|
[:link {:rel "stylesheet" :href "main.css"}]]
|
||||||
|
[:frameset {:cols "250px,100%" :onLoad "goToHash();"}
|
||||||
|
[:frame {:src "sidebar.html"}]
|
||||||
|
[:frame {:src "blank.html" :name "content-frame" :id "content-frame"}]
|
||||||
|
[:script {:src "highlight.js"}]
|
||||||
|
[:script {:src "main.js"}]]]))
|
||||||
|
|
||||||
(defn create-site!
|
(defn create-site!
|
||||||
[dir parsed-files]
|
[dir parsed-files]
|
||||||
(.mkdir (io/file dir))
|
(.mkdir (io/file dir))
|
||||||
(copy-from-res dir "main.css")
|
(copy-from-res dir "main.css")
|
||||||
(copy-from-res dir "main.js")
|
(copy-from-res dir "main.js")
|
||||||
|
(copy-from-res dir "nav.js")
|
||||||
(copy-from-res dir "highlight.css")
|
(copy-from-res dir "highlight.css")
|
||||||
(copy-from-res dir "highlight.js")
|
(copy-from-res dir "highlight.js")
|
||||||
(doseq [[ns groups] parsed-files]
|
(doseq [[ns groups] parsed-files]
|
||||||
(doseq [{:keys [name] :as group} groups]
|
(doseq [{:keys [name] :as group} groups]
|
||||||
(spit (io/file dir (str->filename ns name))
|
(spit (io/file dir (str->filename ns name))
|
||||||
(create-site-file name (sidebar parsed-files) (content group)))))
|
(create-site-file name (content group (str->filename ns name))))))
|
||||||
|
(spit (io/file dir "sidebar.html")
|
||||||
|
(create-site-file "sidebar" (sidebar parsed-files)))
|
||||||
|
(spit (io/file dir "blank.html")
|
||||||
|
(create-site-file "blank" nil))
|
||||||
(spit (io/file dir "index.html")
|
(spit (io/file dir "index.html")
|
||||||
(create-site-file "play-clj docs" (sidebar parsed-files) nil))
|
(index-frameset))
|
||||||
(println "Created" (str dir "/")))
|
(println "Created" (str dir "/")))
|
||||||
|
|
||||||
(defn create-embed!
|
(defn create-embed!
|
||||||
|
|||||||
Reference in New Issue
Block a user