Menu + Template Seiten & Routes für Übersichten

This commit is contained in:
Simon Martens
2024-12-03 22:40:32 +01:00
parent 591b637652
commit 9f0440d827
11 changed files with 74 additions and 12 deletions

12
controllers/agent.go Normal file
View File

@@ -0,0 +1,12 @@
package controllers
import (
"github.com/Theodor-Springmann-Stiftung/kgpz_web/app"
"github.com/gofiber/fiber/v2"
)
func GetAgent(kgpz *app.KGPZ) fiber.Handler {
return func(c *fiber.Ctx) error {
return c.Render("/akteur/", nil)
}
}

12
controllers/agents.go Normal file
View File

@@ -0,0 +1,12 @@
package controllers
import (
"github.com/Theodor-Springmann-Stiftung/kgpz_web/app"
"github.com/gofiber/fiber/v2"
)
func GetAgents(kgpz *app.KGPZ) fiber.Handler {
return func(c *fiber.Ctx) error {
return c.Render("/akteure/", nil)
}
}

12
controllers/category.go Normal file
View File

@@ -0,0 +1,12 @@
package controllers
import (
"github.com/Theodor-Springmann-Stiftung/kgpz_web/app"
"github.com/gofiber/fiber/v2"
)
func GetCategory(kgpz *app.KGPZ) fiber.Handler {
return func(c *fiber.Ctx) error {
return c.Render("/kategorie/", nil)
}
}

12
controllers/place.go Normal file
View File

@@ -0,0 +1,12 @@
package controllers
import (
"github.com/Theodor-Springmann-Stiftung/kgpz_web/app"
"github.com/gofiber/fiber/v2"
)
func GetPlace(kgpz *app.KGPZ) fiber.Handler {
return func(c *fiber.Ctx) error {
return c.Render("/ort/", nil)
}
}

View File

@@ -163,6 +163,12 @@ func (s *Server) Start() {
srv.Get("/:year/:issue/:page?", controllers.GetIssue(s.kgpz))
srv.Get("/:year/:issue/beilage/:page?", controllers.GetIssue(s.kgpz))
srv.Get("/ort/:place?", controllers.GetPlace(s.kgpz))
srv.Get("/kategorie/:category?", controllers.GetCategory(s.kgpz))
srv.Get("/akteure/:letter?", controllers.GetAgents(s.kgpz))
srv.Get("/akteur/:agent", controllers.GetAgent(s.kgpz))
srv.Get("/edition/", controllers.Get("/edition/"))
srv.Get("/datenschutz/", controllers.Get("/datenschutz/"))
srv.Get("/kontakt/", controllers.Get("/kontakt/"))

View File

@@ -20,11 +20,6 @@
## Common
- HTMX + Go, with progressive enhancement
- Settings: Git URL, folder path for repo
- Integration with Git repo / local folder (same thing)
- Integration with GND:
- Need to pull in and read MARCXML for alternative names, life data (?), canonical name and professions
- Cache MARCXML in a local folder
- Settings: GND URL, folder path for MARCXML
- Integration with Geonames:
- Need to pull in and read geonames data for places: alternative names, country, lat/long, wikipedia, maybe even dbpedia
- Cache geonames data in a local folder
@@ -61,16 +56,21 @@
- Restart
## File Inaccurancies:
- No canonical names for Actors, can use GND for most of them
- No canonical names for Actors, can use GND for most of them
- Done, we can sort by akteur@id
- URL values YYYY/ST and YYYY/ST/P and YYYY/ST/Beilage/P? Are they unique?
- Yes, they are unique
- Which names of places should be used? Example: Mitau, Jelgava, Jelgava (Mitau), Mitau (Jelgava)
- Historical names
- Titel der Werke: not saved yet
- Kurzzitat: KGPZ St. 2, 14 Januar 1774 ?
- Besser: KGPZ 2/1774, 14. Januar
- Done
- Navigation: Galerie / Durchklicken??
- Weniger Kästen / Volle Seitenbreite ausnutzen
- Horizontale Jahresnavigation durch vertikale ersetzen, so wie in der Einzelansicht
- Was ist "Link auf seite teilen"? -> Permalink
- Was ist "Link auf seite teilen"?
- Permalink
## Überarbeiten
- Sekundärüberlieferung in Stück/Beitrag
@@ -80,6 +80,7 @@
- Anzahl der Beiträge in der Primärüberlieferung
- Logo
- Sortiername ohne GND eintrag
- Done
\(([^(\d{4})\(]*)(\d{4})*(\d{4})([^\)]*)\)
@@ -89,7 +90,3 @@
([\s\(])((?:16|17|18|19|20)\d{2})*((?:16|17|18|19|20)\d{2})
$1<year>$2$3</year>
Morgen:
- sync.Map für alle Kollektionen
- Eigene Funktionen zum willkürlichen Zugriff auf die sync.Map
- Eigene Funktionen für Datum etc

View File

@@ -1 +1,12 @@
this is the menu
<nav>
<div>
<div>Übersicht nach</div>
<a href="/">Jahrgängen</a>
<a href="/akteure/">Personen</a>
<a href="/kategorie/">Betragsarten</a>
<a href="/ort/">Orten</a>
</div>
<a href="/edition/">Geschichte &amp; Edition der KGPZ</a>
<a href="/zitation/">Zitation</a>
<a href="/kontakt/">Kontakt</a>
</nav>

View File

View File

View File

View File