Add the initial foundation for Coda, a Go/Docker service that converts FLAC albums to MP3 320 kbps CBR, triggered by Lidarr webhooks or manually from the web UI. - docs: requirements and architecture (SQLite persistence, media volume, work window, manual FLAC search, env + web config) - config: .env loader with env precedence - web: embed/dev asset split, chi server, index template (DaisyUI + htmx) - build: Makefile (setup/css/run/build/test/lint), Dockerfile (Tailwind standalone CLI + DaisyUI, no Node), .env.example, ignore rules - docs: AGENTS.md and README for the project
28 lines
333 B
Go
28 lines
333 B
Go
//go:build !dev
|
|
|
|
package webassets
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
)
|
|
|
|
//go:embed static templates
|
|
var files embed.FS
|
|
|
|
func Static() fs.FS {
|
|
sub, err := fs.Sub(files, "static")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return sub
|
|
}
|
|
|
|
func Templates() fs.FS {
|
|
sub, err := fs.Sub(files, "templates")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return sub
|
|
}
|