From 21e9956d25720998c3f59e052dfa84fb13d513bf Mon Sep 17 00:00:00 2001 From: Mikkel Thestrup Date: Sat, 6 Dec 2025 19:29:47 +0100 Subject: Compartmentalize the code --- internal/models.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 internal/models.go (limited to 'internal/models.go') diff --git a/internal/models.go b/internal/models.go new file mode 100644 index 0000000..1fb0774 --- /dev/null +++ b/internal/models.go @@ -0,0 +1,32 @@ +package internal + +import "html/template" + +const ( + PageHome = "home" + PageProjects = "projects" + PageResume = "resume" + PageContact = "contact" +) + +var ValidPages = []string{PageHome, PageProjects, PageResume, PageContact} + +var PageSections = map[string][]string{ + PageHome: {"intro", "about"}, + PageProjects: {"intro", "kal"}, + PageResume: {"intro", "BSc in Computer Science"}, + PageContact: {"contact"}, +} + +type PageData struct { + Page string + Pages []string + Sections []string + Content template.HTML +} + +type SectionData struct { + Page string + Sections []string + Content template.HTML +} -- cgit v1.2.3-70-g09d2