From 9f0440d82748694b627b2e6d433ff282681f01f9 Mon Sep 17 00:00:00 2001 From: Simon Martens Date: Tue, 3 Dec 2024 22:40:32 +0100 Subject: [PATCH] =?UTF-8?q?Menu=20+=20Template=20Seiten=20&=20Routes=20f?= =?UTF-8?q?=C3=BCr=20=C3=9Cbersichten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/agent.go | 12 ++++++++++++ controllers/agents.go | 12 ++++++++++++ controllers/category.go | 12 ++++++++++++ controllers/place.go | 12 ++++++++++++ server/server.go | 6 ++++++ techstack.md | 19 ++++++++----------- views/layouts/components/_menu.gohtml | 13 ++++++++++++- views/routes/akteur/body.gohtml | 0 views/routes/akteure/body.gohtml | 0 views/routes/kategorie/body.gohtml | 0 views/routes/ort/body.gohtml | 0 11 files changed, 74 insertions(+), 12 deletions(-) create mode 100644 controllers/agent.go create mode 100644 controllers/agents.go create mode 100644 controllers/category.go create mode 100644 controllers/place.go create mode 100644 views/routes/akteur/body.gohtml create mode 100644 views/routes/akteure/body.gohtml create mode 100644 views/routes/kategorie/body.gohtml create mode 100644 views/routes/ort/body.gohtml diff --git a/controllers/agent.go b/controllers/agent.go new file mode 100644 index 0000000..a302865 --- /dev/null +++ b/controllers/agent.go @@ -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) + } +} diff --git a/controllers/agents.go b/controllers/agents.go new file mode 100644 index 0000000..a4f41d5 --- /dev/null +++ b/controllers/agents.go @@ -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) + } +} diff --git a/controllers/category.go b/controllers/category.go new file mode 100644 index 0000000..e60f7ed --- /dev/null +++ b/controllers/category.go @@ -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) + } +} diff --git a/controllers/place.go b/controllers/place.go new file mode 100644 index 0000000..efcf20d --- /dev/null +++ b/controllers/place.go @@ -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) + } +} diff --git a/server/server.go b/server/server.go index 05067d2..47151cc 100644 --- a/server/server.go +++ b/server/server.go @@ -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/")) diff --git a/techstack.md b/techstack.md index d6f257a..7f06e28 100644 --- a/techstack.md +++ b/techstack.md @@ -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$2$3 -Morgen: -- sync.Map für alle Kollektionen -- Eigene Funktionen zum willkürlichen Zugriff auf die sync.Map -- Eigene Funktionen für Datum etc diff --git a/views/layouts/components/_menu.gohtml b/views/layouts/components/_menu.gohtml index 7c176ea..2c66c44 100644 --- a/views/layouts/components/_menu.gohtml +++ b/views/layouts/components/_menu.gohtml @@ -1 +1,12 @@ -this is the menu + diff --git a/views/routes/akteur/body.gohtml b/views/routes/akteur/body.gohtml new file mode 100644 index 0000000..e69de29 diff --git a/views/routes/akteure/body.gohtml b/views/routes/akteure/body.gohtml new file mode 100644 index 0000000..e69de29 diff --git a/views/routes/kategorie/body.gohtml b/views/routes/kategorie/body.gohtml new file mode 100644 index 0000000..e69de29 diff --git a/views/routes/ort/body.gohtml b/views/routes/ort/body.gohtml new file mode 100644 index 0000000..e69de29