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; 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 { .dashboard-body {
min-height: 100vh; min-height: 100vh;
background: radial-gradient(circle at 0% 30%, rgba(59, 130, 246, 0.14), transparent 30%), background: radial-gradient(circle at 0% 30%, rgba(59, 130, 246, 0.14), transparent 30%),
@@ -397,6 +449,7 @@ body {
gap: 24px; gap: 24px;
padding: 16px; padding: 16px;
background: #0b1220; background: #0b1220;
border-radius: 12px;
} }
.controls-full { .controls-full {
@@ -450,10 +503,13 @@ body {
.overlay { .overlay {
position: relative; position: relative;
flex: 1; flex: 1;
min-height: 420px; min-height: 520px;
height: calc(100vh - 260px); height: calc(100vh - 220px);
background: black; background: black;
overflow: hidden; overflow: hidden;
border: 1px solid #1f2937;
border-radius: 16px;
box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
} }
.overlay iframe { .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/sockjs-client@1/dist/sockjs.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/stompjs@2.3.3/lib/stomp.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/stompjs@2.3.3/lib/stomp.min.js"></script>
</head> </head>
<body> <body class="admin-body">
<div class="admin-layout"> <div class="admin-layout">
<header> <div class="admin-shell">
<h2>Channel <span th:text="${broadcaster}"></span> overlay controls</h2> <header class="admin-header">
<div class="actions"> <div class="admin-identity">
<form th:action="@{/logout}" method="post"> <div class="brand-mark">IF</div>
<button class="secondary" type="submit">Logout</button> <div>
</form> <p class="eyebrow subtle">Channel</p>
</div> <h1 th:text="${broadcaster}"></h1>
</header> </div>
<section class="overlay" id="admin-overlay"> </div>
<iframe th:src="${'https://player.twitch.tv/?channel=' + broadcaster + '&parent=localhost'}" allowfullscreen></iframe> <div class="header-actions horizontal">
<canvas id="admin-canvas"></canvas> <a class="button ghost" th:href="@{/}">Back to dashboard</a>
</section> <form th:action="@{/logout}" method="post">
<section class="controls assets-panel"> <button class="secondary" type="submit">Logout</button>
<div class="controls-full panel"> </form>
<h3>Overlay assets</h3> </div>
<p>Upload overlay visuals and adjust them inline.</p> </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-management">
<div class="asset-column"> <div class="asset-column">
<div class="upload-row"> <div class="upload-row">
@@ -161,7 +169,8 @@
</div> </div>
</div> </div>
</div> </div>
</section> </section>
</div>
</div> </div>
<script th:inline="javascript"> <script th:inline="javascript">
const broadcaster = /*[[${broadcaster}]]*/ ''; const broadcaster = /*[[${broadcaster}]]*/ '';