style: minimalist design for services status board with tooltip and horizontal traffic-light bars
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 11s
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 11s
This commit is contained in:
@@ -94,6 +94,6 @@
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script src="/admin.js?v=12" defer></script>
|
<script src="/admin.js?v=13" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
14
admin.js
14
admin.js
@@ -383,17 +383,13 @@ function renderServicesStatus(services = []) {
|
|||||||
statusLabel = 'Traege';
|
statusLabel = 'Traege';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tooltip = `${item.name}\nDomain: ${item.domain}\nStatus: ${statusLabel}\nLatenz: ${latencyText}`;
|
||||||
|
|
||||||
return `
|
return `
|
||||||
<div class="status-board-item ${statusClass}">
|
<div class="status-board-item ${statusClass}" title="${tooltip}">
|
||||||
<div class="status-board-item-header">
|
|
||||||
<h4>${item.name}</h4>
|
<h4>${item.name}</h4>
|
||||||
<span class="status-board-item-latency">${latencyText}</span>
|
<div class="status-board-item-bar">
|
||||||
</div>
|
<div class="status-board-item-bar-inner"></div>
|
||||||
<div class="status-board-item-body">
|
|
||||||
<span class="status-board-item-domain">${item.domain}</span>
|
|
||||||
<div class="status-board-item-info">
|
|
||||||
<span class="status-board-item-status">${statusLabel}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|||||||
137
style.css
137
style.css
@@ -915,138 +915,67 @@ main {
|
|||||||
========================================================================== */
|
========================================================================== */
|
||||||
.services-status-board {
|
.services-status-board {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
|
||||||
gap: 12px;
|
gap: 12px 14px;
|
||||||
margin-top: 6px;
|
margin-top: 8px;
|
||||||
|
padding: 2px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-board-item {
|
.status-board-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 13px 14px;
|
gap: 5px;
|
||||||
background: rgba(14, 19, 31, 0.45);
|
cursor: help;
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
transition: all 0.22s cubic-bezier(0.165, 0.84, 0.44, 1);
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-board-item:hover {
|
.status-board-item h4 {
|
||||||
background: rgba(23, 29, 45, 0.65);
|
|
||||||
border-color: var(--border-strong);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-board-item-header {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 10px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-board-item-header h4 {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.92rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 650;
|
font-weight: 500;
|
||||||
color: var(--text);
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-board-item-body {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-board-item-domain {
|
|
||||||
font-size: 0.76rem;
|
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
transition: color 0.15s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-board-item-info {
|
.status-board-item:hover h4 {
|
||||||
display: flex;
|
color: var(--text);
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-top: 6px;
|
|
||||||
font-size: 0.78rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-board-item-status {
|
.status-board-item-bar {
|
||||||
font-weight: 650;
|
height: 4px;
|
||||||
font-size: 0.78rem;
|
width: 100%;
|
||||||
|
background: rgba(255, 255, 255, 0.08);
|
||||||
|
border-radius: 2px;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-board-item-latency {
|
.status-board-item-bar-inner {
|
||||||
font-size: 0.74rem;
|
|
||||||
color: var(--dim);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Status styles with glowing left bars */
|
|
||||||
.status-board-item.is-online {
|
|
||||||
border-color: rgba(52, 211, 153, 0.16);
|
|
||||||
background: rgba(16, 185, 129, 0.02);
|
|
||||||
}
|
|
||||||
.status-board-item.is-online .status-board-item-status {
|
|
||||||
color: var(--ok);
|
|
||||||
}
|
|
||||||
.status-board-item.is-online::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 3px;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: var(--ok);
|
width: 100%;
|
||||||
box-shadow: 0 0 8px var(--ok);
|
border-radius: inherit;
|
||||||
|
transition: background-color 0.25s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-board-item.is-offline {
|
/* Subtle traffic light colors without glows */
|
||||||
border-color: rgba(239, 68, 68, 0.3);
|
.status-board-item.is-online .status-board-item-bar-inner {
|
||||||
background: rgba(239, 68, 68, 0.05);
|
background-color: var(--ok);
|
||||||
}
|
|
||||||
.status-board-item.is-offline .status-board-item-status {
|
|
||||||
color: var(--down);
|
|
||||||
}
|
|
||||||
.status-board-item.is-offline::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 3px;
|
|
||||||
height: 100%;
|
|
||||||
background: var(--down);
|
|
||||||
box-shadow: 0 0 8px var(--down);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-board-item.is-warning {
|
.status-board-item.is-offline .status-board-item-bar-inner {
|
||||||
border-color: rgba(245, 158, 11, 0.25);
|
background-color: var(--down);
|
||||||
background: rgba(245, 158, 11, 0.04);
|
|
||||||
}
|
}
|
||||||
.status-board-item.is-warning .status-board-item-status {
|
|
||||||
color: var(--warn);
|
.status-board-item.is-warning .status-board-item-bar-inner {
|
||||||
}
|
background-color: var(--warn);
|
||||||
.status-board-item.is-warning::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 3px;
|
|
||||||
height: 100%;
|
|
||||||
background: var(--warn);
|
|
||||||
box-shadow: 0 0 8px var(--warn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 620px) {
|
@media (max-width: 620px) {
|
||||||
.services-status-board {
|
.services-status-board {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
|
||||||
gap: 8px;
|
gap: 10px 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user