Changed file extensions + single issue view

This commit is contained in:
Simon Martens
2024-12-03 16:51:36 +01:00
parent 51afda5ff2
commit 71927afebd
21 changed files with 222 additions and 188 deletions

View File

@@ -1 +0,0 @@
This is a global component

25
views/routes/body.gohtml Normal file
View File

@@ -0,0 +1,25 @@
{{ $y := .model.Year }}
{{ range $year := .model.AvailableYears }}
<a href="/{{ $year }}" {{ if eq $year $y }}aria-current="page"{{ end }}>{{ $year }}</a>
{{ end }}
{{ range $index, $month := .model.Issues }}
<!-- Month Header -->
{{ $first := index $month 0 }}
<h2>{{ MonthNameShort $first.Month }}</h2>
<!-- Issues -->
{{ range $issue := $month }}
{{ $date := GetDate $issue.Datum.When }}
<a href="/{{ $y }}/{{ $issue.Number.No }}">
<div>
{{ $issue.Number.No }}
</div>
<div>
{{ $date.Wd }}
</div>
<div>{{ $date.DayNo }}.{{ index $date.MonthNo }}.</div>
</a>
{{ end }}
{{ end }}

View File

@@ -1,29 +0,0 @@
{{ define "body" }}
{{ $y := .model.Year }}
{{ range $year := .model.AvailableYears }}
<a href="/{{ $year }}" {{ if eq $year $y }}aria-current="page"{{ end }}>{{ $year }}</a>
{{ end }}
{{ range $index, $month := .model.Issues }}
<!-- Month Header -->
{{ $first := index $month 0 }}
<h2>{{ MonthNameShort $first.Month }}</h2>
<!-- Issues -->
{{ range $issue := $month }}
{{ $date := GetDate $issue.Datum.When }}
<a href="/{{ $y }}/{{ $issue.Number.No }}">
<div>
{{ $issue.Number.No }}
</div>
<div>
{{ $date.Wd }}
</div>
<div>{{ $date.DayNo }}.{{ index $date.MonthNo }}.</div>
</a>
{{ end }}
{{ end }}
{{ end }}

View File

@@ -1 +0,0 @@
This is a global component inside of a components folder.

View File

@@ -1,6 +1,11 @@
Issue found!
{{ $model := .model }}
<div>
<a href="/{{- $model.Year -}}" aria-current="page">
Zurück zum Jahr
{{ $model.Year }}
</a>
</div>
Issue found!
{{ $page := 0 }}
{{ range $piece := .model.Pieces.IssuePieces }}
<div>
@@ -38,5 +43,11 @@ Issue found!
{{ end }}
{{ end }}
{{ range $annotation := $piece.AnnotationNote.Annotations }}
<div>
{{ $annotation.Inner.InnerXML }}
</div>
{{ end }}
</div>
{{ end }}

View File

@@ -1 +0,0 @@
This is a test body form test_body

View File

@@ -1,5 +0,0 @@
This is a test body form test_body_component
{{ template "testcomponent" . }}
{{ template "testinnercomponent". }}
{{ template "seperate" }}

View File

@@ -1,3 +0,0 @@
{{ define "seperate" }}
This is a seperately defined component
{{ end }}

View File

@@ -1 +0,0 @@
This is a non-global component inside of a components dir

View File

@@ -1 +0,0 @@
This is a testcomponent

View File

@@ -1,4 +0,0 @@
This is a test body form test_body_component
{{ template "testcomponent" . }}
{{ template "_globalcomp" . }}
{{ template "_globalinnercomp" . }}

View File

@@ -1 +0,0 @@
This is a testcomponent

View File

@@ -1 +0,0 @@
This is a test body form test_head_body

View File

@@ -1,2 +0,0 @@
<!-- this is inside the head -->
<meta name="hello"/>