Commit f10d86c9 authored by betz's avatar betz

breadcrumb

parent 1870d004
Pipeline #36128583 passed with stages
in 26 seconds
......@@ -4,6 +4,8 @@
<h1>{{ .Title }}</h1>
{{ end }}
{{ partial "breadcrumbs.html" . }}
<h4 class="datetime">
{{ .Params.eventtype }} {{ if isset .Params "startdate"}}{{ .Params.startdate | dateFormat "Monday 2 January 2006"}}{{ end }} {{ if isset .Params "starttime"}}({{ .Params.starttime }}){{ end }}{{ if or (isset .Params "enddate") (isset .Params "endtime")}} till {{ end }}{{ if isset .Params "enddate"}}{{ .Params.enddate | dateFormat "Monday 2 January 2006"}}{{ end }}{{ if isset .Params "endtime"}} ({{ .Params.endtime }}){{ end }}{{ if isset .Params "location"}} @ {{ .Params.location }}{{ end }}.
</h4>
......
{{ $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" }}
{{ $.Scratch.Add "path" .Site.BaseURL }}
<ul class="breadcrumb">
<li><a href="/">Root</a></li>
{{ range $index, $element := split $url "/" }}
{{ $.Scratch.Add "path" $element }}
{{ if ne $element "" }}
<li> > <a href='{{ $.Scratch.Get "path" }}'>{{ . }}</a></li>
{{ $.Scratch.Add "path" "/" }}
{{ end }}
{{ end }}
</ul>
\ No newline at end of file
......@@ -4,6 +4,8 @@
<h1>{{ .Title }}</h1>
{{ end }}
{{ partial "breadcrumbs.html" . }}
{{ partial "share.html" . }}
<article>
......
......@@ -90,4 +90,26 @@ pre {
.editpage {
margin: 20px 0;
}
h1 {
margin: 0;
}
.breadcrumb {
list-style: none;
overflow: hidden;
font: 12px Sans-Serif;
padding: 0;
margin: 0 0 20px;
}
.breadcrumb li {
padding: 0 5px 0 0!important;
float: left;
color: white;
text-decoration: none;
padding: 10px 0 10px 65px;
position: relative;
display: block;
float: left;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment