diff --git a/control/frontend/src/routes/+page.svelte b/control/frontend/src/routes/+page.svelte index ba47654..ce55fb6 100644 --- a/control/frontend/src/routes/+page.svelte +++ b/control/frontend/src/routes/+page.svelte @@ -31,7 +31,7 @@ X } from 'lucide-svelte'; import Button from '../components/Button.svelte'; - import SplashScreen from '../components/SplashScreen.svelte'; + import SplashScreen from './../../../../shared/splash_screen.html?raw'; import { change_display_screen_height, display_screen_height, @@ -94,7 +94,7 @@
- +
PLG MuDiCS diff --git a/display/web/main.go b/display/web/main.go index 939bb23..2e8dfcc 100644 --- a/display/web/main.go +++ b/display/web/main.go @@ -11,6 +11,7 @@ import ( "os" "os/exec" "path/filepath" + shared "plg-mudics/shared" "strings" "github.com/labstack/echo/v4" @@ -42,6 +43,9 @@ func StartWebServer(v string) { e.GET("/", indexRoute) e.GET("/sse", sseRoute) + e.GET("/splash", func(ctx echo.Context) error { + return ctx.HTML(http.StatusOK, shared.SplashScreenTemplate) + }) apiGroup := e.Group("/api") apiGroup.GET("/ping", pingRoute) diff --git a/display/web/main.templ b/display/web/main.templ index 605666a..9e82e3e 100644 --- a/display/web/main.templ +++ b/display/web/main.templ @@ -56,7 +56,7 @@ templ indexTemplate() { - @animationTemplate() +
@@ -79,279 +79,3 @@ templ deviceInfoTemplate(ip string, mac string) { { mac }

} - -templ animationTemplate() { -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mu - Di - C - S - - - - - - - - - - - - -
- -} diff --git a/go.work b/go.work index cc0d219..c60dc95 100644 --- a/go.work +++ b/go.work @@ -1,6 +1,7 @@ go 1.25.2 use ( + ./shared ./display ./control ) diff --git a/shared/go.mod b/shared/go.mod new file mode 100644 index 0000000..060c08f --- /dev/null +++ b/shared/go.mod @@ -0,0 +1,3 @@ +module plg-mudics/shared + +go 1.25.2 diff --git a/shared/main.go b/shared/main.go new file mode 100644 index 0000000..23e0f9a --- /dev/null +++ b/shared/main.go @@ -0,0 +1,8 @@ +package shared + +import ( + _ "embed" +) + +//go:embed splash_screen.html +var SplashScreenTemplate string diff --git a/control/frontend/src/components/SplashScreen.svelte b/shared/splash_screen.html similarity index 100% rename from control/frontend/src/components/SplashScreen.svelte rename to shared/splash_screen.html