Josha von Gizycki 5 years ago
parent f3e3c67cde
commit 627dc678a9

@ -1,7 +1,8 @@
(ns wanijo.infrastructure.repl (ns wanijo.infrastructure.repl
(:require [buddy.hashers :as hashers] (:require [buddy.hashers :as hashers]
[neo4j-clj.core :as db] [neo4j-clj.core :as db]
[wanijo.infrastructure.neo4j :as neo4j])) [wanijo.infrastructure.neo4j :as neo4j]
[wanijo.main :as main]))
(db/defquery create-user (db/defquery create-user
"CREATE (n:user) "CREATE (n:user)
@ -93,3 +94,7 @@
(neo4j/exec-query! merge-config {:now (neo4j/now-str) (neo4j/exec-query! merge-config {:now (neo4j/now-str)
:version (count migrations)}) :version (count migrations)})
nil) nil)
(defn dev-server! []
(main/stop-server!)
(main/start-server-dev!))

@ -20,7 +20,8 @@
:handler wanijo-handler/dev-app)) :handler wanijo-handler/dev-app))
(defn stop-server! [] (defn stop-server! []
(.stop @server)) (when @server
(.stop @server)))
(defn restart-server-dev! [] (defn restart-server-dev! []
(stop-server!) (stop-server!)

@ -0,0 +1,10 @@
(ns wanijo.public.db
(:require [wanijo.infrastructure.neo4j :as neo4j]))
(def key-mapping
{"dev" "Development"
"req" "Projekte"
"prk" "Requirements Engineering"})
(neo4j/defquery roles
"MATCH (i:instance {name:{name}})")

@ -6,5 +6,9 @@
(defn index [] (defn index []
(view-public/index)) (view-public/index))
(defn show-coc [coc]
(view-public/show-coc coc))
(defroutes routes (defroutes routes
(GET (register! :public-index "/public") [] (index))) (GET (register! :public-index "/public") [] (index))
(GET (register! :public-coc "/public/:coc") [coc] (show-coc coc)))

@ -20,16 +20,23 @@
[:button.navbar-toggler {:type "button" [:button.navbar-toggler {:type "button"
:data-toggle "collapse" :data-toggle "collapse"
:data-target "#navbar-content"} :data-target "#navbar-content"}
[:span.navbar-toǵgler-icon]] [:span.navbar-toggler-icon]]
[:div#navbar-content.collapse.navbar-collapse.text-right [:div#navbar-content.collapse.navbar-collapse.text-right
[:div#navbar-nav.ml-auto [:div#navbar-nav.ml-auto
"Dingens"]]] [:a {:href (path :auth-login)}
"Login"]]]]
[:div.container-fluid.super-container [:div.container-fluid.super-container
[:menu.global-nav [:menu.global-nav
[:ol.global-nav__card-nav [:ol.global-nav__card-nav
[:li.global-nav__card-nav-item [:li.global-nav__card-nav-item
[:a.global-nav__link {:href "#"} [:a.global-nav__link {:href (path :public-coc {:coc "dev"})}
"Dev"]]]] "Development"]]
[:li.global-nav__card-nav-item
[:a.global-nav__link {:href (path :public-coc {:coc "prk"})}
"Projekte"]]
[:li.global-nav__card-nav-item
[:a.global-nav__link {:href (path :public-coc {:coc "req"})}
"Req. Eng."]]]]
(into [:main.main] content)]])) (into [:main.main] content)]]))
(defn index [] (defn index []
@ -41,3 +48,7 @@
[:p "Du möchtest dich weiterentwickeln?" [:p "Du möchtest dich weiterentwickeln?"
"Dann gestalte selbst deinen Weg bei der TRIO und sprich" "Dann gestalte selbst deinen Weg bei der TRIO und sprich"
"deinen Vorgesetzten an"]])) "deinen Vorgesetzten an"]]))
(defn show-coc [coc]
(layout
[[:h1 "CoC " coc]]))

Loading…
Cancel
Save