feat: integrate HTML template engine with theme selection

- Add theme configuration to WebServer struct
- Create default theme with base.html layout template
- Update content.go to apply theme templates to generated HTML
- Output is now full HTML documents with styling

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
2026-03-05 02:17:12 +01:00
parent a1d054dfe4
commit 1d47c5a930
5 changed files with 131 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ import (
type WebServer struct {
HTTPServer *http.Server
AppName string `yaml:"app_name"`
Theme string `yaml:"theme"`
Listen WSListen `yaml:"listen"`
}
@@ -27,6 +28,8 @@ func (s *WebServer) Initialize() {
Port: "80",
}
s.AppName = "Go Template Container Web Server"
s.Theme = "default"
s.Theme = "default"
// Attempt to read the config file (try both config.yml and config.yaml)
var configFile []byte