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
6
themes/ccchh/layouts/partials/footer.html
Normal file
6
themes/ccchh/layouts/partials/footer.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
<footer class="container">
|
||||
<nav class="menu">
|
||||
{{- partial "menu.html" (dict "menuID" "footer" "page" . ) -}}
|
||||
</nav>
|
||||
</footer>
|
22
themes/ccchh/layouts/partials/head.html
Normal file
22
themes/ccchh/layouts/partials/head.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{- $options := dict "transpiler" "libsass" "targetPath" "css/style.css" -}}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta charset="utf-8">
|
||||
{{- with resources.GetRemote "https://cdn.jsdelivr.net/npm/@picocss/pico@1/css/pico.min.css" }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ with resources.Get "sass/main.scss" | toCSS $options | minify | fingerprint -}}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{- end }}
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}thirdparty/fontawesome6/css/all.min.css" crossorigin="anonymous">
|
||||
|
||||
{{ with resources.Get "js/roomstate.js" | js.Build | minify | fingerprint -}}
|
||||
<script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
{{ end -}}
|
||||
|
||||
<title>{{ .Title }}</title>
|
||||
<!-- TODO: Favicon -->
|
6
themes/ccchh/layouts/partials/header.html
Normal file
6
themes/ccchh/layouts/partials/header.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
<div class="container header">
|
||||
<nav class="menu">
|
||||
{{- partial "menu.html" (dict "menuID" "main" "page" . ) -}}
|
||||
</nav>
|
||||
</div>
|
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