Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(:refer-hoplon :exclude [main body])
(:refer-clojure :exclude [meta])
(:require-macros [ :as app])
(:require [app.routes :as routes]
[app.integrations :as int]
[ :as global]))
(def meta html-meta)
(defmethod do! :active
[elem k v]
(elem :class {:active v}))
(defelem main*
[attr kids]
(let [modal-backdrop (div)]
:lang "en"
(link :href (bust-cache "css/application.css") :rel "stylesheet")
(link :href "vendors/jqueryui/jquery-ui.css" :rel "stylesheet")
(link :rel "shortcut icon" :href "favicon.ico" :type "image/x-icon")
(link :rel "icon" :href "favicon.ico" :type "image/x-icon")
(meta :name "viewport" :content "width=device-width, initial-scale=1")
(title :text routes/page-title))
:class (cell= {:modal-open global/modal-open})
;; clickjacking countermeasures
(if (not= js/top js/self)
(set! (.-location js/top) (.-location js/self))
:toggle global/modal-open
:class (cell= {:modal-backdrop true
:fade true
:in global/modal-open}))
(defelem intercept [attr kids]
((div :class "intercept"
(div :class "intercept-content"
(defelem body
[attr kids]
((div :class "body") attr kids))
(defelem app
[attr kids]
((div :class "app") attr kids))
(defelem large-only
[_ kids]
(map #(% :class "large-only") kids))
(defelem small-only
[_ kids]
(map #(% :class "small-only") kids))
(defelem container-fluid
[attr kids]
((div :class "container-fluid") attr kids))
(defelem row
[attr kids]
((div :class "row") attr kids))
(defelem col-md-3
[attr kids]
((div :class "col-md-3") attr kids))
(defelem col-md-6
[attr kids]
((div :class "col-md-6") attr kids))
(defelem col-md-9
[attr kids]
((div :class "col-md-9") attr kids))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment