Skip to content

Commit c2d5617

Browse files
committed
whitespace
1 parent 0d8ff37 commit c2d5617

File tree

4 files changed

+33
-35
lines changed

4 files changed

+33
-35
lines changed

layouts/_default/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<main id="inhalt" onclick="document.getElementById('hamburger').checked = false;">
77
{{ partial "header.html" . }}
88

9-
{{ block "main" . -}}{{ end }}
9+
{{ block "main" . }}{{ end }}
1010

1111
{{ partial "navigation.html" . }}
1212
</main>

layouts/partials/header.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<header id="kopf">
22
<s id="linie"><a href="https://ddp.le0n.dev" alt="titel" id="titel" title="homepage"></a></s>
33
<div id="toggles">
4-
<a href="{{ (index .Translations 0).Permalink}}" title='{{ T "siteLink" }}'>
5-
{{ readFile (T "otherFlag") | safeHTML }}
6-
</a>
7-
<input type="checkbox" id="dark-mode-check" title='{{ T "ldMode" }}' checked>
4+
<a href="{{ (index .Translations 0).Permalink}}" title='{{ T "siteLink" }}'>{{- readFile (T "otherFlag") | safeHTML -}}</a>
5+
<input type="checkbox" id="dark-mode-check" title='{{ T "ldMode" }}' checked>
86
</div>
97
<script>
108
document.querySelector('#dark-mode-check').checked = window.localStorage.getItem("dark-mode") !== "false";

layouts/partials/navigation.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
<nav id="artikel-navigation">
22
<!-- Find next and previous page -->
33

4-
{{ $root := .GetPage "/" }}
4+
{{- $root := .GetPage "/" -}}
55

66
<!-- Next -->
7-
{{ $next := .CurrentSection.Pages.Prev . }}
7+
{{- $next := .CurrentSection.Pages.Prev . -}}
88
<!-- Section -> Child -->
9-
{{ if or .IsSection (.Eq $root) }}
10-
{{ $next = index .Pages 0 }}
11-
{{ end }}
12-
{{ if eq $next nil }}
13-
{{ with .CurrentSection.Parent }}
9+
{{- if or .IsSection (.Eq $root) -}}
10+
{{- $next = index .Pages 0 -}}
11+
{{- end -}}
12+
{{- if eq $next nil -}}
13+
{{- with .CurrentSection.Parent -}}
1414
<!-- Beispiele -> Kombinationen -->
15-
{{ with .Pages.Prev $.CurrentSection }}
16-
{{ $next = . }}
15+
{{- with .Pages.Prev $.CurrentSection -}}
16+
{{- $next = . -}}
1717
<!-- Zufall -> Beispielprogramme -->
18-
{{ else }}
19-
{{ $next = .Parent.Pages.Prev . }}
20-
{{ end }}
21-
{{ end }}
22-
{{ end }}
18+
{{- else -}}
19+
{{- $next = .Parent.Pages.Prev . -}}
20+
{{- end -}}
21+
{{- end -}}
22+
{{- end -}}
2323

2424
<!-- Previous -->
25-
{{ $prev := .CurrentSection.Pages.Next . }}
25+
{{- $prev := .CurrentSection.Pages.Next . -}}
2626
<!-- Funktionen -> Verzweigungen -->
27-
{{ if .IsSection }}
28-
{{ $prev = .Parent.Pages.Next . }}
29-
{{ end }}
27+
{{- if .IsSection -}}
28+
{{- $prev = .Parent.Pages.Next . -}}
29+
{{- end -}}
3030

3131
<!-- Datentypen -> Programmierung -->
32-
{{ if .Eq (index .CurrentSection.Pages 0) }}
33-
{{ $prev = .CurrentSection }}
32+
{{- if .Eq (index .CurrentSection.Pages 0) -}}
33+
{{- $prev = .CurrentSection -}}
3434
<!-- Kombinationen -> Beispiele -->
35-
{{ else if and $prev $prev.IsSection }}
36-
{{ $prev = index ($prev.Pages | last 1) 0 }}
37-
{{ end }}
35+
{{- else if and $prev $prev.IsSection -}}
36+
{{- $prev = index ($prev.Pages | last 1) 0 -}}
37+
{{- end -}}
3838

39-
<link rel="prefetch" href="{{ with or $prev $root }} {{ .RelPermalink }} {{ end }}" as="document">
40-
<link rel="prefetch" href="{{ with or $next $root }} {{ .RelPermalink }} {{ end }}" as="document">
39+
<link rel="prefetch" href="{{- with or $prev $root -}} {{- .RelPermalink -}} {{- end -}}" as="document">
40+
<link rel="prefetch" href="{{- with or $next $root -}} {{- .RelPermalink -}} {{- end -}}" as="document">
4141

42-
<a href="{{ with or $prev $root }} {{ .RelPermalink }} {{ end }} " title='{{ T "prev" }}'>&lt;</a>
43-
<a href="{{ with or $next $root }} {{ .RelPermalink }} {{ end }}" title='{{ T "next" }}'>&gt;</a>
42+
<a href="{{- with or $prev $root -}} {{- .RelPermalink -}} {{- end -}} " title='{{- T "prev" -}}'>&lt;</a>
43+
<a href="{{- with or $next $root -}} {{- .RelPermalink -}} {{- end -}}" title='{{- T "next" -}}'>&gt;</a>
4444
</nav>

layouts/partials/sidebar.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ <h2 id="überschrift">{{ T "toc" }}</h2>
77
<a href="/Bedienungsanleitung">Die Deutsche<br>Programmiersprache</a>
88

99
<ol id="artikel-links">
10-
{{- define "links" -}}
10+
{{ define "links" -}}
1111
{{- range .page.Pages -}}
1212
{{- if .IsSection -}}
1313
<li>
1414
<details id="Section-{{ .Title }}" {{ if (in $.ancestors .) }} open {{ end }}>
1515
<summary><a href="{{ .RelPermalink }}">{{ .Title }}</a></summary>
1616
<ol>
17-
{{- template "links" (dict "page" . "ancestors" $.ancestors) -}}
17+
{{ template "links" (dict "page" . "ancestors" $.ancestors) }}
1818
</ol>
1919
</details>
2020
</li>
21-
{{- else -}}
21+
{{ else }}
2222
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
2323
{{- end -}}
2424
{{- end -}}

0 commit comments

Comments
 (0)