Use section and article HTML elements instead of just divs on main page
Some checks failed
/ build (pull_request) Failing after 10s

See here for information on these elements:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article
This commit is contained in:
June 2024-01-25 23:55:35 +01:00
parent 1cba654570
commit af0929c29b
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -1,16 +1,16 @@
{{ define "main" }} {{ define "main" }}
<main class="container" aria-role="main"> <main class="container" aria-role="main">
<div class="homepage-content"> <section class="homepage-content">
{{ .Content }} {{ .Content }}
</div> </section>
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }} {{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
{{- $upcoming := where $events ".Params.date" "ge" now }} {{- $upcoming := where $events ".Params.date" "ge" now }}
{{ if $upcoming }} {{ if $upcoming }}
<div class="announcements"> <section class="announcements">
<h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2> <h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
{{- range $upcoming.ByDate }} {{- range $upcoming.ByDate }}
<div class="announcement"> <article class="announcement">
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }} {{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
{{- if in .RawContent "<!--more-->" }} {{- if in .RawContent "<!--more-->" }}
@ -18,15 +18,15 @@
{{- else }} {{- else }}
<p>{{ .Summary | safeHTML }}</p> <p>{{ .Summary | safeHTML }}</p>
{{- end }} {{- end }}
</div> </article>
{{- end }} {{- end }}
</div> </section>
{{- end }} {{- end }}
{{- $home := .Site.GetPage "/home" }} {{- $home := .Site.GetPage "/home" }}
{{- $sections := where ($home.Resources.ByType "page") ".File.LogicalName" "index.md" }} {{- $sections := where ($home.Resources.ByType "page") ".File.LogicalName" "index.md" }}
{{- range sort $sections "File.Path" "asc" }} {{- range sort $sections "File.Path" "asc" }}
<div class="section"> <section class="section">
{{- $hdg_id := .Title | lower | safeURL }} {{- $hdg_id := .Title | lower | safeURL }}
<h2 id="{{ $hdg_id }}" class="on-hover-trg">{{ .Title }} <a href="#{{ $hdg_id }}" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2> <h2 id="{{ $hdg_id }}" class="on-hover-trg">{{ .Title }} <a href="#{{ $hdg_id }}" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
{{ .Content -}} {{ .Content -}}
@ -62,7 +62,7 @@
{{- end }} {{- end }}
</div> </div>
{{- end }} {{- end }}
</div> </section>
{{ end }} {{ end }}
</main> </main>