(rum/defc app < rum/reactive [*state]
(let [{:keys [ns-sym ns-meta var-sym vars
cljs-started? prod? static? hide-sidebar? update?]
:as state} (rum/react *state)]
[:div
(when-not hide-sidebar?
(sidebar state))
(conj
(if ns-sym
(into [:div {:class "vars"
:style {:left (if hide-sidebar? 0 300)}}
(export state *state)
(when-not var-sym
[:div
[:center [:h1 (str ns-sym)]]
(when-let [doc (:doc ns-meta)]
[:div {:class "section doc"} doc])])]
(mapv (partial var->html state) vars))
[:div {:class "vars"}
(export state *state)])
(when update?
[:div {:class "footer"}
[:h2
[:a {:href page-url
:target "_blank"}
"New version of Dynadoc!"]]])
(cond
static?
[:div {:class "footer"}
"Generated by "
[:a {:href "https://github.com/oakes/Dynadoc"
:target "_blank"}
"Dynadoc"]]
(and cljs-started? (not prod?))
[:div {:class "footer"}
"This is a custom build of "
[:a {:href "https://github.com/oakes/Dynadoc"
:target "_blank"}
"Dynadoc"]]))]))