Automatische Willkommensseite hinzugefügt
This commit is contained in:
@@ -136,6 +136,7 @@
|
||||
</a>
|
||||
|
||||
<div class="d-none d-sm-inline">
|
||||
<a href="/customer" class="btn">Willkommensseite</a>
|
||||
<a href="/logout" class="btn">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -211,7 +212,7 @@
|
||||
|
||||
{% if file.type == "image" %}
|
||||
<span class="badge bg-purple text-purple-fg">Bild</span>
|
||||
{% elif file.type == "url" %}
|
||||
{% elif file.type == "url" or file.type == "html" %}
|
||||
<span class="badge bg-blue text-blue-fg">URL</span>
|
||||
{% else %}
|
||||
<span class="badge bg-orange text-orange-fg">Video</span>
|
||||
@@ -367,7 +368,7 @@
|
||||
|
||||
{% if file.type == "image" %}
|
||||
<span class="badge bg-purple text-purple-fg">Bild</span>
|
||||
{% elif file.type == "url" %}
|
||||
{% elif file.type == "url" or file.type == "html" %}
|
||||
<span class="badge bg-blue text-blue-fg">URL</span>
|
||||
{% else %}
|
||||
<span class="badge bg-orange text-orange-fg">Video</span>
|
||||
|
||||
133
templates/customer.html
Normal file
133
templates/customer.html
Normal file
@@ -0,0 +1,133 @@
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<title>Kunde hinzufügen</title>
|
||||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="https://unpkg.com/@tabler/core@1.0.0-beta20/dist/css/tabler.min.css">
|
||||
<script defer
|
||||
src="https://unpkg.com/@tabler/core@1.0.0-beta20/dist/js/tabler.min.js"></script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #F4F6F8;
|
||||
color: #212121;
|
||||
}
|
||||
.navbar {
|
||||
background-color: #DA002D;
|
||||
}
|
||||
.navbar-brand,
|
||||
.navbar-brand h2,
|
||||
.navbar-brand .page-pretitle {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.card-header {
|
||||
background-color: #eeeeee;
|
||||
border-left: 6px solid #DA002D;
|
||||
padding-left: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #DA002D;
|
||||
border-color: #DA002D;
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background-color: #B00024;
|
||||
border-color: #B00024;
|
||||
}
|
||||
.form-label {
|
||||
font-weight: 600;
|
||||
}
|
||||
.card {
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.08);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page">
|
||||
<header class="navbar navbar-expand-md">
|
||||
<div class="container-xl">
|
||||
<a class="navbar-brand d-flex align-items-center"
|
||||
href="/admin">
|
||||
<img src="{{ url_for('static', filename='cancom.svg') }}"
|
||||
alt="CANCOM"
|
||||
height="32"
|
||||
class="me-2">
|
||||
<span class="page-pretitle text-white">
|
||||
Admin Dashboard
|
||||
<h2 class="page-title text-white">Simple Signage</h2>
|
||||
</span>
|
||||
</a>
|
||||
<div class="d-none d-sm-inline">
|
||||
<a href="/admin" class="btn">Zurück</a>
|
||||
<a href="/logout" class="btn">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="page-wrapper">
|
||||
<div class="container-xl mt-4">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header">
|
||||
<div class="row align-items-center">
|
||||
<div class="col">
|
||||
<div class="page-pretitle">Willkommensseite</div>
|
||||
<h2 class="page-title">Kundeninformationen eingeben</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">
|
||||
{{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if success %}
|
||||
<div class="alert alert-success">
|
||||
{{ success }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if logo_url %}
|
||||
<div class="alert alert-secondary d-flex align-items-center gap-3">
|
||||
<div>
|
||||
<strong>Logo Vorschau</strong>
|
||||
<div class="text-muted">Wenn das Logo erfolgreich gefunden wurde, wird es hier angezeigt.</div>
|
||||
</div>
|
||||
<img src="{{ logo_url }}"
|
||||
alt="Logo Vorschau"
|
||||
class="img-fluid border"
|
||||
style="max-height: 120px; max-width: 240px; object-fit: contain;">
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="POST">
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="customer_name">Kundenname</label>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
id="customer_name"
|
||||
name="customer_name"
|
||||
placeholder="z. B. Beispiel GmbH"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div class="mb-3 text-muted">
|
||||
<p class="mb-1">Das System sucht automatisch nach dem Kundenlogo</p>
|
||||
<p class="mb-0">und erstellt eine angepasste Willkommensseite für die Lobby-Playlist.</p>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Kundenlogo & Willkommensseite generieren
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -142,6 +142,10 @@ function isImage(item) {
|
||||
return item.kind === "file" && /\.(jpg|jpeg|png)$/i.test(item.name);
|
||||
}
|
||||
|
||||
function isHtml(item) {
|
||||
return item.kind === "file" && /\.(html?|htm)$/i.test(item.name);
|
||||
}
|
||||
|
||||
function getNextItem() {
|
||||
const normalizedNormal = normalFiles.map(normalizeItem);
|
||||
const normalizedPrio = prioFiles.map(normalizeItem);
|
||||
@@ -234,6 +238,13 @@ function playNext() {
|
||||
vid.src = src;
|
||||
vid.onended = playNext;
|
||||
vid.play();
|
||||
} else if (isHtml(item)) {
|
||||
iframe.style.display = "block";
|
||||
iframe.src = src;
|
||||
iframe.style.width = `100vw`;
|
||||
iframe.style.height = `100vh`;
|
||||
iframe.style.transform = `translate(-50%, -50%)`;
|
||||
setTimeout(playNext, interval);
|
||||
} else {
|
||||
img.style.display = "block";
|
||||
img.src = src;
|
||||
|
||||
Reference in New Issue
Block a user