Josha von Gizycki 5 years ago
parent f3e3c67cde
commit 627dc678a9

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

@ -20,7 +20,8 @@
:handler wanijo-handler/dev-app))
(defn stop-server! []
(.stop @server))
(when @server
(.stop @server)))
(defn restart-server-dev! []
(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 []
(view-public/index))
(defn show-coc [coc]
(view-public/show-coc coc))
(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"
:data-toggle "collapse"
:data-target "#navbar-content"}
[:span.navbar-toǵgler-icon]]
[:span.navbar-toggler-icon]]
[:div#navbar-content.collapse.navbar-collapse.text-right
[:div#navbar-nav.ml-auto
"Dingens"]]]
[:a {:href (path :auth-login)}
"Login"]]]]
[:div.container-fluid.super-container
[:menu.global-nav
[:ol.global-nav__card-nav
[:li.global-nav__card-nav-item
[:a.global-nav__link {:href "#"}
"Dev"]]]]
[:a.global-nav__link {:href (path :public-coc {:coc "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)]]))
(defn index []
@ -41,3 +48,7 @@
[:p "Du möchtest dich weiterentwickeln?"
"Dann gestalte selbst deinen Weg bei der TRIO und sprich"
"deinen Vorgesetzten an"]]))
(defn show-coc [coc]
(layout
[[:h1 "CoC " coc]]))

Loading…
Cancel
Save