From 0730789cb3b68702daf6d859e6f17a6b6661b628 Mon Sep 17 00:00:00 2001
From: dvdandroid <6277172+DVDAndroid@users.noreply.github.com>
Date: Thu, 25 Jul 2024 16:57:10 +0200
Subject: [PATCH] Fix crash when using a custom CSS file; fix error 404 for
manifest.json
---
internal/assets/templates/document.html | 2 +-
internal/glance/glance.go | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/internal/assets/templates/document.html b/internal/assets/templates/document.html
index e43a406..d37ac56 100644
--- a/internal/assets/templates/document.html
+++ b/internal/assets/templates/document.html
@@ -13,7 +13,7 @@
-
+
diff --git a/internal/glance/glance.go b/internal/glance/glance.go
index c1ce3e7..87fbad6 100644
--- a/internal/glance/glance.go
+++ b/internal/glance/glance.go
@@ -38,10 +38,11 @@ type Theme struct {
}
type Server struct {
- Host string `yaml:"host"`
- Port uint16 `yaml:"port"`
- AssetsPath string `yaml:"assets-path"`
- AssetsHash string `yaml:"-"`
+ Host string `yaml:"host"`
+ Port uint16 `yaml:"port"`
+ AssetsPath string `yaml:"assets-path"`
+ AssetsHash string `yaml:"-"`
+ StartedAt time.Time `yaml:"-"` // used in custom css file
}
type Column struct {
@@ -225,6 +226,7 @@ func (a *Application) Serve() error {
Handler: mux,
}
+ a.Config.Server.StartedAt = time.Now()
slog.Info("Starting server", "host", a.Config.Server.Host, "port", a.Config.Server.Port)
return server.ListenAndServe()
}