mproving layout
This commit is contained in:
@@ -68,9 +68,6 @@
|
|||||||
animation: flashPrimary 1.0s ease both;
|
animation: flashPrimary 1.0s ease both;
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
}
|
}
|
||||||
.left-nav {
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
.nav.is-dark {
|
.nav.is-dark {
|
||||||
background-color: #232B2D;
|
background-color: #232B2D;
|
||||||
color: #F6F7F7;
|
color: #F6F7F7;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html class="has-navbar-fixed-top">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
(let [client (re-frame/subscribe [::subs/client])
|
(let [client (re-frame/subscribe [::subs/client])
|
||||||
clients (re-frame/subscribe [::subs/clients])
|
clients (re-frame/subscribe [::subs/clients])
|
||||||
menu (re-frame/subscribe [::subs/menu])]
|
menu (re-frame/subscribe [::subs/menu])]
|
||||||
[:nav {:class "navbar has-shadow"}
|
[:nav {:class "navbar has-shadow is-fixed-top"}
|
||||||
[:div {:class "container"}
|
[:div {:class "container"}
|
||||||
[:div {:class "navbar-brand"}
|
[:div {:class "navbar-brand"}
|
||||||
[:a {:class "navbar-item", :href "../"}
|
[:a {:class "navbar-item", :href "../"}
|
||||||
@@ -76,22 +76,18 @@
|
|||||||
[login-dropdown]]]))
|
[login-dropdown]]]))
|
||||||
|
|
||||||
(defn footer []
|
(defn footer []
|
||||||
[:footer {:class "footer"}
|
[:footer {:style {:padding "1em"}}
|
||||||
[:div {:class "container"}
|
[:div {:class "content has-text-centered"}
|
||||||
[:div {:class "content has-text-centered"}
|
[:p
|
||||||
[:p
|
[:strong "Integreat"] ]]])
|
||||||
[:strong "Integreat"]]
|
|
||||||
[:p
|
|
||||||
[:a {:class "icon", :href "https://github.com/dansup/bulma-templates"}
|
|
||||||
[:i {:class "fa fa-github"}]]]]]])
|
|
||||||
|
|
||||||
(defn appearing-side-bar [{:keys [visible?]} & children ]
|
(defn appearing-side-bar [{:keys [visible?]} & children ]
|
||||||
(let [final-state (reagent/atom visible?)]
|
(let [final-state (reagent/atom visible?)]
|
||||||
(fn [{:keys [visible?]} & children]
|
(fn [{:keys [visible?]} & children]
|
||||||
[css-transition-group {:in visible? :class-names {:exitDone "bounce animated" :exit "fadeOutRight animated" :enter "fadeInRight animated"} :timeout 300 :onEnter (fn [] (reset! final-state true )) :onExited (fn [] (reset! final-state false))}
|
[css-transition-group {:in visible? :class-names {:exitDone "bounce animated" :exit "fadeOutRight animated" :enter "fadeInRight animated"} :timeout 300 :onEnter (fn [] (reset! final-state true )) :onExited (fn [] (reset! final-state false))}
|
||||||
(if (or @final-state visible?)
|
(if (or @final-state visible?)
|
||||||
[:aside {:class "column is-4 aside menu hero is-fullheight"}
|
[:aside {:class "column is-4 aside menu hero is-fullheight" :style {:height "100vh" :overflow "auto"}}
|
||||||
[:div.sub-main children]]
|
[:div.sub-main {:style {:padding-bottom "80px"}}children ]]
|
||||||
[:div])])))
|
[:div])])))
|
||||||
|
|
||||||
(defn side-bar-layout [{:keys [side-bar main ap bottom right-side-bar right-side-bar-visible?]}]
|
(defn side-bar-layout [{:keys [side-bar main ap bottom right-side-bar right-side-bar-visible?]}]
|
||||||
@@ -99,15 +95,16 @@
|
|||||||
client @(re-frame/subscribe [::subs/client])]
|
client @(re-frame/subscribe [::subs/client])]
|
||||||
[:div
|
[:div
|
||||||
[navbar ap]
|
[navbar ap]
|
||||||
[:div {:class "columns ", :id "mail-app"}
|
[:div {:class "columns has-shadow", :style {:margin-bottom "0px" :height "100vh"} :id "mail-app" }
|
||||||
[:aside {:class "column aside menu hero is-2"}
|
[:aside {:class "column aside menu is-2 " }
|
||||||
[:div.main.left-nav
|
[:div.main.left-nav
|
||||||
side-bar]]
|
[:div side-bar
|
||||||
[:div {:class "column messages hero is-fullheight ", :id "message-feed"}
|
]]]
|
||||||
|
[:div {:class "column messages hero is-fullheight " :style { :overflow "auto" }, :id "message-feed"}
|
||||||
^{:key (str "active-page-" (:name client))}
|
^{:key (str "active-page-" (:name client))}
|
||||||
[:div.inbox-messages main]]
|
[:div.inbox-messages main]]
|
||||||
[appearing-side-bar {:visible? right-side-bar-visible?} right-side-bar]]
|
[appearing-side-bar {:visible? right-side-bar-visible?} right-side-bar]]
|
||||||
[footer]
|
#_[footer]
|
||||||
bottom
|
bottom
|
||||||
[:div#dz-hidden]]))
|
[:div#dz-hidden]]))
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,6 @@
|
|||||||
(fn [db [_ x]]
|
(fn [db [_ x]]
|
||||||
(-> db ::forms x)))
|
(-> db ::forms x)))
|
||||||
|
|
||||||
;; TODO PREVENT DUPLICATES!
|
|
||||||
|
|
||||||
|
|
||||||
(re-frame/reg-sub
|
(re-frame/reg-sub
|
||||||
::loading-class
|
::loading-class
|
||||||
(fn [db [_ x]]
|
(fn [db [_ x]]
|
||||||
@@ -121,7 +118,6 @@
|
|||||||
::change-new
|
::change-new
|
||||||
[(re-frame/path [::forms ::new-client :data])]
|
[(re-frame/path [::forms ::new-client :data])]
|
||||||
(fn [db [_ path value]]
|
(fn [db [_ path value]]
|
||||||
(println db)
|
|
||||||
(assoc-in db path value)))
|
(assoc-in db path value)))
|
||||||
|
|
||||||
(re-frame/reg-event-db
|
(re-frame/reg-event-db
|
||||||
@@ -140,10 +136,13 @@
|
|||||||
(let [new-account (-> new-account
|
(let [new-account (-> new-account
|
||||||
(update :check-number #(if (seq %) (js/parseInt %) nil))
|
(update :check-number #(if (seq %) (js/parseInt %) nil))
|
||||||
(update :yodlee-account-id #(if (seq %) (js/parseInt %) nil)))]
|
(update :yodlee-account-id #(if (seq %) (js/parseInt %) nil)))]
|
||||||
(println new-account)
|
(if ((->> client (:bank-accounts)
|
||||||
(-> client
|
(map :code)
|
||||||
(update :bank-accounts conj new-account )
|
set) (:code new-account))
|
||||||
(assoc :new-account {:type :check})))))
|
client
|
||||||
|
(-> client
|
||||||
|
(update :bank-accounts conj new-account )
|
||||||
|
(assoc :new-account {:type :check}))))))
|
||||||
|
|
||||||
(re-frame/reg-event-db
|
(re-frame/reg-event-db
|
||||||
::remove-new-bank-account
|
::remove-new-bank-account
|
||||||
|
|||||||
Reference in New Issue
Block a user