Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
173 lines (162 loc) · 7.46 KB
/
Copy pathindex.html
File metadata and controls
173 lines (162 loc) · 7.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ButtonForge</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<div class="logo"><span class="logo-dot"></span>ButtonForge</div>
<div class="tagline">Generate button states from a single color</div>
</header>
<main>
<!-- INPUT -->
<section class="card input-section">
<div class="section-label">Base Color</div>
<div class="color-input-row">
<div class="swatch-wrap">
<input type="color" id="colorPicker" value="#3b6fe0" />
</div>
<input type="text" id="hexInput" class="hex-input" value="#3b6fe0" maxlength="7" spellcheck="false" />
<button class="paste-btn" id="pasteBtn">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="2" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
Paste
</button>
</div>
<div class="presets-row">
<span class="presets-label">Presets</span>
<button class="preset-chip active" data-preset="arcade">Arcade</button>
<button class="preset-chip" data-preset="soft">Soft UI</button>
<button class="preset-chip" data-preset="dark">Dark UI</button>
<button class="preset-chip" data-preset="mobile">Mobile UI</button>
</div>
</section>
<!-- PREVIEW -->
<section class="card preview-section">
<div class="section-label">Live Preview</div>
<div class="preview-grid">
<div class="preview-item">
<div class="state-label">Normal</div>
<button class="demo-btn" id="demoNormal" tabindex="-1">Button</button>
</div>
<div class="preview-item">
<div class="state-label">Hover</div>
<button class="demo-btn demo-hover" id="demoHover" tabindex="-1">Button</button>
</div>
<div class="preview-item">
<div class="state-label">Pressed</div>
<button class="demo-btn demo-pressed" id="demoPressed" tabindex="-1">Button</button>
</div>
<div class="preview-item">
<div class="state-label">Focus</div>
<button class="demo-btn demo-focus" id="demoFocus" tabindex="-1">Button</button>
</div>
<div class="preview-item" id="disabledPreviewItem">
<div class="state-label">Disabled</div>
<button class="demo-btn demo-disabled" id="demoDisabled" tabindex="-1" disabled>Button</button>
</div>
<div class="preview-item" id="selectedPreviewItem">
<div class="state-label">Selected</div>
<button class="demo-btn demo-selected" id="demoSelected" tabindex="-1">Button</button>
</div>
</div>
<div class="live-btn-wrap">
<div class="live-hint">Try hovering, clicking, and pressing Tab ↓</div>
<button class="demo-btn live-btn" id="liveBtn">Interact with me</button>
</div>
</section>
<!-- GENERATED COLORS -->
<section class="card colors-section">
<div class="section-label">Generated Colors</div>
<div class="color-rows" id="colorRows"></div>
<button class="copy-all-btn" id="copyAllBtn">
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="2" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>
Copy all
</button>
</section>
<!-- CUSTOMIZATION -->
<section class="card controls-section">
<div class="section-label">Customization</div>
<div class="sliders-grid">
<div class="slider-row">
<label>Hover brightness <span class="slider-val" id="hoverVal">+10%</span></label>
<input type="range" id="hoverSlider" min="0" max="40" value="10" class="slider" />
</div>
<div class="slider-row">
<label>Press darkness <span class="slider-val" id="pressVal">-20%</span></label>
<input type="range" id="pressSlider" min="0" max="50" value="20" class="slider" />
</div>
<div class="slider-row">
<label>Focus highlight <span class="slider-val" id="focusVal">+25%</span></label>
<input type="range" id="focusSlider" min="0" max="50" value="25" class="slider" />
</div>
</div>
<div class="toggles-row">
<label class="toggle-label">
<input type="checkbox" id="warmFocusToggle" class="toggle-cb" />
<span class="toggle-track"><span class="toggle-thumb"></span></span>
Warm focus color
</label>
<label class="toggle-label">
<input type="checkbox" id="sameHueToggle" class="toggle-cb" checked />
<span class="toggle-track"><span class="toggle-thumb"></span></span>
Keep same hue
</label>
<label class="toggle-label">
<input type="checkbox" id="showDisabledToggle" class="toggle-cb" checked />
<span class="toggle-track"><span class="toggle-thumb"></span></span>
Show disabled
</label>
<label class="toggle-label">
<input type="checkbox" id="showSelectedToggle" class="toggle-cb" checked />
<span class="toggle-track"><span class="toggle-thumb"></span></span>
Show selected
</label>
</div>
</section>
<!-- EXPORT -->
<section class="card export-section">
<div class="section-label">Export</div>
<div class="export-tabs">
<button class="tab-btn active" data-tab="css">CSS</button>
<button class="tab-btn" data-tab="json">JSON</button>
<button class="tab-btn" data-tab="godot">Godot</button>
<button class="tab-btn" data-tab="tailwind">Tailwind</button>
<button class="tab-btn" data-tab="scss">SCSS</button>
</div>
<div class="export-code-wrap">
<pre class="export-code" id="exportCode"></pre>
<button class="copy-export-btn" id="copyExportBtn">Copy</button>
</div>
</section>
<!-- SHARE -->
<section class="card share-section">
<div class="section-label">Save & Share</div>
<div class="share-row">
<button class="share-btn" id="shareBtn">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/></svg>
Share link
</button>
<button class="share-btn secondary" id="savePaletteBtn">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17,21 17,13 7,13 7,21"/><polyline points="7,3 7,8 15,8"/></svg>
Save palette
</button>
</div>
<div class="share-link-wrap" id="shareLinkWrap" style="display:none">
<input type="text" class="share-link-input" id="shareLinkInput" readonly />
<button class="copy-link-btn" id="copyLinkBtn">Copy</button>
</div>
<div class="saved-palettes" id="savedPalettes"></div>
</section>
</main>
<footer>
<span>ButtonForge</span>
<span>·</span>
<span>Button State Generator</span>
</footer>
<div class="toast" id="toast"></div>
<script src="script.js"></script>
</body>
</html>