forked from CCCHH/ccchh-website
Create CCCHH theme
This commit is contained in:
parent
8394b08524
commit
2d267ba9fe
23 changed files with 629 additions and 1 deletions
32
themes/ccchh/layouts/partials/menu.html
Normal file
32
themes/ccchh/layouts/partials/menu.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
{{- $page := .page -}}
|
||||
{{- $menuID := .menuID -}}
|
||||
{{- $menuContent := index site.Menus .menuID -}}
|
||||
|
||||
<ul>
|
||||
{{- if compare.Eq $menuID "main" -}}
|
||||
{{ $image := resources.Get "images/logo.svg" }}
|
||||
<li><a href="/{{ .Site.Home.URL }}"><img src="{{ $image.RelPermalink }}" class="invert-on-light" width="150px" alt="CCCHH Icon"></a></li>
|
||||
{{- end }}
|
||||
{{- range $menuContent }}
|
||||
<li>
|
||||
{{- $attrs := dict "href" .URL }}
|
||||
{{- if $page.IsMenuCurrent $menuID . -}}
|
||||
{{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }}
|
||||
{{- end -}}
|
||||
<a
|
||||
{{- range $k, $v := $attrs }}
|
||||
{{- with $v }}
|
||||
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
>{{ or (T .Identifier) .Name | safeHTML }}</a></li>
|
||||
{{- end }}
|
||||
|
||||
</ul>
|
||||
{{- if compare.Eq $menuID "main" -}}
|
||||
<ul>
|
||||
<li class="roomstate" id="roomstate">
|
||||
<span class="state">unbekannt</span><br><span class="duration">(seit )</span>
|
||||
</li>
|
||||
</ul>
|
||||
{{- end }}
|
Loading…
Add table
Add a link
Reference in a new issue