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:
@@ -15,7 +15,7 @@ import (
|
|||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/jackc/pgx/v5/pgtype"
|
"github.com/jackc/pgx/v5/pgtype"
|
||||||
"github.com/labstack/echo-jwt/v4"
|
echojwt "github.com/labstack/echo-jwt/v4"
|
||||||
"github.com/labstack/echo/v4"
|
"github.com/labstack/echo/v4"
|
||||||
echomiddleware "github.com/labstack/echo/v4/middleware"
|
echomiddleware "github.com/labstack/echo/v4/middleware"
|
||||||
)
|
)
|
||||||
@@ -134,6 +134,7 @@ func RegisterRoutes(cfg *Config) *handlers.Handler {
|
|||||||
registerWebSocketRoutes(cfg)
|
registerWebSocketRoutes(cfg)
|
||||||
registerFrontendRoutes(cfg)
|
registerFrontendRoutes(cfg)
|
||||||
registerDocumentationRoutes(cfg)
|
registerDocumentationRoutes(cfg)
|
||||||
|
e.Static("/static", "web/static")
|
||||||
|
|
||||||
// Create scanner handler for scanner routes and progress routes
|
// Create scanner handler for scanner routes and progress routes
|
||||||
scannerHandler := handlers.SetupRoutes(protected, cfg.Queries, cfg.ConnManager, cfg.QueueProcessor)
|
scannerHandler := handlers.SetupRoutes(protected, cfg.Queries, cfg.ConnManager, cfg.QueueProcessor)
|
||||||
|
|||||||
@@ -5,6 +5,22 @@ const config: Config = {
|
|||||||
"./templates/**/*.{templ,html}",
|
"./templates/**/*.{templ,html}",
|
||||||
"./web/static/**/*.{html,js}"
|
"./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: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user