Initial commit

This commit is contained in:
Hugo Mårdbrink 2025-02-11 18:26:30 +01:00
commit 7cbcab0d48
25 changed files with 25504 additions and 0 deletions

53
internal/models/pages.go Normal file
View file

@ -0,0 +1,53 @@
package models
type Breadcrumb struct {
Title string
Route string
}
type Breadcrumbs = []Breadcrumb
type Page struct {
Title string
Description string
Breadcrumbs Breadcrumbs
IsHtmx bool
}
type HomePage struct {
Page Page
}
type ProjectPage struct {
Page Page
}
func NewPage(title string, description string, breadcrumbs Breadcrumbs, isHtmx bool) Page {
return Page{
Title: title,
Description: description,
Breadcrumbs: breadcrumbs,
IsHtmx: isHtmx,
}
}
func NewBreadcrumb(title string, route string) Breadcrumb {
return Breadcrumb{
Title: title,
Route: route,
}
}
func NewHomePage(page Page) HomePage {
return HomePage{
Page: page,
}
}
func NewProjectPage(page Page) ProjectPage {
return ProjectPage{
Page: page,
}
}