Syllabus/themes/sandpoints/layouts/partials/header.html

31 lines
1.4 KiB
HTML

{{ $currentSession := . }}
<div class="header">
<a title="{{ $.Site.Home.Title }}'s Bibliotheke" href="/library/BROWSE_LIBRARY.html" class="bibliotheke" target="_blank">
<img src="/images/bibliotheke.svg" />
</a>
<div class="breadcrumbs">
{{ if not .IsHome }}
<a href="{{ .Site.Home.RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}"><span class="sup">{{ substr $.Site.Home.Title 0 1 }}</span><i>{{ substr $.Site.Home.Title 1 }}</i></a>
{{ end }}
{{ if eq .File.Dir "topic/" }}
<div class="topicbar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></div>
{{ end }}
{{ $.Scratch.Set "counter" 0 }}
{{ range where $.Site.RegularPages ".Section" "topic" }}
{{ if in .Params.has_sessions $currentSession.File.LogicalName }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ if lt ($.Scratch.Get "counter") 2 }}
<span><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
{{ end }}
{{ end }}
{{ if eq .File.Dir "session/" }}
<span class="topicbar"><i> » <a href="{{ .RelPermalink }}{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ .Title }}</a></i></span>
{{ end }}
</div>
</div>