mirror of
https://github.com/zix99/traefik-lazyload.git
synced 2025-12-24 14:31:54 +01:00
Refactor all key functions into a service
This commit is contained in:
21
assets.go
Normal file
21
assets.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"path"
|
||||
"text/template"
|
||||
"traefik-lazyload/pkg/config"
|
||||
)
|
||||
|
||||
//go:embed assets/*
|
||||
var httpAssets embed.FS
|
||||
|
||||
const httpAssetPrefix = "/__llassets/"
|
||||
|
||||
type SplashModel struct {
|
||||
Name string
|
||||
WaitForCode int
|
||||
WaitForPath string
|
||||
}
|
||||
|
||||
var splashTemplate = template.Must(template.ParseFS(httpAssets, path.Join("assets", config.Model.Splash)))
|
||||
Reference in New Issue
Block a user