Skip to content

Commit

Permalink
move header stuff into separate ns
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jun 2, 2016
1 parent 1db979a commit 9ca5716
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
(ns ulysses.components.misc
(ns ulysses.components.header
(:require [ulysses.components.basic :refer [link fa]]
[ulysses.config :as config]
[re-frame.core :as re-frame :refer [subscribe]]))

;; ----------------------------------------------------------------------------
;; sub-components
;; ----------------------------------------------------------------------------

(defn progress []
(let [is-loading (subscribe [:is-loading])
scroll-y (subscribe [:scroll-y])]
Expand Down Expand Up @@ -37,3 +41,12 @@
[:ul.nav.navbar-nav.red-button-menu.pull-right
[uconn-banner-right-menu-item "http://uconn.edu/search" :search]
[uconn-banner-right-menu-item "http://uconn.edu/az/" :sort-alpha-asc]]]))

;; ----------------------------------------------------------------------------
;; main
;; ----------------------------------------------------------------------------

(defn header []
[:header.header
[uconn-banner]
[main-logo]])
5 changes: 2 additions & 3 deletions src/cljs/ulysses/components/layout.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns ulysses.components.layout
(:require [reagent.core :as r]
[ulysses.components.misc :refer [uconn-banner main-logo progress]]
[ulysses.components.header :refer [header]]
[ulysses.components.basic :refer [css-transition-group-standard]]
[ulysses.lib.moment :as m]))

Expand All @@ -10,8 +10,7 @@

(defn shell [page-name page]
[:div.shell
[uconn-banner]
[main-logo]
[header]
; page
[css-transition-group-standard
[^{:key (name page-name)} [:div.page page]]]
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/ulysses/handlers.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
(assoc-in db [:builder-filters :faculty-years-uconn]
(or (str->int years-uconn) 0))))

;; builder faculty workspace hover
;; builder faculty workspace hover ----

(register-handler
:builder-faculties-workspace-hover
Expand Down
11 changes: 8 additions & 3 deletions src/cljs/ulysses/pages/builder.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
(map-subels pool-row faculties-and-metrics)]]]))

(defn builder-panel
[grant faculties faculty-titles
[op faculties faculty-titles
faculties-pool faculties-workspace
faculties-workspace-hover
builder-filters]
Expand All @@ -146,6 +146,11 @@
[:div.inner
[:h3 "Word Cloud"]]]]])

(defn builder-header
[op]
[:div.builder-header
[:h3.text-xs-center.mb-15 (:title op)]])

;; ----------------------------------------------------------------------------
;; main
;; ----------------------------------------------------------------------------
Expand Down Expand Up @@ -193,8 +198,8 @@
_ @page-with-args]
(if op
[:div
[:h3.text-xs-center.mb-15 (:title op)]
[:div [builder-panel op fa ft fp fw fh bf]]]
[builder-header op]
[builder-panel op fa ft fp fw fh bf]]
[loading-or-no-results
:not-found-message
"The requested grant opportunity was not found."])))})))

0 comments on commit 9ca5716

Please sign in to comment.