nicer breadcrumbs

Josha von Gizycki 5 years ago
parent 39b13d25c9
commit 8e70dcd71a

@ -104,6 +104,11 @@ body {
font-family: 'jetbrains-mono';
}
.breadcrumb img {
height: 1.4rem;
margin: 0 .6rem;
}
.breadcrumb-item + .breadcrumb-item::before {
content: "//";
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg width="68.013" height="198.4" version="1.1" viewBox="0 0 68.013 198.4" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata>
<style type="text/css">
.st0{fill:#565656;}
.st1{fill:#FFCC00;}
.st2{fill:#FFFFFF;}
</style>
<path class="st1" d="m60.513 198.4h-25.2c-4.1 0-7.5-3.4-7.5-7.5v-35h-20.3c-2.7 0-5.1-1.4-6.5-3.7-1.3-2.3-1.4-5.2 0-7.5l26.8-47.2v-90c0-4.1 3.4-7.5 7.5-7.5h25.2c4.1 0 7.5 3.4 7.5 7.5s-3.4 7.5-7.5 7.5h-17.7v84.5c0 1.3-0.3 2.6-1 3.7l-21.4 37.7h14.9c4.1 0 7.5 3.4 7.5 7.5v35h17.7c4.1 0 7.5 3.4 7.5 7.5s-3.3 7.5-7.5 7.5z" fill="#fc0"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -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)))

@ -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))])]))

Loading…
Cancel
Save