home: Add links to headings
This commit is contained in:
parent
eab3b281c0
commit
9f8c0d30e9
|
@ -30,6 +30,18 @@ body>main {
|
||||||
padding-bottom: var(--spacing);
|
padding-bottom: var(--spacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.small {
|
||||||
|
font-size: 0.7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.on-hover {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.on-hover-trg:hover .on-hover {
|
||||||
|
display: initial;
|
||||||
|
}
|
||||||
|
|
||||||
.li-comma {
|
.li-comma {
|
||||||
&::after {
|
&::after {
|
||||||
content: ", ";
|
content: ", ";
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
||||||
{{ if $upcoming }}
|
{{ if $upcoming }}
|
||||||
<div class="announcements">
|
<div class="announcements">
|
||||||
<h2>Neuigkeiten</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">
|
<div 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" . ) }}
|
||||||
|
@ -27,7 +27,8 @@
|
||||||
{{- $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">
|
<div class="section">
|
||||||
<h2>{{ .Title }}</h2>
|
{{- $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 -}}
|
{{ .Content -}}
|
||||||
|
|
||||||
{{- $subsec_dir := strings.TrimLeft "home/" .File.Dir }}
|
{{- $subsec_dir := strings.TrimLeft "home/" .File.Dir }}
|
||||||
|
|
Loading…
Reference in a new issue