Merge pull request #127 from benjamin-bader/fix-floating-toc

Actually inserting floating-toc HTML into generated uberdoc.
This commit is contained in:
Gary Deer 2014-02-27 18:45:03 -06:00
commit 91ba89b950

View file

@ -346,7 +346,7 @@
"Notice that we're inlining the css & javascript for [SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/) (`inline-js` "Notice that we're inlining the css & javascript for [SyntaxHighlighter](http://alexgorbatchev.com/SyntaxHighlighter/) (`inline-js`
& `inline-css`) to be able to package the output as a single file (uberdoc if you will). It goes without & `inline-css`) to be able to package the output as a single file (uberdoc if you will). It goes without
saying that all this is WIP and will probably change in the future." saying that all this is WIP and will probably change in the future."
[project-metadata opt-resources header toc content] [project-metadata opt-resources header toc content floating-toc]
(html (html
"<!DOCTYPE html>\n" "<!DOCTYPE html>\n"
[:html [:html
@ -379,7 +379,7 @@
"Syntax highlighting provided by Alex Gorbatchev's " "Syntax highlighting provided by Alex Gorbatchev's "
[:a {:href "http://alexgorbatchev.com/SyntaxHighlighter/"} [:a {:href "http://alexgorbatchev.com/SyntaxHighlighter/"}
"SyntaxHighlighter"] "SyntaxHighlighter"]
floating-toc-html] floating-toc]
(inline-js (str *resources* "app.js"))]])) (inline-js (str *resources* "app.js"))]]))
@ -396,7 +396,8 @@
(opt-resources-html project-metadata) (opt-resources-html project-metadata)
(header-html project-metadata) (header-html project-metadata)
(toc-html {:uberdoc? true} docs) (toc-html {:uberdoc? true} docs)
(map #(groups-html {:uberdoc? true} %) docs))) (map #(groups-html {:uberdoc? true} %) docs)
(floating-toc-html docs)))
(defn index-html (defn index-html
[project-metadata docs] [project-metadata docs]
@ -405,7 +406,8 @@
(opt-resources-html project-metadata) (opt-resources-html project-metadata)
(header-html project-metadata) (header-html project-metadata)
(toc-html {:uberdoc? false} docs) (toc-html {:uberdoc? false} docs)
"")) ;; no contents "" ;; no contents
"")) ;; no floating toc
(defn single-page-html (defn single-page-html
[project-metadata doc all-docs] [project-metadata doc all-docs]
@ -414,4 +416,6 @@
(opt-resources-html project-metadata) (opt-resources-html project-metadata)
"" ;; no header "" ;; no header
"" ;; no toc "" ;; no toc
(groups-html {:uberdoc? false} doc))) (groups-html {:uberdoc? false} doc)
"" ;; no floating toc
))