Use section and article HTML elements instead of just divs on main page
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:
parent
4c84dabb23
commit
6675cefc52
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue