feat: add static file serving and theme safelist

- Serve static files from web/static directory
- Add theme class safelist to Tailwind config for dynamic theming support
- Regenerate CSS with updated configuration
This commit is contained in:
2026-02-15 16:53:34 -05:00
parent b46bace1b6
commit b682f09fbc
3 changed files with 19 additions and 2 deletions
+2 -1
View File
@@ -15,7 +15,7 @@ import (
"github.com/golang-jwt/jwt/v5"
"github.com/google/uuid"
"github.com/jackc/pgx/v5/pgtype"
"github.com/labstack/echo-jwt/v4"
echojwt "github.com/labstack/echo-jwt/v4"
"github.com/labstack/echo/v4"
echomiddleware "github.com/labstack/echo/v4/middleware"
)
@@ -134,6 +134,7 @@ func RegisterRoutes(cfg *Config) *handlers.Handler {
registerWebSocketRoutes(cfg)
registerFrontendRoutes(cfg)
registerDocumentationRoutes(cfg)
e.Static("/static", "web/static")
// Create scanner handler for scanner routes and progress routes
scannerHandler := handlers.SetupRoutes(protected, cfg.Queries, cfg.ConnManager, cfg.QueueProcessor)
+16
View File
@@ -5,6 +5,22 @@ const config: Config = {
"./templates/**/*.{templ,html}",
"./web/static/**/*.{html,js}"
],
safelist: [
'theme-tokyo-night',
'theme-dracula',
'theme-nord',
'theme-solarized-dark',
'theme-monokai',
'theme-one-dark-pro',
'theme-material-dark',
'theme-catppuccin-mocha',
'theme-catppuccin-macchiato',
'theme-catppuccin-frappe',
'theme-catppuccin-latte',
'theme-wood-light',
'theme-wood-dark',
'theme-wood-mahogany',
],
theme: {
extend: {
colors: {
+1 -1
View File
File diff suppressed because one or more lines are too long