diff --git a/resources/public/css/public.css b/resources/public/css/public.css index 2c5c6bf..38efecb 100644 --- a/resources/public/css/public.css +++ b/resources/public/css/public.css @@ -104,6 +104,11 @@ body { font-family: 'jetbrains-mono'; } +.breadcrumb img { + height: 1.4rem; + margin: 0 .6rem; +} + .breadcrumb-item + .breadcrumb-item::before { content: "//"; } diff --git a/resources/public/img/klammer.svg b/resources/public/img/klammer.svg new file mode 100644 index 0000000..24f5cdd --- /dev/null +++ b/resources/public/img/klammer.svg @@ -0,0 +1,12 @@ + + +image/svg+xml + + + + + diff --git a/src/wanijo/public/routes.clj b/src/wanijo/public/routes.clj index be421be..35db308 100644 --- a/src/wanijo/public/routes.clj +++ b/src/wanijo/public/routes.clj @@ -19,7 +19,7 @@ (defroutes routes (GET (register! :public-index "/public") [] (index)) - (GET (register! :public-coc-roles "/public/:coc") [coc] (show-coc coc)) + (GET (register! :public-coc "/public/:coc") [coc] (show-coc coc)) (GET (register! :public-role-modules "/public/:coc/:level") [coc level] (show-modules coc level))) diff --git a/src/wanijo/public/view.clj b/src/wanijo/public/view.clj index c900c6f..2521188 100644 --- a/src/wanijo/public/view.clj +++ b/src/wanijo/public/view.clj @@ -3,6 +3,16 @@ [hiccup.core :refer [h]] [wanijo.infrastructure.routing :refer [path]])) +(defn breadcrumb [& links] + [:nav + [:ol.breadcrumb + (into + [:li.breadcrumb-item + [:a {:href (path :public-index)} + [:img {:src "/img/klammer.svg"}] + "Start"]] + links)]]) + (defn layout [title content] (html5 [:head @@ -30,13 +40,13 @@ [:menu.global-nav [:ol.global-nav__card-nav [:li.global-nav__card-nav-item - [:a.global-nav__link {:href (path :public-coc-roles {:coc "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-roles {:coc "prk"})} + [: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-roles {:coc "req"})} + [:a.global-nav__link {:href (path :public-coc {:coc "req"})} "Req. Eng."]]]] (into [:div.content] content)]])) @@ -82,11 +92,8 @@ {:coc (:key coc) :level (:uuid level)})} (h (:name level))]]])))]]]] - [:nav - [:ol.breadcrumb - [:li.breadcrumb-item - [:a {:href (path :public-index)} "Start"]] - [:li.breadcrumb-item.active (h (:name coc))]]]])) + (breadcrumb + [:li.breadcrumb-item.active (h (:name coc))])])) (defn show-modules [coc level modules-with-comps] (layout @@ -111,12 +118,9 @@ (for [compo (rest comps)] [:tr [:td (h (:name compo))]])))]]]] - [:nav - [:ol.breadcrumb - [:li.breadcrumb-item - [:a {:href (path :public-index)} "Start"]] + (breadcrumb [:li.breadcrumb-item - [:a {:href (path :public-coc-roles + [:a {:href (path :public-coc {:coc (:key coc)})} (h (:name coc))]] - [:li.breadcrumb-item.active (h (:name level))]]]])) + [:li.breadcrumb-item.active (h (:name level))])]))