This commit is contained in:
Paolo Asperti 2024-07-09 22:45:57 +02:00
parent c25832b874
commit 2746d3c06e
Signed by: paspo
GPG Key ID: 06D46905D19D5182
4 changed files with 66 additions and 0 deletions

16
assets/sass/custom.scss Normal file
View File

@ -0,0 +1,16 @@
#logo-wrapper {
display: flex;
flex-direction: row;
justify-content: center;
align-items: stretch;
align-content: center;
vertical-align: baseline;
}
#logo-image-wrapper > a {
border: 0px solid white;
}
#logo-text-wrapper {
padding: 1.3em 0px 0px 20px;
}

5
data/globalheader.yml Normal file
View File

@ -0,0 +1,5 @@
---
title: "BgLUG --- Bergamo Linux Users Group"
image: images/logo.svg
image_alt: Logo BgLUG
image_width: 300

View File

@ -0,0 +1,45 @@
<div id="header">
{{ if .Site.IsMultiLingual }}
{{- partial "languages.html" . }}
{{- end -}}
<div id="logo-wrapper">
{{- if .Site.Data.globalheader.image }}
<div id="logo-image-wrapper">
<a href="{{ .Site.BaseURL }}">
<img src="{{ .Site.Data.globalheader.image | relURL }}" alt="{{ .Site.Data.globalheader.image_alt }}" width="{{ .Site.Data.globalheader.image_width }}" />
</a>
</div>
{{- end }}
<div id="logo-text-wrapper">
<h1><a href="{{ .Site.BaseURL }}" id="logo">
{{ with .Site.Data.globalheader.title }}{{ . | markdownify }}{{ else }}{{ .Site.Title }}{{ end }}
</a></h1>
</div>
</div>
<nav id="nav">
<ul>
{{- range .Site.Menus.main }}
<li class="{{ if or ($.Page.IsMenuCurrent "main" .) ($.Page.HasMenuCurrent "main" .) }}current{{ end }}">
<a href="{{ .URL | default "#" }}">{{ .Name }}</a>
{{- if .HasChildren -}}
<ul>
{{- range .Children }}
<li class="{{ if or ($.Page.IsMenuCurrent "main" .) ($.Page.HasMenuCurrent "main" .) }}current{{ end }}">
<a href="{{ .URL | default "#" }}">{{ .Name }}</a>
{{- if .HasChildren -}}
<ul>
{{- range .Children }}
<li class="{{ if or ($.Page.IsMenuCurrent "main" .) ($.Page.HasMenuCurrent "main" .) }}current{{ end }}">
{{/* aoeu fix 'current' thing */}}
<a href="{{ .URL | default "#" }}">{{ .Name }}</a>
{{- end }}
</ul>
{{- end -}}
{{- end }}
</ul>
{{- end -}}
{{- end }}
</ul>
</nav>
</div>

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB