 (ns frontend.components.landing-b
   (:require [cljs.core.async :as async :refer [>! <! alts! chan sliding-buffer close!]]
             [clojure.string :as str]
+            [dommy.core :as dommy]
             [frontend.async :refer [put!]]
             [frontend.components.common :as common]
             [frontend.components.crumbs :as crumbs]

                    "scroll"
                    scroll-callback))))

(defn home [app owner]
  (reify
    om/IDidMount (did-mount [_] (mount-header-logo-scroll owner))
    om/IInitState
    (init-state [_]
      {:header-logo-visible false

       :header-bkg-invisible false
       :first-fig-animate false
       :first-fig-visible false
       :scrollbar-width 0
       :scroll-ch (chan (sliding-buffer 1))})
    om/IRenderState
    (render-state [_ state]
      (let [ab-tests (:ab-tests app)
            controls-ch (om/get-shared owner [:comms :controls])]
        (html [:div.home.page
               [:nav.home-nav {:style (merge {:width (if (< 0 (:scrollbar-width state))
                                                       (str "calc(100% - " (:scrollbar-width state) "px)")
                                                       "100%")}
                                             (when (> 70 (:header-bkg-scroller state))
                                               {:background-size (str "100% " (:header-bkg-scroller state) "px")}))
                               :class (concat
