Use section and article HTML elements instead of just divs on main page
All checks were successful
/ cleanup-staging (pull_request) Successful in 2s
/ build (pull_request) Successful in 38s

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 4c84dabb23
commit 6675cefc52
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -1,16 +1,16 @@
{{ define "main" }}
<main class="container" aria-role="main">
<div class="homepage-content">
<section class="homepage-content">
{{ .Content }}
</div>
</section>
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
{{- $upcoming := where $events ".Params.date" "ge" now }}
{{ 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>
{{- range $upcoming.ByDate }}
<div class="announcement">
<article class="announcement">
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
{{- if in .RawContent "<!--more-->" }}
@ -18,15 +18,15 @@
{{- else }}
<p>{{ .Summary | safeHTML }}</p>
{{- end }}
</div>
</article>
{{- end }}
</div>
</section>
{{- end }}
{{- $home := .Site.GetPage "/home" }}
{{- $sections := where ($home.Resources.ByType "page") ".File.LogicalName" "index.md" }}
{{- range sort $sections "File.Path" "asc" }}
<div class="section">
<section class="section">
{{- $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>
{{ .Content -}}
@ -62,7 +62,7 @@
{{- end }}
</div>
{{- end }}
</div>
</section>
{{ end }}
</main>