diff --git a/index.html b/index.html new file mode 100644 index 0000000..35cf5ac --- /dev/null +++ b/index.html @@ -0,0 +1,37 @@ + + + + + + Farbhelfer + + + +
+

Farbhelfer

+ +
+ +
+
+

Picker kommt hier

+
+
+

Eingabe kommt hier

+
+
+

Harmonien kommen hier

+
+
+

Sammlung kommt hier

+
+
+ + + + diff --git a/js/app.js b/js/app.js new file mode 100644 index 0000000..09b086b --- /dev/null +++ b/js/app.js @@ -0,0 +1,19 @@ +// Globaler State — aktive Farbe als { h, s, l } (HSL, 0-360, 0-100, 0-100) +export const state = { + color: { h: 200, s: 60, l: 50 }, + setColor(hsl) { + this.color = hsl; + document.dispatchEvent(new CustomEvent('colorChanged', { detail: hsl })); + } +}; + +// Tab-Navigation +document.querySelectorAll('.tab-btn').forEach(btn => { + btn.addEventListener('click', () => { + const tab = btn.dataset.tab; + document.querySelectorAll('.tab-btn').forEach(b => b.classList.remove('active')); + document.querySelectorAll('.tab-content').forEach(s => s.classList.remove('active')); + btn.classList.add('active'); + document.getElementById('tab-' + tab).classList.add('active'); + }); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..0199c1d --- /dev/null +++ b/style.css @@ -0,0 +1,88 @@ +*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } + +body { + font-family: system-ui, sans-serif; + background: #f5f5f5; + color: #222; + min-height: 100vh; +} + +header { + background: #fff; + border-bottom: 1px solid #ddd; + padding: 1rem 1.5rem; + position: sticky; + top: 0; + z-index: 10; +} + +header h1 { font-size: 1.2rem; margin-bottom: 0.75rem; } + +nav { display: flex; gap: 0.5rem; } + +.tab-btn { + padding: 0.4rem 1rem; + border: 1px solid #ccc; + border-radius: 6px; + background: #fff; + cursor: pointer; + font-size: 0.9rem; +} + +.tab-btn.active { + background: #222; + color: #fff; + border-color: #222; +} + +main { padding: 1.5rem; max-width: 900px; margin: 0 auto; } + +.tab-content { display: none; } +.tab-content.active { display: block; } + +.color-preview { + width: 100%; + height: 80px; + border-radius: 8px; + border: 1px solid #ddd; + margin-bottom: 0.75rem; +} + +.color-codes { + display: flex; + gap: 1rem; + flex-wrap: wrap; + margin-bottom: 1rem; +} + +.color-code-group { display: flex; flex-direction: column; gap: 0.25rem; } +.color-code-group label { font-size: 0.75rem; color: #666; text-transform: uppercase; } +.color-code-group input { + padding: 0.4rem 0.6rem; + border: 1px solid #ccc; + border-radius: 6px; + font-family: monospace; + font-size: 0.9rem; + width: 140px; +} + +button.action-btn { + padding: 0.4rem 0.9rem; + border: 1px solid #ccc; + border-radius: 6px; + background: #fff; + cursor: pointer; + font-size: 0.85rem; +} + +button.action-btn:hover { background: #f0f0f0; } + +.swatch { + display: inline-block; + width: 40px; + height: 40px; + border-radius: 6px; + border: 1px solid #ddd; + cursor: pointer; + vertical-align: middle; +}