Initial commit: design tokens and dense-tool UI sketches

This commit is contained in:
2026-09-08 15:53:44 -05:00
commit 3556cf45e0
5 changed files with 496 additions and 0 deletions
+191
View File
@@ -0,0 +1,191 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Palette — dense tool v2</title>
<link rel="stylesheet" href="../themes/tokens.css">
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: var(--font-body);
background: var(--bg);
color: var(--fg);
line-height: 1.45;
-webkit-font-smoothing: antialiased;
min-height: 100vh;
font-size: 14px;
}
.topbar {
display: flex; align-items: center; gap: 20px;
padding: 0 20px; height: 52px;
background: var(--surface); border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.logo em { font-style: normal; color: var(--muted-fg); font-weight: 400; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
color: var(--muted-fg); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-size: 13.5px;
}
.topbar nav a:hover { background: var(--surface-2); color: var(--fg); }
.topbar nav a.on { background: var(--accent); color: var(--bg); }
.topbar .spacer { flex: 1; }
.kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--border); border-radius: 5px; padding: 2px 6px; color: var(--muted-fg); }
/* floating layout: editor card + settings sidebar float over bg with gap */
.deck {
display: grid; grid-template-columns: 1fr 300px; gap: 16px;
padding: 16px 20px; height: calc(100vh - 52px);
}
.float {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 14px;
box-shadow: 0 2px 6px rgba(20,14,32,.25), 0 12px 32px rgba(20,14,32,.3);
overflow: hidden;
}
/* editor card */
.pane-l { display: flex; flex-direction: column; }
.editor-head {
display: flex; align-items: center; gap: 12px; padding: 10px 16px;
border-bottom: 1px solid var(--border);
}
.editor-head input {
border: none; outline: none; background: transparent; color: var(--fg); font: inherit; font-size: 13.5px; flex: 1;
}
.editor-head select, .editor-head button.plain {
border: 1px solid var(--border); background: var(--surface-2); color: var(--muted-fg);
border-radius: 7px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer;
}
.editor-wrap { flex: 1; display: flex; min-height: 0; }
.gutter {
padding: 14px 10px; text-align: right; color: var(--muted); font-family: var(--font-mono);
font-size: 12.5px; line-height: 1.7; user-select: none; border-right: 1px solid var(--border);
overflow: hidden;
}
.editor {
flex: 1; padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
white-space: pre; outline: none; overflow: auto;
}
.editor:empty::before { content: "stdin → paste"; color: var(--muted); }
.actionbar {
display: flex; align-items: center; gap: 14px; padding: 12px 16px;
border-top: 1px solid var(--border);
}
.btn {
background: var(--accent); color: var(--bg); border: none; cursor: pointer;
padding: 8px 18px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600;
}
.btn:hover { filter: brightness(1.08); }
.hint { font-size: 12px; color: var(--muted-fg); }
.hint b { color: var(--fg); font-weight: 550; }
/* settings sidebar: stacked floating cards */
.pane-r { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding-bottom: 4px; }
.side-section { padding: 14px 16px; flex-shrink: 0; }
.side-section h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-fg); margin-bottom: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 0; }
.row select, .row input[type="text"] {
border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px; background: var(--bg);
color: var(--fg); font: inherit; font-size: 12.5px; width: 130px;
}
.seg { display: flex; flex-direction: column; gap: 2px; }
.seg label { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 7px; cursor: pointer; font-size: 13px; }
.seg label:hover { background: var(--surface-2); }
.seg input { accent-color: var(--accent); }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 5px 8px; border-radius: 7px; }
.toggle:hover { background: var(--surface-2); }
.toggle input { accent-color: var(--accent); }
.presets { display: flex; gap: 6px; }
.presets button { width: 24px; height: 24px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; }
.presets button.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.recent { list-style: none; }
.recent li {
display: flex; justify-content: space-between; gap: 10px; padding: 6px 0;
border-bottom: 1px dashed var(--border); font-size: 12.5px;
}
.recent li:last-child { border-bottom: none; }
.recent a { color: var(--fg); text-decoration: none; font-family: var(--font-mono); font-size: 12px; }
.recent a:hover { color: var(--accent); }
.recent .meta { color: var(--muted-fg); white-space: nowrap; }
.canzone {
margin-top: 10px; border: 1.5px dashed var(--border); border-radius: 10px;
padding: 14px; text-align: center; font-size: 12px; color: var(--muted-fg);
transition: border-color .15s ease, background .15s ease;
}
.canzone:hover { border-color: var(--accent); background: var(--surface-2); }
</style>
</head>
<body data-preset="midnight">
<div class="topbar">
<div class="logo">Palette <em>/ v0</em></div>
<nav><a class="on" href="#">new</a><a href="#">history</a><a href="#">cans</a><a href="#">api</a></nav>
<div class="spacer"></div>
<span class="kbd">Ctrl+Enter</span>
</div>
<div class="deck">
<div class="float pane-l">
<div class="editor-head">
<input placeholder="title (optional)">
<select><option>auto</option><option>go</option><option>py</option><option>txt</option></select>
</div>
<div class="editor-wrap">
<div class="gutter">1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10<br>11<br>12<br>13<br>14<br>15<br>16<br>17<br>18<br>19<br>20</div>
<div class="editor" contenteditable="true"></div>
</div>
<div class="actionbar">
<span class="hint">Editing as <b>text paste</b>. Drag files onto the box to start a can.</span>
<div class="spacer" style="flex:1"></div>
<button class="btn">Create ⇧</button>
</div>
</div>
<div class="pane-r">
<div class="float side-section">
<h3>Expiry</h3>
<div class="seg">
<label><input type="radio" name="exp"> Never</label>
<label><input type="radio" name="exp"> 1 hour</label>
<label><input type="radio" name="exp"> 1 day</label>
<label><input type="radio" name="exp" checked> 1 week</label>
<label><input type="radio" name="exp"> 30 days</label>
</div>
</div>
<div class="float side-section">
<h3>Protection</h3>
<label class="toggle"><input type="checkbox"> Password lock</label>
<label class="toggle"><input type="checkbox"> Burn after read</label>
<label class="toggle"><input type="checkbox" checked> Listed publicly</label>
</div>
<div class="float side-section">
<h3>Custom URL</h3>
<div class="row"><span>palette/</span><input type="text" placeholder="my-snippet"></div>
</div>
<div class="float side-section">
<h3>Theme</h3>
<div class="presets">
<button style="background:#F2EDF8" onclick="setPreset('smooth', this)" title="smooth"></button>
<button class="on" style="background:#C4A8F0" onclick="setPreset('midnight', this)" title="midnight"></button>
<button style="background:#D6E0D6" onclick="setPreset('sage', this)" title="sage"></button>
</div>
</div>
<div class="float side-section">
<h3>Recent</h3>
<ul class="recent">
<li><a href="#">k3sYt2</a><span class="meta">2m · go</span></li>
<li><a href="#">b7QwRn</a><span class="meta">14m · txt</span></li>
<li><a href="#">can/9fL2m</a><span class="meta">1h · 4 items</span></li>
<li><a href="#">xT8vZc</a><span class="meta">3h · py</span></li>
</ul>
</div>
</div>
</div>
<script>
function setPreset(p, btn) {
document.body.dataset.preset = p;
document.querySelectorAll('.presets button').forEach(b => b.classList.remove('on'));
btn.classList.add('on');
}
</script>
</body>
</html>