             [om.core :as om :include-macros true]
             [om.dom :as dom :include-macros true]
             [frontend.components.common :as common]
+            [frontend.controllers.navigation :as navigation]
             [frontend.state :as state]
             [frontend.utils :as utils :include-macros true]
             [frontend.utils.ajax :as ajax]

         [:article
          (if-not subpage
            (om/build front-page app)
            (om/build docs-subpage (get docs subpage)))]]]]])))

(defn docs-subpage [doc owner]
  (reify
    om/IDidMount
    (did-mount [_]
      (add-link-targets (om/get-node owner))
      (navigation/scroll-to-fragment! (-> owner om/get-state :_fragment)))
    om/IDidUpdate
    (did-update [_ _ _]
      (add-link-targets (om/get-node owner))
      (navigation/scroll-to-fragment! (-> owner om/get-state :_fragment)))
    om/IRender
    (render [_]
      (html
