diff options
| author | Mikkel Thestrup <mikkel_thestrup@mithe.dk> | 2025-12-06 19:29:47 +0100 |
|---|---|---|
| committer | Mikkel Thestrup <mikkel_thestrup@mithe.dk> | 2025-12-06 19:29:47 +0100 |
| commit | 21e9956d25720998c3f59e052dfa84fb13d513bf (patch) | |
| tree | 37ce4c877f46248e1ccf3cae495e88476a504561 /internal/models.go | |
| parent | b668f82b3bb834265c842bff96c252a513afa647 (diff) | |
| download | web-portfolio-21e9956d25720998c3f59e052dfa84fb13d513bf.tar.gz web-portfolio-21e9956d25720998c3f59e052dfa84fb13d513bf.zip | |
Compartmentalize the code
Diffstat (limited to 'internal/models.go')
| -rw-r--r-- | internal/models.go | 32 |
1 files changed, 32 insertions, 0 deletions
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 +} |