Debug panel: hide border when collapsed, arrow points right when collapsed
This commit is contained in:
1 parent
615c40a245
commit
36f1a425db
1 file changed
+8
-12
+8
-12
@@ -32,7 +32,6 @@
|
|||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: var(--orange);
|
color: var(--orange);
|
||||||
border-bottom: 1px solid rgba(230, 223, 209, 0.3);
|
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -41,21 +40,15 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
.debug-title.expanded {
|
||||||
|
border-bottom: 1px solid rgba(230, 223, 209, 0.3);
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
.debug-title-toggle {
|
.debug-title-toggle {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
color: var(--icon);
|
color: var(--icon);
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
}
|
}
|
||||||
.debug-content {
|
|
||||||
overflow: hidden;
|
|
||||||
transition: max-height 0.3s ease;
|
|
||||||
}
|
|
||||||
.debug-content.collapsed {
|
|
||||||
max-height: 0;
|
|
||||||
padding-top: 0;
|
|
||||||
padding-bottom: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.debug-section {
|
.debug-section {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
color: var(--icon);
|
color: var(--icon);
|
||||||
@@ -288,7 +281,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="vanta"></div>
|
<div id="vanta"></div>
|
||||||
<div id="debug-panel">
|
<div id="debug-panel">
|
||||||
<div class="debug-title" onclick="toggleDebugPanel()"><span>DEBUG - Palette: Ash</span><span class="debug-title-toggle" id="debug-toggle-icon">▼</span></div>
|
<div class="debug-title expanded" onclick="toggleDebugPanel()"><span>DEBUG - Palette: Ash</span><span class="debug-title-toggle" id="debug-toggle-icon">▼</span></div>
|
||||||
<div id="debug-content" class="debug-content">
|
<div id="debug-content" class="debug-content">
|
||||||
<div class="debug-row"><span class="debug-label">Time:</span> <span id="dbg-time">--</span></div>
|
<div class="debug-row"><span class="debug-label">Time:</span> <span id="dbg-time">--</span></div>
|
||||||
<div class="debug-row"><span class="debug-label">Day%:</span> <span id="dbg-day">--</span></div>
|
<div class="debug-row"><span class="debug-label">Day%:</span> <span id="dbg-day">--</span></div>
|
||||||
@@ -1141,12 +1134,15 @@ var weatherThemes = {
|
|||||||
|
|
||||||
function toggleDebugPanel() {
|
function toggleDebugPanel() {
|
||||||
var content = document.getElementById('debug-content');
|
var content = document.getElementById('debug-content');
|
||||||
|
var title = document.querySelector('.debug-title');
|
||||||
var icon = document.getElementById('debug-toggle-icon');
|
var icon = document.getElementById('debug-toggle-icon');
|
||||||
if (content.style.display === 'none') {
|
if (content.style.display === 'none') {
|
||||||
content.style.display = '';
|
content.style.display = '';
|
||||||
|
title.classList.add('expanded');
|
||||||
icon.textContent = '▼';
|
icon.textContent = '▼';
|
||||||
} else {
|
} else {
|
||||||
content.style.display = 'none';
|
content.style.display = 'none';
|
||||||
|
title.classList.remove('expanded');
|
||||||
icon.textContent = '▶';
|
icon.textContent = '▶';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user