Add header

This commit is contained in:
2025-12-10 11:02:39 +01:00
parent bdbb0d6b36
commit e5182591b9
2 changed files with 85 additions and 20 deletions

View File

@@ -268,6 +268,58 @@ body {
flex-direction: column;
}
.admin-body {
background: radial-gradient(circle at 0% 30%, rgba(59, 130, 246, 0.12), transparent 32%),
radial-gradient(circle at 90% 5%, rgba(124, 58, 237, 0.1), transparent 30%),
#0f172a;
}
.admin-shell {
max-width: 1200px;
width: 100%;
margin: 0 auto;
padding: 28px 18px 56px;
display: flex;
flex-direction: column;
gap: 18px;
}
.admin-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 18px 22px;
background: rgba(15, 23, 42, 0.92);
border: 1px solid #1f2937;
border-radius: 16px;
box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}
.admin-header h1 {
margin: 6px 0 8px;
}
.admin-identity {
display: flex;
gap: 14px;
align-items: center;
}
.header-actions.tight {
gap: 8px;
}
.header-actions.horizontal {
flex-direction: row;
align-items: center;
gap: 10px;
}
.header-actions.horizontal form {
margin: 0;
}
.dashboard-body {
min-height: 100vh;
background: radial-gradient(circle at 0% 30%, rgba(59, 130, 246, 0.14), transparent 30%),
@@ -397,6 +449,7 @@ body {
gap: 24px;
padding: 16px;
background: #0b1220;
border-radius: 12px;
}
.controls-full {
@@ -450,10 +503,13 @@ body {
.overlay {
position: relative;
flex: 1;
min-height: 420px;
height: calc(100vh - 260px);
min-height: 520px;
height: calc(100vh - 220px);
background: black;
overflow: hidden;
border: 1px solid #1f2937;
border-radius: 16px;
box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
}
.overlay iframe {

View File

@@ -9,24 +9,32 @@
<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/stompjs@2.3.3/lib/stomp.min.js"></script>
</head>
<body>
<body class="admin-body">
<div class="admin-layout">
<header>
<h2>Channel <span th:text="${broadcaster}"></span> overlay controls</h2>
<div class="actions">
<form th:action="@{/logout}" method="post">
<button class="secondary" type="submit">Logout</button>
</form>
</div>
</header>
<section class="overlay" id="admin-overlay">
<iframe th:src="${'https://player.twitch.tv/?channel=' + broadcaster + '&parent=localhost'}" allowfullscreen></iframe>
<canvas id="admin-canvas"></canvas>
</section>
<section class="controls assets-panel">
<div class="controls-full panel">
<h3>Overlay assets</h3>
<p>Upload overlay visuals and adjust them inline.</p>
<div class="admin-shell">
<header class="admin-header">
<div class="admin-identity">
<div class="brand-mark">IF</div>
<div>
<p class="eyebrow subtle">Channel</p>
<h1 th:text="${broadcaster}"></h1>
</div>
</div>
<div class="header-actions horizontal">
<a class="button ghost" th:href="@{/}">Back to dashboard</a>
<form th:action="@{/logout}" method="post">
<button class="secondary" type="submit">Logout</button>
</form>
</div>
</header>
<section class="overlay" id="admin-overlay">
<iframe th:src="${'https://player.twitch.tv/?channel=' + broadcaster + '&parent=localhost'}" allowfullscreen></iframe>
<canvas id="admin-canvas"></canvas>
</section>
<section class="controls assets-panel">
<div class="controls-full panel">
<h3>Overlay assets</h3>
<p>Upload overlay visuals and adjust them inline.</p>
<div class="asset-management">
<div class="asset-column">
<div class="upload-row">
@@ -161,7 +169,8 @@
</div>
</div>
</div>
</section>
</section>
</div>
</div>
<script th:inline="javascript">
const broadcaster = /*[[${broadcaster}]]*/ '';