feat: change to dark mode theme
based on dracula midnight colors
This commit is contained in:
70
index.html
70
index.html
@@ -5,26 +5,26 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Gridfinity Calculator</title>
|
||||
</head>
|
||||
<body class="bg-slate-50 text-slate-900 min-h-screen">
|
||||
<body class="bg-dracula-darker text-dracula-foreground min-h-screen">
|
||||
<div id="app" class="max-w-2xl mx-auto p-4 md:p-8">
|
||||
<header class="mb-8 text-center">
|
||||
<h1 class="text-3xl font-bold text-slate-800">Gridfinity Calculator</h1>
|
||||
<p class="text-slate-600">Plan your modular storage layout</p>
|
||||
<h1 class="text-3xl font-bold text-dracula-purple">Gridfinity Calculator</h1>
|
||||
<p class="text-dracula-comment">Plan your modular storage layout</p>
|
||||
</header>
|
||||
|
||||
<main class="grid gap-8">
|
||||
<!-- Inputs Section -->
|
||||
<section class="bg-white p-6 rounded-xl shadow-sm border border-slate-200">
|
||||
<div class="flex flex-col md:flex-row md:items-center justify-between gap-4 mb-6 pb-6 border-b border-slate-100">
|
||||
<section class="bg-dracula-dark p-6 rounded-xl shadow-sm border border-dracula-currentLine">
|
||||
<div class="flex flex-col md:flex-row md:items-center justify-between gap-4 mb-6 pb-6 border-b border-dracula-currentLine">
|
||||
<h2 class="text-xl font-semibold flex items-center gap-2">
|
||||
Drawer Dimensions
|
||||
</h2>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<label class="text-sm font-medium text-slate-700">Units:</label>
|
||||
<div class="flex bg-slate-100 p-1 rounded-lg">
|
||||
<button id="unit-mm" class="px-4 py-1 rounded-md text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors">mm</button>
|
||||
<button id="unit-in" class="px-4 py-1 rounded-md text-sm font-medium bg-blue-600 text-white shadow-sm transition-colors">inches</button>
|
||||
<label class="text-sm font-medium text-dracula-foreground">Units:</label>
|
||||
<div class="flex bg-dracula-darker p-1 rounded-lg">
|
||||
<button id="unit-mm" class="px-4 py-1 rounded-md text-sm font-medium text-dracula-comment hover:text-dracula-foreground transition-colors">mm</button>
|
||||
<button id="unit-in" class="px-4 py-1 rounded-md text-sm font-medium bg-dracula-purple text-dracula-darker shadow-sm transition-colors">inches</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,41 +32,41 @@
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-slate-700 mb-1">Width</label>
|
||||
<input type="number" id="input-width" class="w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="0" step="any" />
|
||||
<label class="block text-sm font-medium text-dracula-comment mb-1">Width</label>
|
||||
<input type="number" id="input-width" class="w-full px-3 py-2 bg-dracula-darker border border-dracula-currentLine rounded-lg focus:ring-2 focus:ring-dracula-purple focus:border-dracula-purple text-dracula-foreground" placeholder="0" step="any" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-slate-700 mb-1">Length / Depth</label>
|
||||
<input type="number" id="input-length" class="w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="0" step="any" />
|
||||
<label class="block text-sm font-medium text-dracula-comment mb-1">Length / Depth</label>
|
||||
<input type="number" id="input-length" class="w-full px-3 py-2 bg-dracula-darker border border-dracula-currentLine rounded-lg focus:ring-2 focus:ring-dracula-purple focus:border-dracula-purple text-dracula-foreground" placeholder="0" step="any" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-sm font-medium text-slate-700 mb-1">Height</label>
|
||||
<input type="number" id="input-height" class="w-full px-3 py-2 border border-slate-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="0" step="any" />
|
||||
<label class="block text-sm font-medium text-dracula-comment mb-1">Height</label>
|
||||
<input type="number" id="input-height" class="w-full px-3 py-2 bg-dracula-darker border border-dracula-currentLine rounded-lg focus:ring-2 focus:ring-dracula-purple focus:border-dracula-purple text-dracula-foreground" placeholder="0" step="any" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Results Section -->
|
||||
<section id="results" class="bg-blue-600 text-white p-6 rounded-xl shadow-md hidden">
|
||||
<section id="results" class="bg-dracula-purple text-dracula-darker p-6 rounded-xl shadow-md hidden">
|
||||
<h2 class="text-xl font-semibold mb-6">Calculation Results</h2>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<p class="text-blue-100 text-sm uppercase tracking-wider font-semibold">Grid Count</p>
|
||||
<p class="text-dracula-darker/70 text-sm uppercase tracking-wider font-bold">Grid Count</p>
|
||||
<p class="text-4xl font-bold" id="result-grid-count">0 x 0</p>
|
||||
<p class="text-blue-100 text-sm mt-1" id="result-grid-fractional">0.00 x 0.00 grids</p>
|
||||
<p class="text-dracula-darker/70 text-sm mt-1 font-medium" id="result-grid-fractional">0.00 x 0.00 grids</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-blue-100 text-sm uppercase tracking-wider font-semibold">Max Bin Height</p>
|
||||
<p class="text-dracula-darker/70 text-sm uppercase tracking-wider font-bold">Max Bin Height</p>
|
||||
<p class="text-4xl font-bold" id="result-bin-height">0U</p>
|
||||
<p class="text-blue-100 text-sm mt-1">Vertical Units (7mm each)</p>
|
||||
<p class="text-dracula-darker/70 text-sm mt-1 font-medium">Vertical Units (7mm each)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-blue-700/50 p-4 rounded-lg space-y-3">
|
||||
<h3 class="font-semibold border-b border-blue-500/50 pb-2">Remaining Space</h3>
|
||||
<div class="grid grid-cols-2 gap-2 text-sm">
|
||||
<div class="bg-dracula-darker/10 p-4 rounded-lg space-y-3">
|
||||
<h3 class="font-bold border-b border-dracula-darker/20 pb-2 text-dracula-darker">Remaining Space</h3>
|
||||
<div class="grid grid-cols-2 gap-2 text-sm font-medium">
|
||||
<span>Width Gap:</span>
|
||||
<span id="gap-width" class="font-mono text-right">0.0 mm</span>
|
||||
<span>Length Gap:</span>
|
||||
@@ -79,32 +79,32 @@
|
||||
</section>
|
||||
|
||||
<!-- Spec Overrides -->
|
||||
<details class="bg-white border border-slate-200 rounded-xl overflow-hidden shadow-sm">
|
||||
<summary class="px-6 py-4 font-medium cursor-pointer hover:bg-slate-50 flex items-center justify-between">
|
||||
<details class="bg-dracula-dark border border-dracula-currentLine rounded-xl overflow-hidden shadow-sm">
|
||||
<summary class="px-6 py-4 font-medium cursor-pointer hover:bg-dracula-currentLine flex items-center justify-between">
|
||||
<span>Gridfinity Spec Overrides</span>
|
||||
<span class="text-slate-400 text-sm font-normal">Standard: 42x42x7mm</span>
|
||||
<span class="text-dracula-comment text-sm font-normal">Standard: 42x42x7mm</span>
|
||||
</summary>
|
||||
<div class="p-6 border-t border-slate-100 space-y-4 bg-slate-50/50">
|
||||
<div class="p-6 border-t border-dracula-currentLine space-y-4 bg-dracula-darker/30">
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div>
|
||||
<label class="block text-xs font-semibold text-slate-500 uppercase mb-1">Grid Size (mm)</label>
|
||||
<input type="number" id="spec-grid-size" value="42" class="w-full px-3 py-2 border border-slate-300 rounded-lg text-sm" />
|
||||
<label class="block text-xs font-semibold text-dracula-comment uppercase mb-1">Grid Size (mm)</label>
|
||||
<input type="number" id="spec-grid-size" value="42" class="w-full px-3 py-2 bg-dracula-darker border border-dracula-currentLine rounded-lg text-sm text-dracula-foreground" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-semibold text-slate-500 uppercase mb-1">Unit Height (mm)</label>
|
||||
<input type="number" id="spec-height-unit" value="7" class="w-full px-3 py-2 border border-slate-300 rounded-lg text-sm" />
|
||||
<label class="block text-xs font-semibold text-dracula-comment uppercase mb-1">Unit Height (mm)</label>
|
||||
<input type="number" id="spec-height-unit" value="7" class="w-full px-3 py-2 bg-dracula-darker border border-dracula-currentLine rounded-lg text-sm text-dracula-foreground" />
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-semibold text-slate-500 uppercase mb-1">Base Thickness (mm)</label>
|
||||
<input type="number" id="spec-base-thickness" value="4.8" class="w-full px-3 py-2 border border-slate-300 rounded-lg text-sm" />
|
||||
<label class="block text-xs font-semibold text-dracula-comment uppercase mb-1">Base Thickness (mm)</label>
|
||||
<input type="number" id="spec-base-thickness" value="4.8" class="w-full px-3 py-2 bg-dracula-darker border border-dracula-currentLine rounded-lg text-sm text-dracula-foreground" />
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-xs text-slate-400 italic">Adjust these to scale the system for an exact fit in your drawer.</p>
|
||||
<p class="text-xs text-dracula-comment italic">Adjust these to scale the system for an exact fit in your drawer.</p>
|
||||
</div>
|
||||
</details>
|
||||
</main>
|
||||
|
||||
<footer class="mt-12 text-center text-slate-400 text-sm">
|
||||
<footer class="mt-12 text-center text-dracula-comment text-sm">
|
||||
<p>Follows the Gridfinity spec by Zach Freedman</p>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user