mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
fix(display): cursor visible
This commit is contained in:
+24
-21
@@ -1,12 +1,11 @@
|
|||||||
package web
|
package web
|
||||||
|
|
||||||
templ indexTemplate() {
|
templ indexTemplate() {
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
<meta charset="UTF-8"/>
|
||||||
<meta charset="UTF-8" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>PLG Connect Display</title>
|
<title>PLG Connect Display</title>
|
||||||
<script src="/static/htmx.min.js"></script>
|
<script src="/static/htmx.min.js"></script>
|
||||||
<script src="/static/htmx-ext-sse.min.js"></script>
|
<script src="/static/htmx-ext-sse.min.js"></script>
|
||||||
@@ -33,6 +32,7 @@ templ indexTemplate() {
|
|||||||
background-color: var(--background-color);
|
background-color: var(--background-color);
|
||||||
color: var(--foreground-color);
|
color: var(--foreground-color);
|
||||||
font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
||||||
|
cursor: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
video,
|
video,
|
||||||
@@ -75,42 +75,45 @@ templ indexTemplate() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<bod>
|
<bod>
|
||||||
<div hx-get="/splash" hx-trigger="load"></div>
|
<div hx-get="/splash" hx-trigger="load"></div>
|
||||||
<main hx-ext="sse" sse-connect="/sse" sse-swap="message"></main>
|
<main hx-ext="sse" sse-connect="/sse" sse-swap="message"></main>
|
||||||
</bod>
|
</bod>
|
||||||
|
</html>
|
||||||
</html>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
templ videoTemplate(path string) {
|
templ videoTemplate(path string) {
|
||||||
<video autoplay>
|
<video autoplay>
|
||||||
<source src={ "/api/file/" + path } type="video/mp4" />
|
<source src={ "/api/file/" + path } type="video/mp4"/>
|
||||||
</video>
|
</video>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ imageTemplate(path string) {
|
templ imageTemplate(path string) {
|
||||||
<img src={ "/api/file/" + path } />
|
<img src={ "/api/file/" + path }/>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ deviceInfoTemplate(ip string, mac string, showQR bool) {
|
templ deviceInfoTemplate(ip string, mac string, showQR bool) {
|
||||||
<div style="width: 100vw; height: 100vh; display: flex; flex-direction: row; justify-content: space-between;">
|
<div style="width: 100vw; height: 100vh; display: flex; flex-direction: row; justify-content: space-between;">
|
||||||
<div
|
<div
|
||||||
style="display: flex; flex-direction: column; gap: 1rem; justify-content: end; padding: 2rem; font-size: 4rem;">
|
style="display: flex; flex-direction: column; gap: 1rem; justify-content: end; padding: 2rem; font-size: 4rem;"
|
||||||
|
>
|
||||||
{ ip }
|
{ ip }
|
||||||
<span style="text-transform: uppercase;">{ mac }</span>
|
<span style="text-transform: uppercase;">{ mac }</span>
|
||||||
</div>
|
</div>
|
||||||
if showQR {
|
if showQR {
|
||||||
<div style="display: flex; justify-content: end; align-items: end; padding: 2rem;">
|
<div style="display: flex; justify-content: end; align-items: end; padding: 2rem;">
|
||||||
<div style="padding: 1rem; background-color: var(--foreground-color); border-radius: 1rem;">
|
<div style="padding: 1rem; background-color: var(--foreground-color); border-radius: 1rem;">
|
||||||
<img style="height: 30vh; width: auto; image-rendering: pixelated; image-rendering: crisp-edges;"
|
<img
|
||||||
src={ "/qr?data=http://" + ip + ":8080" } alt="QR-Code" />
|
style="height: 30vh; width: auto; image-rendering: pixelated; image-rendering: crisp-edges;"
|
||||||
|
src={ "/qr?data=http://" + ip + ":8080" }
|
||||||
|
alt="QR-Code"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--splash-bg: transparent !important;
|
--splash-bg: transparent !important;
|
||||||
--splash-fade-out-state: paused !important;
|
--splash-fade-out-state: paused !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user