diff --git a/templates/layouts/page.templ b/templates/layouts/page.templ index 3e4df4f..237a2cc 100644 --- a/templates/layouts/page.templ +++ b/templates/layouts/page.templ @@ -1,7 +1,11 @@ package layouts import ( + "fmt" + "embed" + "forge.capytal.company/capytalcode/project-comicverse/configs" + "forge.capytal.company/capytalcode/project-comicverse/assets" ) type PageInfo struct { @@ -20,6 +24,18 @@ func pageInfo(info []PageInfo) PageInfo { return PageInfo{} } +templ LinkCSSFile(href string, fs embed.FS, file string) { + if configs.DEVELOPMENT { + + + } else if f, err := fs.ReadFile(file); err != nil { + + + } else { + @templ.Raw(fmt.Sprintf("", f)) + } +} + templ Page(i ...PageInfo) {
@@ -47,14 +63,12 @@ templ Page(i ...PageInfo) { } // Global styles - - - - + @LinkCSSFile("/assets/css/theme.css", assets.ASSETS, "css/theme.css") + @LinkCSSFile("/assets/css/uno.css", assets.ASSETS, "css/uno.css") // Global scripts // Additional heading