Upgrade to Hugo 0.16x and zen theme v7.1.0
- Bump themes/zen from v5.7.0 to v7.1.0 (vanilla CSS, no libsass). - Move layouts to Hugo's new template structure (_default -> root, index.html -> home.html, shortcodes -> _shortcodes). - Replace deprecated language API in templates (Locale, Direction, Name) and sync base templates and mobile menu with theme v7. - Config: languageName/languageCode -> label/locale; move copyright to the top-level key the v7 footer reads. - Port _custom.scss to assets/css/_custom.css and map page/body backgrounds to v7's --color-body-bg/--color-page-bg. - CI: build with hugomods/hugo:0.165.0.
This commit is contained in:
parent
be7539cc21
commit
5c1b60fa3a
12 changed files with 22 additions and 33 deletions
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: docker.io/hugomods/hugo:0.150.1
|
image: docker.io/hugomods/hugo:0.165.0
|
||||||
steps:
|
steps:
|
||||||
- name: Pipeline info
|
- name: Pipeline info
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,15 @@ th, td {
|
||||||
margin-left: 2em;
|
margin-left: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Zen v7 paints body with --color-body-bg and .page with --color-page-bg. */
|
||||||
|
:root {
|
||||||
|
--color-body-bg: light-dark(var(--color-grey-100), #141414);
|
||||||
|
--color-page-bg: light-dark(var(--color-white), #242424);
|
||||||
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
:root {
|
:root {
|
||||||
--color-backdrop: #141414;
|
|
||||||
--color-headings: #faf5f5;
|
--color-headings: #faf5f5;
|
||||||
--color-body-bg: #242424;
|
|
||||||
--color-header-bg: #242424;
|
--color-header-bg: #242424;
|
||||||
--color-text: #faf5f5;
|
--color-text: #faf5f5;
|
||||||
--color-link: #66f2ff;
|
--color-link: #66f2ff;
|
||||||
13
hugo.yaml
13
hugo.yaml
|
|
@ -1,16 +1,15 @@
|
||||||
baseURL: 'https://hackertours.hamburg.ccc.de/'
|
baseURL: 'https://hackertours.hamburg.ccc.de/'
|
||||||
defaultContentLanguage: de
|
defaultContentLanguage: de
|
||||||
defaultContentLanguageInSubdir: true
|
defaultContentLanguageInSubdir: true
|
||||||
#languageCode: 'de-de'
|
|
||||||
title: 'Hamburg Hackertours'
|
title: 'Hamburg Hackertours'
|
||||||
theme: "zen"
|
theme: "zen"
|
||||||
|
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) ist nur der Vermittler der Touren. Für das Angebot und die Durchführung der Touren sind die jeweiligen Veranstalter verantwortlich."
|
||||||
ignoreLogs:
|
ignoreLogs:
|
||||||
- 'warning-frontmatter-params-overrides'
|
- 'warning-frontmatter-params-overrides'
|
||||||
|
|
||||||
#https://themes.gohugo.io/themes/hugo-theme-zen/#configuration
|
#https://themes.gohugo.io/themes/hugo-theme-zen/#configuration
|
||||||
params:
|
params:
|
||||||
contact: "ticket@hackertours.hamburg.ccc.de"
|
contact: "ticket@hackertours.hamburg.ccc.de"
|
||||||
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) ist nur der Vermittler der Touren. Für das Angebot und die Durchführung der Touren sind die jeweiligen Veranstalter verantwortlich."
|
|
||||||
dateFormat: "02.01.2006 15:04"
|
dateFormat: "02.01.2006 15:04"
|
||||||
description: "Hamburg Hackertours"
|
description: "Hamburg Hackertours"
|
||||||
footer: "[Impressum & Datenschutz](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)"
|
footer: "[Impressum & Datenschutz](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)"
|
||||||
|
|
@ -28,19 +27,19 @@ params:
|
||||||
languages:
|
languages:
|
||||||
en:
|
en:
|
||||||
weight: 1
|
weight: 1
|
||||||
languageName: "English"
|
label: "English"
|
||||||
languageCode: "en"
|
locale: "en"
|
||||||
contentDir: content/en
|
contentDir: content/en
|
||||||
pagination:
|
pagination:
|
||||||
pagerSize: 25
|
pagerSize: 25
|
||||||
params:
|
params:
|
||||||
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) only acts as an agent for the tours. The respective tour operators are responsible for the offer and running of the tours."
|
|
||||||
footer: "[Imprint & Data Protection](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)"
|
footer: "[Imprint & Data Protection](https://hamburg.ccc.de/imprint/) – [Ticket Shop](https://tickets.hamburg.ccc.de/hackertours/39c3ht/)"
|
||||||
title: "Hamburg Hackertours"
|
title: "Hamburg Hackertours"
|
||||||
|
copyright: "[CCC Hansestadt Hamburg e.V.](https://hamburg.ccc.de) only acts as an agent for the tours. The respective tour operators are responsible for the offer and running of the tours."
|
||||||
de:
|
de:
|
||||||
weight: 2
|
weight: 2
|
||||||
languageName: "Deutsch"
|
label: "Deutsch"
|
||||||
languageCode: "de"
|
locale: "de"
|
||||||
contentDir: content/de
|
contentDir: content/de
|
||||||
pagination:
|
pagination:
|
||||||
pagerSize: 25
|
pagerSize: 25
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<rect width="80" height="12" x="10" y="70" rx="5"></rect>
|
<rect width="80" height="12" x="10" y="70" rx="5"></rect>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
<div class="mobile-nav__sheet link-inverted link-nav" id="sheet" aria-hidden="true">
|
<div class="mobile-nav__sheet link-nav" id="sheet" data-theme="dark" aria-hidden="true">
|
||||||
<div class="mobile-nav__region">{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end }}</div>
|
<div class="mobile-nav__region">{{ if hugo.IsMultilingual }}{{ partial "language-selector.html" . }}{{ end }}</div>
|
||||||
<nav class="mobile-nav__main-menu" aria-label="{{ i18n "menu_title" }}">
|
<nav class="mobile-nav__main-menu" aria-label="{{ i18n "menu_title" }}">
|
||||||
<ul class="mobile-nav__navbar">
|
<ul class="mobile-nav__navbar">
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,11 @@
|
||||||
{{- $label := cond (eq $code "de") "DE" (cond (eq $code "en") "EN" (cond (eq $code "deen") "DE/EN" "")) -}}
|
{{- $label := cond (eq $code "de") "DE" (cond (eq $code "en") "EN" (cond (eq $code "deen") "DE/EN" "")) -}}
|
||||||
{{- $title := "" -}}
|
{{- $title := "" -}}
|
||||||
{{- if eq $code "deen" -}}
|
{{- if eq $code "deen" -}}
|
||||||
{{- $title = cond (eq .Site.Language.Lang "de") "Diese Tour wird zweisprachig stattfinden (Deutsch und Englisch)" "This tour will be bilingual (German and English)" -}}
|
{{- $title = cond (eq .Site.Language.Name "de") "Diese Tour wird zweisprachig stattfinden (Deutsch und Englisch)" "This tour will be bilingual (German and English)" -}}
|
||||||
{{- else if eq $code "de" -}}
|
{{- else if eq $code "de" -}}
|
||||||
{{- $title = cond (eq .Site.Language.Lang "de") "Diese Tour wird auf Deutsch stattfinden" "This tour will be held in German" -}}
|
{{- $title = cond (eq .Site.Language.Name "de") "Diese Tour wird auf Deutsch stattfinden" "This tour will be held in German" -}}
|
||||||
{{- else if eq $code "en" -}}
|
{{- else if eq $code "en" -}}
|
||||||
{{- $title = cond (eq .Site.Language.Lang "de") "Diese Tour wird auf Englisch stattfinden" "This tour will be held in English" -}}
|
{{- $title = cond (eq .Site.Language.Name "de") "Diese Tour wird auf Englisch stattfinden" "This tour will be held in English" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<abbr style="font-size: .65em; vertical-align: super;" title="{{ $title }}">{{ $label }}</abbr>
|
<abbr style="font-size: .65em; vertical-align: super;" title="{{ $title }}">{{ $label }}</abbr>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="nojs" lang="{{ site.LanguageCode | default site.Language.Lang }}" dir="{{ site.Language.LanguageDirection | default "ltr" }}">
|
<html class="nojs" lang="{{ site.Language.Locale | default site.Language.Name }}" dir="{{ site.Language.Direction | default "ltr" }}"{{ with $.Param "colorScheme" }} data-theme="{{ . }}"{{ end }}>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
{{ block "head" . }}{{ end }}
|
{{ block "head" . }}{{ end }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
|
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with .Section }} section-page--{{ . | urlize }}{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
|
||||||
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
|
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
|
||||||
<header class="header layout__header">
|
<header class="header layout__header">
|
||||||
{{ if $.Param "logo" | default true -}}
|
{{ if $.Param "logo" | default true -}}
|
||||||
|
|
@ -41,14 +41,7 @@
|
||||||
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
|
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
|
||||||
|
|
||||||
<footer class="footer layout__footer mt--l">
|
<footer class="footer layout__footer mt--l">
|
||||||
{{ if templates.Exists "partials/footer.html" -}}
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
{{ else -}}
|
|
||||||
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
|
|
||||||
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
|
|
||||||
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }}
|
|
||||||
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
|
|
||||||
{{ end -}}
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
|
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html class="nojs" lang="{{ site.LanguageCode | default site.Language.Lang }}" dir="{{ site.Language.LanguageDirection | default "ltr" }}">
|
<html class="nojs" lang="{{ site.Language.Locale | default site.Language.Name }}" dir="{{ site.Language.Direction | default "ltr" }}"{{ with $.Param "colorScheme" }} data-theme="{{ . }}"{{ end }}>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
{{ block "head" . }}{{ end }}
|
{{ block "head" . }}{{ end }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
|
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with .Section }} section-page--{{ . | urlize }}{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
|
||||||
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
|
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
|
||||||
<header class="header layout__header">
|
<header class="header layout__header">
|
||||||
{{ if $.Param "logo" | default true -}}
|
{{ if $.Param "logo" | default true -}}
|
||||||
|
|
@ -43,14 +43,7 @@
|
||||||
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
|
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
|
||||||
|
|
||||||
<footer class="footer layout__footer mt--l">
|
<footer class="footer layout__footer mt--l">
|
||||||
{{ if templates.Exists "partials/footer.html" -}}
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
{{ else -}}
|
|
||||||
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
|
|
||||||
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
|
|
||||||
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }}
|
|
||||||
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
|
|
||||||
{{ end -}}
|
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
|
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit acc3f6277010b9eac4290c86f340330616fe2d54
|
Subproject commit 6d4ee822a88a3dbe2443b2c985523e376f47056f
|
||||||
Loading…
Reference in a new issue