update
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>AzA</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html, body {
|
||||
width: 100%; height: 100%; overflow: hidden;
|
||||
font-family: "Segoe UI", system-ui, sans-serif;
|
||||
background: #c5d4e2;
|
||||
}
|
||||
.bg-video, .bg-fallback {
|
||||
position: fixed; inset: 0; width: 100%; height: 100%;
|
||||
object-fit: cover; z-index: 0;
|
||||
}
|
||||
.bg-fallback { display: none; }
|
||||
body.no-video .bg-video { display: none; }
|
||||
body.no-video .bg-fallback { display: block; }
|
||||
.fog {
|
||||
position: fixed; inset: 0; z-index: 1;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(240, 246, 252, 0.35) 0%,
|
||||
rgba(230, 240, 250, 0.55) 45%,
|
||||
rgba(220, 232, 244, 0.65) 100%
|
||||
);
|
||||
pointer-events: none;
|
||||
}
|
||||
.stage {
|
||||
position: fixed; inset: 0; z-index: 2;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
padding: 24px;
|
||||
}
|
||||
.card {
|
||||
width: min(294px, 88vw);
|
||||
padding: 22px 22px 18px;
|
||||
border-radius: 18px;
|
||||
background: rgba(255, 255, 255, 0.72);
|
||||
border: 1px solid rgba(255, 255, 255, 0.85);
|
||||
box-shadow: 0 12px 40px rgba(26, 42, 58, 0.12);
|
||||
backdrop-filter: blur(14px);
|
||||
-webkit-backdrop-filter: blur(14px);
|
||||
text-align: center;
|
||||
}
|
||||
.logo {
|
||||
width: 48px; height: 48px; object-fit: contain;
|
||||
margin: 0 auto 10px; display: block;
|
||||
}
|
||||
h1 {
|
||||
font-size: 1.55rem; font-weight: 700;
|
||||
color: #1a2a3a; letter-spacing: 0.02em;
|
||||
}
|
||||
.sub {
|
||||
margin-top: 6px; margin-bottom: 18px;
|
||||
font-size: 0.92rem; color: #5a6d7d;
|
||||
}
|
||||
.btn {
|
||||
display: block; width: 100%;
|
||||
margin-bottom: 10px;
|
||||
padding: 12px 16px;
|
||||
border: none; border-radius: 10px;
|
||||
font-size: 0.95rem; font-weight: 600;
|
||||
color: #fff; background: #1a5f8a;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s ease, transform 0.1s ease;
|
||||
box-shadow: 0 4px 14px rgba(26, 95, 138, 0.25);
|
||||
}
|
||||
.btn:last-of-type { margin-bottom: 0; }
|
||||
.btn:hover { background: #164f73; }
|
||||
.btn:active { transform: scale(0.98); }
|
||||
.btn:disabled { opacity: 0.65; cursor: wait; }
|
||||
.foot {
|
||||
margin-top: 16px; font-size: 0.72rem; color: #7a8d9c;
|
||||
}
|
||||
.err {
|
||||
display: none; margin-top: 10px;
|
||||
font-size: 0.78rem; color: #b42318;
|
||||
}
|
||||
.err.show { display: block; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<video class="bg-video" autoplay muted loop playsinline
|
||||
poster="../assets/matternhorn.png">
|
||||
<source src="../assets/matternhorn-aza-2.mp4" type="video/mp4"/>
|
||||
</video>
|
||||
<img class="bg-fallback" src="../assets/matternhorn.png" alt=""/>
|
||||
<div class="fog"></div>
|
||||
<div class="stage">
|
||||
<div class="card">
|
||||
<img class="logo" src="../logo.png" alt="" onerror="this.style.display='none'"/>
|
||||
<h1>AzA</h1>
|
||||
<p class="sub">Was möchten Sie öffnen?</p>
|
||||
<button type="button" class="btn" id="btnOffice">AzA Office</button>
|
||||
<button type="button" class="btn" id="btnMiniChat">MiniChat</button>
|
||||
<p class="err" id="errBox"></p>
|
||||
<p class="foot">AzA Medwork</p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var v = document.querySelector(".bg-video");
|
||||
function useFallback() {
|
||||
document.body.classList.add("no-video");
|
||||
}
|
||||
if (v) {
|
||||
v.addEventListener("error", useFallback);
|
||||
v.addEventListener("stalled", function () {
|
||||
if (v.readyState < 2) useFallback();
|
||||
});
|
||||
setTimeout(function () {
|
||||
if (v.readyState < 2 && v.error) useFallback();
|
||||
}, 2500);
|
||||
} else {
|
||||
useFallback();
|
||||
}
|
||||
|
||||
function showErr(msg) {
|
||||
var el = document.getElementById("errBox");
|
||||
el.textContent = msg || "";
|
||||
el.classList.toggle("show", !!msg);
|
||||
}
|
||||
|
||||
function setBusy(busy) {
|
||||
document.getElementById("btnOffice").disabled = busy;
|
||||
document.getElementById("btnMiniChat").disabled = busy;
|
||||
}
|
||||
|
||||
async function callApi(method) {
|
||||
if (!window.pywebview || !pywebview.api || !pywebview.api[method]) {
|
||||
showErr("Start-API nicht verfügbar.");
|
||||
return;
|
||||
}
|
||||
setBusy(true);
|
||||
showErr("");
|
||||
try {
|
||||
var r = await pywebview.api[method]();
|
||||
if (r && r.ok) return;
|
||||
showErr((r && r.message) ? r.message : "Start fehlgeschlagen.");
|
||||
} catch (e) {
|
||||
showErr(String(e && e.message ? e.message : e));
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("btnOffice").addEventListener("click", function () {
|
||||
callApi("launch_office");
|
||||
});
|
||||
document.getElementById("btnMiniChat").addEventListener("click", function () {
|
||||
callApi("launch_minichat");
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user