Files
clj-ui-framework/dev/index.html
Florian Schroedl 42ddb56d65 Init
2026-03-03 11:02:08 +01:00

85 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>UI Framework — Test Page</title>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: #f0f0f0;
color: #1a1a1a;
}
.tabs {
display: flex;
gap: 0;
background: #fff;
border-bottom: 2px solid #e0e0e0;
padding: 0 1rem;
}
.tab {
padding: 0.75rem 1.5rem;
cursor: pointer;
border: none;
background: none;
font-size: 0.875rem;
font-weight: 500;
color: #666;
border-bottom: 2px solid transparent;
margin-bottom: -2px;
transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: #1a1a1a; }
.tab.active {
color: #2563eb;
border-bottom-color: #2563eb;
}
.tab.disabled {
color: #ccc;
cursor: not-allowed;
}
.frame-container {
height: calc(100vh - 45px);
}
iframe {
width: 100%;
height: 100%;
border: none;
}
.placeholder {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: #999;
font-size: 1.1rem;
}
</style>
</head>
<body>
<div class="tabs">
<button class="tab active" data-target="hiccup" data-url="http://localhost:3003">Hiccup</button>
<button class="tab" data-target="replicant" data-url="http://localhost:3001">Replicant</button>
<button class="tab" data-target="squint" data-url="http://localhost:3002">Squint</button>
</div>
<div class="frame-container" id="frame-container">
<iframe id="target-frame" src="http://localhost:3003"></iframe>
</div>
<script>
const tabs = document.querySelectorAll('.tab');
const frame = document.getElementById('target-frame');
tabs.forEach(tab => {
tab.addEventListener('click', () => {
if (tab.classList.contains('disabled')) return;
tabs.forEach(t => t.classList.remove('active'));
tab.classList.add('active');
frame.src = tab.dataset.url;
});
});
</script>
</body>
</html>