<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Emoji UI Dark with Panels</title>
<style>
body {
margin: 0;
font-family: system-ui, sans-serif;
background: #121212;
color: #eee;
height: 100vh;
display: flex;
flex-direction: column;
}
/* Top bar */
.topbar {
display: flex;
justify-content: space-around;
padding: 0.5rem 0;
background: #1e1e1e;
box-shadow: 0 2px 8px rgba(0,0,0,0.5);
font-size: 1.5rem;
z-index: 10;
}
.topbar button {
flex: 1;
background: none;
border: none;
font-size: 1.6rem;
cursor: pointer;
padding: 0.8rem 0;
color: #eee;
transition: background 0.2s, color 0.2s;
}
.topbar button:hover {
background: #2c2c2c;
color: #4fc3f7;
}
/* Slide-down panels */
.panel {
max-height: 0;
overflow: hidden;
background: #1b1b1b;
transition: max-height 0.4s ease;
}
.panel.open {
max-height: 260px; /* a bit taller to fit bigger placeholders */
}
/* Gallery */
.gallery-track {
display: flex;
gap: 0.75rem;
overflow-x: auto;
padding: 0.75rem 1rem;
}
.gallery img {
width: 200px;
height: 140px;
object-fit: cover;
border-radius: 0.75rem;
background: #333;
flex-shrink: 0;
}
/* Settings row */
.settings-track {
display: flex;
gap: 1rem;
overflow-x: auto;
padding: 0.5rem 1rem;
}
.stepper {
flex: 0 0 auto;
background: #2c2c2c;
border-radius: 0.6rem;
padding: 0.5rem;
text-align: center;
color: #eee;
min-width: 110px;
}
.stepper label {
display: block;
font-size: 0.8rem;
margin-bottom: 0.3rem;
color: #bbb;
}
.stepper-controls {
display: flex;
align-items: center;
justify-content: space-between;
background: #1e1e1e;
border-radius: 0.5rem;
overflow: hidden;
}
.stepper button {
flex: 0 0 30%;
background: #333;
border: none;
color: #eee;
font-size: 1.2rem;
cursor: pointer;
padding: 0.3rem 0;
transition: background 0.2s;
}
.stepper button:hover {
background: #4fc3f7;
color: #000;
}
.stepper input {
flex: 1;
background: #1e1e1e;
border: none;
color: #eee;
text-align: center;
font-size: 1rem;
width: 40px;
}
/* Generic action panels */
.actions-track {
display: flex;
flex-wrap: wrap;
gap: 0.8rem;
padding: 0.8rem 1rem;
justify-content: center;
}
.actions-track button {
background: #2c2c2c;
border: none;
border-radius: 0.5rem;
padding: 0.6rem 1rem;
font-size: 0.9rem;
color: #eee;
cursor: pointer;
transition: background 0.2s, color 0.2s;
}
.actions-track button:hover {
background: #4fc3f7;
color: #000;
}
/* Content */
.content {
flex: 1;
background: linear-gradient(135deg, #212121, #2c2c2c);
padding: 1.5rem;
border-top-left-radius: 1rem;
border-top-right-radius: 1rem;
overflow: auto;
}
h1 {
margin-top: 0;
color: #4fc3f7;
}
p {
color: #ccc;
}
</style>
</head>
<body>
<div class="topbar">
<button id="settingsBtn" title="Settings">โ๏ธ</button>
<button id="imagesBtn" title="Images">๐ผ๏ธ</button>
<button id="saveBtn" title="Save">๐พ</button>
<button title="Refresh">๐</button>
<button id="moreBtn" title="More">โฎ</button>
</div>
<!-- Settings panel -->
<div class="panel" id="settingsPanel">
<div class="settings-track">
<div class="stepper"><label>tileWidth</label>
<div class="stepper-controls"><button>-</button><input type="number" value="16"><button>+</button></div>
</div>
<div class="stepper"><label>tileHeight</label>
<div class="stepper-controls"><button>-</button><input type="number" value="16"><button>+</button></div>
</div>
<div class="stepper"><label>xOffset</label>
<div class="stepper-controls"><button>-</button><input type="number" value="0"><button>+</button></div>
</div>
<div class="stepper"><label>yOffset</label>
<div class="stepper-controls"><button>-</button><input type="number" value="0"><button>+</button></div>
</div>
<div class="stepper"><label>Vspacing</label>
<div class="stepper-controls"><button>-</button><input type="number" value="2"><button>+</button></div>
</div>
<div class="stepper"><label>Hspacing</label>
<div class="stepper-controls"><button>-</button><input type="number" value="2"><button>+</button></div>
</div>
</div>
</div>
<!-- Gallery panel -->
<div class="panel" id="gallery">
<div class="gallery-track">
<img src="https://via.placeholder.com/200x140/4fc3f7/ffffff?text=1" alt="placeholder 1">
<img src="https://via.placeholder.com/200x140/f06292/ffffff?text=2" alt="placeholder 2">
<img src="https://via.placeholder.com/200x140/ba68c8/ffffff?text=3" alt="placeholder 3">
<img src="https://via.placeholder.com/200x140/81c784/ffffff?text=4" alt="placeholder 4">
<img src="https://via.placeholder.com/200x140/ffb74d/ffffff?text=5" alt="placeholder 5">
</div>
</div>
<!-- Save actions panel -->
<div class="panel" id="savePanel">
<div class="actions-track">
<button id="saveImageBtn">๐ผ๏ธ Save Image</button>
<button id="saveJsonBtn">๐ Save JSON</button>
<button id="loadImageBtn">๐ Load Image</button>
<button id="loadJsonBtn">๐ Load JSON</button>
</div>
</div>
<!-- More actions panel -->
<div class="panel" id="actionsPanel">
<div class="actions-track">
<button id="cropBtn">โ๏ธ Crop</button>
<button id="clearBtn">๐งน Clear</button>
<button id="jsonBtn">๐ JSON</button>
</div>
</div>
<div class="content">
<h1>Dark Fullscreen Content</h1>
<p>This area takes up the rest of the screen. Add anything here.</p>
</div>
<script>
const settingsBtn = document.getElementById('settingsBtn');
const imagesBtn = document.getElementById('imagesBtn');
const saveBtn = document.getElementById('saveBtn');
const moreBtn = document.getElementById('moreBtn');
const settingsPanel = document.getElementById('settingsPanel');
const gallery = document.getElementById('gallery');
const savePanel = document.getElementById('savePanel');
const actionsPanel = document.getElementById('actionsPanel');
function closeAll() {
settingsPanel.classList.remove('open');
gallery.classList.remove('open');
savePanel.classList.remove('open');
actionsPanel.classList.remove('open');
}
settingsBtn.addEventListener('click', () => {
const isOpen = settingsPanel.classList.contains('open');
closeAll();
if (!isOpen) settingsPanel.classList.add('open');
});
imagesBtn.addEventListener('click', () => {
const isOpen = gallery.classList.contains('open');
closeAll();
if (!isOpen) gallery.classList.add('open');
});
saveBtn.addEventListener('click', () => {
const isOpen = savePanel.classList.contains('open');
closeAll();
if (!isOpen) savePanel.classList.add('open');
});
moreBtn.addEventListener('click', () => {
const isOpen = actionsPanel.classList.contains('open');
closeAll();
if (!isOpen) actionsPanel.classList.add('open');
});
// Stepper logic with custom increments
document.querySelectorAll('.stepper').forEach(stepper => {
const label = stepper.querySelector('label').innerText;
const input = stepper.querySelector('input');
const [minus, plus] = stepper.querySelectorAll('button');
const stepSize = (label === "tileWidth" || label === "tileHeight") ? 8 : 1;
minus.addEventListener('click', () => {
input.value = parseInt(input.value) - stepSize;
});
plus.addEventListener('click', () => {
input.value = parseInt(input.value) + stepSize;
});
// Snap manually typed values
input.addEventListener('change', () => {
let val = parseInt(input.value) || 0;
if (label === "tileWidth" || label === "tileHeight") {
val = Math.round(val / 8) * 8; // snap to nearest 8
}
input.value = val;
});
});
// Save/Load actions (placeholders)
document.getElementById('saveImageBtn').addEventListener('click', () => alert("Save Image action"));
document.getElementById('saveJsonBtn').addEventListener('click', () => alert("Save JSON action"));
document.getElementById('loadImageBtn').addEventListener('click', () => alert("Load Image action"));
document.getElementById('loadJsonBtn').addEventListener('click', () => alert("Load JSON action"));
// More actions (placeholders)
document.getElementById('cropBtn').addEventListener('click', () => alert("Crop action triggered"));
document.getElementById('clearBtn').addEventListener('click', () => alert("Clear selection triggered"));
document.getElementById('jsonBtn').addEventListener('click', () => alert("View JSON triggered"));
</script>
</body>
</html>