htmlboard 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,39 +6,20 @@
6
6
  <title>Mobile Feed Screen</title>
7
7
  <meta name="description" content="Smartphone screen with balance card, quick actions, and transaction feed">
8
8
  <meta name="htmlboard" content="width=390, height=844">
9
+ <link rel="stylesheet" href="../styles.css">
10
+ <script type="module" src="../components.js"></script>
9
11
  <style>
10
- * {
11
- box-sizing: border-box;
12
- margin: 0;
13
- padding: 0;
14
- -webkit-font-smoothing: antialiased;
15
- }
16
- :root {
17
- --bg: #090a0f;
18
- --card-bg: #13151f;
19
- --card-border: #232738;
20
- --accent: #6366f1;
21
- --accent-glow: rgba(99, 102, 241, 0.35);
22
- --emerald: #10b981;
23
- --rose: #f43f5e;
24
- --text-main: #f8fafc;
25
- --text-muted: #94a3b8;
26
- }
27
12
  body {
28
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
29
- background: var(--bg);
30
- color: var(--text-main);
31
13
  min-height: 100vh;
32
14
  display: flex;
33
15
  flex-direction: column;
34
16
  overflow-x: hidden;
35
17
  padding-bottom: 80px;
18
+ background: #090a0f;
36
19
  }
37
- /* Status bar simulated */
38
20
  .status-bar {
39
21
  display: flex;
40
22
  justify-content: space-between;
41
- align-items: center;
42
23
  padding: 14px 24px 8px;
43
24
  font-size: 13px;
44
25
  font-weight: 600;
@@ -51,49 +32,29 @@
51
32
  align-items: center;
52
33
  padding: 16px 20px;
53
34
  }
54
- .user-info {
55
- display: flex;
56
- align-items: center;
57
- gap: 12px;
58
- }
59
- .avatar {
35
+ .header .avatar {
60
36
  width: 44px;
61
37
  height: 44px;
62
- border-radius: 50%;
63
- background: linear-gradient(135deg, #6366f1, #a855f7);
64
- display: flex;
65
- align-items: center;
66
- justify-content: center;
67
- font-weight: 700;
68
38
  font-size: 16px;
69
39
  box-shadow: 0 0 16px var(--accent-glow);
70
40
  }
71
- .greeting {
72
- font-size: 13px;
73
- color: var(--text-muted);
74
- }
75
- .username {
76
- font-size: 17px;
77
- font-weight: 700;
78
- }
41
+ .greeting { font-size: 13px; }
42
+ .username { font-size: 17px; font-weight: 700; }
79
43
  .icon-btn {
80
44
  width: 40px;
81
45
  height: 40px;
82
46
  border-radius: 12px;
83
- background: var(--card-bg);
84
- border: 1px solid var(--card-border);
85
- color: var(--text-main);
47
+ background: var(--surface);
48
+ border: 1px solid var(--border);
86
49
  display: flex;
87
50
  align-items: center;
88
51
  justify-content: center;
89
- cursor: pointer;
90
52
  position: relative;
91
53
  }
92
- .badge-dot {
54
+ .icon-btn .badge-dot {
93
55
  width: 8px;
94
56
  height: 8px;
95
57
  background: var(--rose);
96
- border-radius: 50%;
97
58
  position: absolute;
98
59
  top: 10px;
99
60
  right: 10px;
@@ -105,7 +66,7 @@
105
66
  background: linear-gradient(135deg, #1e1b4b 0%, #1e293b 100%);
106
67
  border: 1px solid rgba(99, 102, 241, 0.3);
107
68
  border-radius: 24px;
108
- box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.35);
69
+ box-shadow: 0 12px 30px -10px var(--accent-glow);
109
70
  position: relative;
110
71
  overflow: hidden;
111
72
  }
@@ -119,30 +80,13 @@
119
80
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
120
81
  pointer-events: none;
121
82
  }
122
- .balance-label {
123
- font-size: 13px;
124
- color: #cbd5e1;
125
- text-transform: uppercase;
126
- letter-spacing: 0.05em;
127
- margin-bottom: 6px;
128
- }
83
+ .hero-card .label { color: #cbd5e1; font-size: 13px; margin-bottom: 6px; }
129
84
  .balance-value {
130
85
  font-size: 34px;
131
86
  font-weight: 800;
132
87
  letter-spacing: -0.02em;
133
88
  margin-bottom: 12px;
134
89
  }
135
- .balance-trend {
136
- display: inline-flex;
137
- align-items: center;
138
- gap: 6px;
139
- background: rgba(16, 185, 129, 0.15);
140
- color: var(--emerald);
141
- padding: 4px 10px;
142
- border-radius: 20px;
143
- font-size: 12px;
144
- font-weight: 600;
145
- }
146
90
  /* Quick Actions */
147
91
  .actions-grid {
148
92
  display: grid;
@@ -155,14 +99,14 @@
155
99
  flex-direction: column;
156
100
  align-items: center;
157
101
  gap: 8px;
158
- cursor: pointer;
102
+ font-size: 12px;
103
+ font-weight: 500;
159
104
  }
160
105
  .action-circle {
161
106
  width: 52px;
162
107
  height: 52px;
108
+ padding: 0;
163
109
  border-radius: 18px;
164
- background: var(--card-bg);
165
- border: 1px solid var(--card-border);
166
110
  display: flex;
167
111
  align-items: center;
168
112
  justify-content: center;
@@ -174,75 +118,21 @@
174
118
  border-color: var(--accent);
175
119
  transform: translateY(-2px);
176
120
  }
177
- .action-label {
178
- font-size: 12px;
179
- font-weight: 500;
180
- color: var(--text-muted);
181
- }
182
- /* Section Title */
121
+ /* Transactions */
183
122
  .section-header {
184
123
  display: flex;
185
124
  justify-content: space-between;
186
125
  align-items: center;
187
126
  padding: 16px 20px 8px;
188
127
  }
189
- .section-title {
190
- font-size: 17px;
191
- font-weight: 700;
192
- }
193
- .see-all {
194
- font-size: 13px;
195
- color: var(--accent);
196
- text-decoration: none;
197
- font-weight: 600;
198
- }
199
- /* Transactions */
128
+ .section-title { font-size: 17px; font-weight: 700; }
129
+ .see-all { font-size: 13px; color: var(--accent); font-weight: 600; }
200
130
  .tx-list {
201
131
  display: flex;
202
132
  flex-direction: column;
203
133
  gap: 10px;
204
134
  padding: 8px 20px;
205
135
  }
206
- .tx-item {
207
- display: flex;
208
- align-items: center;
209
- justify-content: space-between;
210
- padding: 14px 16px;
211
- background: var(--card-bg);
212
- border: 1px solid var(--card-border);
213
- border-radius: 16px;
214
- }
215
- .tx-left {
216
- display: flex;
217
- align-items: center;
218
- gap: 14px;
219
- }
220
- .tx-icon {
221
- width: 40px;
222
- height: 40px;
223
- border-radius: 12px;
224
- background: #1c2030;
225
- display: flex;
226
- align-items: center;
227
- justify-content: center;
228
- font-size: 18px;
229
- }
230
- .tx-name {
231
- font-size: 14px;
232
- font-weight: 600;
233
- }
234
- .tx-date {
235
- font-size: 12px;
236
- color: var(--text-muted);
237
- margin-top: 2px;
238
- }
239
- .tx-amount {
240
- font-size: 14px;
241
- font-weight: 700;
242
- }
243
- .tx-amount.positive {
244
- color: var(--emerald);
245
- }
246
136
  /* Bottom Navigation */
247
137
  .bottom-nav {
248
138
  position: fixed;
@@ -252,7 +142,7 @@
252
142
  height: 72px;
253
143
  background: rgba(9, 10, 15, 0.85);
254
144
  backdrop-filter: blur(16px);
255
- border-top: 1px solid var(--card-border);
145
+ border-top: 1px solid var(--border);
256
146
  display: flex;
257
147
  justify-content: space-around;
258
148
  align-items: center;
@@ -265,15 +155,9 @@
265
155
  gap: 4px;
266
156
  color: var(--text-muted);
267
157
  font-size: 11px;
268
- text-decoration: none;
269
- cursor: pointer;
270
- }
271
- .nav-btn.active {
272
- color: var(--accent);
273
- }
274
- .nav-icon {
275
- font-size: 20px;
276
158
  }
159
+ .nav-btn.active { color: var(--accent); }
160
+ .nav-icon { font-size: 20px; }
277
161
  </style>
278
162
  </head>
279
163
  <body>
@@ -283,10 +167,10 @@
283
167
  </div>
284
168
 
285
169
  <header class="header">
286
- <div class="user-info">
170
+ <div class="row">
287
171
  <div class="avatar">LC</div>
288
172
  <div>
289
- <div class="greeting">Welcome back,</div>
173
+ <div class="greeting muted">Welcome back,</div>
290
174
  <div class="username">Luiz Carlos</div>
291
175
  </div>
292
176
  </div>
@@ -297,29 +181,27 @@
297
181
  </header>
298
182
 
299
183
  <section class="hero-card">
300
- <div class="balance-label">Total Portfolio Value</div>
184
+ <div class="label">Total Portfolio Value</div>
301
185
  <div class="balance-value">$42,850.75</div>
302
- <div class="balance-trend">
303
- ▲ +14.2% this month
304
- </div>
186
+ <div class="badge badge-emerald">▲ +14.2% this month</div>
305
187
  </section>
306
188
 
307
189
  <nav class="actions-grid">
308
190
  <div class="action-item">
309
- <div class="action-circle">↗</div>
310
- <div class="action-label">Send</div>
191
+ <div class="action-circle card">↗</div>
192
+ <div class="muted">Send</div>
311
193
  </div>
312
194
  <div class="action-item">
313
- <div class="action-circle">↙</div>
314
- <div class="action-label">Receive</div>
195
+ <div class="action-circle card">↙</div>
196
+ <div class="muted">Receive</div>
315
197
  </div>
316
198
  <div class="action-item">
317
- <div class="action-circle">⚡</div>
318
- <div class="action-label">Swap</div>
199
+ <div class="action-circle card">⚡</div>
200
+ <div class="muted">Swap</div>
319
201
  </div>
320
202
  <div class="action-item">
321
- <div class="action-circle">⋯</div>
322
- <div class="action-label">More</div>
203
+ <div class="action-circle card">⋯</div>
204
+ <div class="muted">More</div>
323
205
  </div>
324
206
  </nav>
325
207
 
@@ -329,38 +211,9 @@
329
211
  </div>
330
212
 
331
213
  <div class="tx-list">
332
- <div class="tx-item">
333
- <div class="tx-left">
334
- <div class="tx-icon">🛍️</div>
335
- <div>
336
- <div class="tx-name">Apple Store</div>
337
- <div class="tx-date">Today, 2:15 PM • Electronics</div>
338
- </div>
339
- </div>
340
- <div class="tx-amount">-$199.00</div>
341
- </div>
342
-
343
- <div class="tx-item">
344
- <div class="tx-left">
345
- <div class="tx-icon">💼</div>
346
- <div>
347
- <div class="tx-name">Client Invoice #1042</div>
348
- <div class="tx-date">Yesterday • Wire Transfer</div>
349
- </div>
350
- </div>
351
- <div class="tx-amount positive">+$3,450.00</div>
352
- </div>
353
-
354
- <div class="tx-item">
355
- <div class="tx-left">
356
- <div class="tx-icon">☕</div>
357
- <div>
358
- <div class="tx-name">Blue Bottle Coffee</div>
359
- <div class="tx-date">Oct 26 • Food & Beverage</div>
360
- </div>
361
- </div>
362
- <div class="tx-amount">-$6.75</div>
363
- </div>
214
+ <tx-item icon="🛍️" name="Apple Store" meta="Today, 2:15 PM • Electronics" amount="-$199.00"></tx-item>
215
+ <tx-item icon="💼" name="Client Invoice #1042" meta="Yesterday • Wire Transfer" amount="+$3,450.00" positive></tx-item>
216
+ <tx-item icon="☕" name="Blue Bottle Coffee" meta="Oct 26 • Food & Beverage" amount="-$6.75"></tx-item>
364
217
  </div>
365
218
 
366
219
  <div class="bottom-nav">
@@ -0,0 +1,89 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Component Library Preview</title>
7
+ <meta name="description" content="Buttons, inputs, badges and avatars from styles.css, and the components built with them">
8
+ <meta name="htmlboard" content="width=780, category=components">
9
+ <link rel="stylesheet" href="../styles.css">
10
+ <script type="module" src="../components.js"></script>
11
+ <style>
12
+ body {
13
+ padding: 24px;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 24px;
17
+ }
18
+ .header {
19
+ border-bottom: 1px solid var(--border);
20
+ padding-bottom: 16px;
21
+ }
22
+ .title { font-size: 20px; font-weight: 700; }
23
+ .subtitle { font-size: 13px; margin-top: 4px; }
24
+ body > .card { display: flex; flex-direction: column; gap: 16px; }
25
+ .row { flex-wrap: wrap; }
26
+ .field { flex: 1; min-width: 200px; }
27
+ .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
28
+ </style>
29
+ </head>
30
+ <body>
31
+ <div class="header">
32
+ <h1 class="title">Design System Components</h1>
33
+ <p class="subtitle muted">The classes in styles.css and the components in components/, shared by all the designs</p>
34
+ </div>
35
+
36
+ <div class="card">
37
+ <div class="label">Buttons & Interactive Triggers</div>
38
+ <div class="row">
39
+ <button class="btn btn-primary"><span>✨</span> Primary Action</button>
40
+ <button class="btn btn-secondary">Secondary Action</button>
41
+ <button class="btn btn-outline">Outline Button</button>
42
+ <button class="btn btn-danger"><span>🗑️</span> Danger Action</button>
43
+ </div>
44
+ </div>
45
+
46
+ <div class="card">
47
+ <div class="label">Status Pills & Badges</div>
48
+ <div class="row">
49
+ <div class="badge"><span class="badge-dot"></span> In Progress</div>
50
+ <div class="badge badge-emerald"><span class="badge-dot"></span> Active / Healthy</div>
51
+ <div class="badge badge-amber"><span class="badge-dot"></span> Review Required</div>
52
+ <div class="badge badge-rose"><span class="badge-dot"></span> Error / Offline</div>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="card">
57
+ <div class="label">Form Controls</div>
58
+ <div class="row">
59
+ <label class="field">
60
+ <span>Project Name</span>
61
+ <input type="text" class="input" value="HtmlBoard Studio">
62
+ </label>
63
+ <label class="field">
64
+ <span>Environment Target</span>
65
+ <input type="text" class="input" value="production-edge-01">
66
+ </label>
67
+ </div>
68
+ </div>
69
+
70
+ <div class="card">
71
+ <div class="label">Avatars</div>
72
+ <div class="row">
73
+ <div class="avatar">LC</div>
74
+ <div class="avatar" style="background: linear-gradient(135deg, #ec4899, #8b5cf6)">AM</div>
75
+ <div class="avatar" style="width: 44px; height: 44px; font-size: 16px">JS</div>
76
+ </div>
77
+ </div>
78
+
79
+ <div class="card">
80
+ <div class="label">Components: &lt;stat-card&gt; and &lt;tx-item&gt;</div>
81
+ <div class="pair">
82
+ <stat-card label="Monthly Recurring Revenue" value="$184,290" trend="▲ +12.4% vs last mo"></stat-card>
83
+ <stat-card label="Average Latency" value="34ms" trend="▼ -2ms target" warn></stat-card>
84
+ <tx-item icon="💼" name="Client Invoice #1042" meta="Yesterday • Wire Transfer" amount="+$3,450.00" positive></tx-item>
85
+ <tx-item icon="☕" name="Blue Bottle Coffee" meta="Oct 26 • Food & Beverage" amount="-$6.75"></tx-item>
86
+ </div>
87
+ </div>
88
+ </body>
89
+ </html>
@@ -0,0 +1,67 @@
1
+ <!-- <app-sidebar active="Dashboard"></app-sidebar> -->
2
+ <div class="brand row"><span class="logo">⚡</span> Nexus Platform</div>
3
+
4
+ <nav>
5
+ <div class="label">Core</div>
6
+ <a href="../01-screens/01-dashboard.html">📊 Dashboard</a>
7
+ <a href="../01-screens/02-customers.html">👥 Customers</a>
8
+ <a href="#">💳 Invoices</a>
9
+ <a href="#">📈 Analytics</a>
10
+ <div class="label">System</div>
11
+ <a href="#">⚙️ Settings</a>
12
+ <a href="#">🛡️ Security</a>
13
+ </nav>
14
+
15
+ <div class="user row">
16
+ <div class="avatar">AM</div>
17
+ <div>
18
+ <div class="name">Alex Morgan</div>
19
+ <div class="email muted">alex@nexus.io</div>
20
+ </div>
21
+ </div>
22
+
23
+ <style>
24
+ & {
25
+ display: flex;
26
+ flex-direction: column;
27
+ flex-shrink: 0;
28
+ width: 240px;
29
+ padding: 20px 16px;
30
+ background: #10131d;
31
+ border-right: 1px solid var(--border);
32
+ }
33
+ .brand { gap: 10px; padding: 4px 8px 24px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
34
+ .logo {
35
+ display: grid;
36
+ place-items: center;
37
+ width: 32px;
38
+ height: 32px;
39
+ border-radius: var(--radius);
40
+ background: linear-gradient(135deg, var(--accent), #3b82f6);
41
+ box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
42
+ font-size: 16px;
43
+ }
44
+ nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
45
+ nav .label { padding: 8px 12px 4px; font-size: 11px; }
46
+ nav .label ~ .label { margin-top: 16px; }
47
+ nav a {
48
+ padding: 10px 12px;
49
+ border-radius: var(--radius);
50
+ color: var(--text-muted);
51
+ font-size: 14px;
52
+ font-weight: 500;
53
+ transition: all 0.15s ease;
54
+ }
55
+ nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
56
+ nav a.active { background: rgba(99, 102, 241, 0.12); color: var(--accent-light); font-weight: 600; }
57
+ .user { padding: 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); }
58
+ .user .avatar { background: linear-gradient(135deg, #ec4899, #8b5cf6); font-weight: 600; }
59
+ .name { font-size: 13px; font-weight: 600; }
60
+ .email { font-size: 11px; }
61
+ </style>
62
+
63
+ <script>
64
+ // The link named by active="…" is the current page
65
+ const active = this.getAttribute('active');
66
+ for (const link of this.querySelectorAll('nav a')) link.classList.toggle('active', link.textContent.includes(active));
67
+ </script>
@@ -0,0 +1,19 @@
1
+ <!-- <app-topbar search="Search customers..."><button class="btn btn-primary">+ Add Customer</button></app-topbar> -->
2
+ <input class="input" type="text" placeholder="{{search}}">
3
+ <div class="row"><slot></slot></div>
4
+
5
+ <style>
6
+ & {
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: space-between;
10
+ flex-shrink: 0;
11
+ height: 64px;
12
+ padding: 0 32px;
13
+ border-bottom: 1px solid var(--border);
14
+ background: rgba(11, 13, 19, 0.8);
15
+ backdrop-filter: blur(12px);
16
+ }
17
+ .input { width: 280px; padding: 8px 16px; }
18
+ .row { gap: 16px; font-size: 13px; }
19
+ </style>
@@ -0,0 +1,14 @@
1
+ <!-- <stat-card label="Monthly Recurring Revenue" value="$184,290" trend="▲ +12.4% vs last mo"></stat-card> <stat-card label="Average Latency" value="34ms" trend="▼ -2ms target" warn></stat-card> -->
2
+ <div class="card">
3
+ <div class="name muted">{{label}}</div>
4
+ <div class="value">{{value}}</div>
5
+ <div class="trend">{{trend}}</div>
6
+ </div>
7
+
8
+ <style>
9
+ .card { height: 100%; }
10
+ .name { font-size: 13px; margin-bottom: 8px; }
11
+ .value { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
12
+ .trend { font-size: 12px; font-weight: 600; color: var(--emerald); }
13
+ &[warn] .trend { color: var(--amber); }
14
+ </style>
@@ -0,0 +1,33 @@
1
+ <!-- <tx-item icon="💼" name="Client Invoice #1042" meta="Yesterday • Wire Transfer" amount="+$3,450.00" positive></tx-item> <tx-item icon="☕" name="Blue Bottle Coffee" meta="Oct 26 • Food & Beverage" amount="-$6.75"></tx-item> -->
2
+ <div class="icon">{{icon}}</div>
3
+ <div class="what">
4
+ <div class="name">{{name}}</div>
5
+ <div class="meta muted">{{meta}}</div>
6
+ </div>
7
+ <div class="amount">{{amount}}</div>
8
+
9
+ <style>
10
+ & {
11
+ display: flex;
12
+ align-items: center;
13
+ gap: 14px;
14
+ padding: 14px 16px;
15
+ background: var(--surface);
16
+ border: 1px solid var(--border);
17
+ border-radius: 16px;
18
+ }
19
+ .icon {
20
+ display: grid;
21
+ place-items: center;
22
+ width: 40px;
23
+ height: 40px;
24
+ border-radius: 12px;
25
+ background: var(--surface-2);
26
+ font-size: 18px;
27
+ }
28
+ .what { flex: 1; }
29
+ .name { font-size: 14px; font-weight: 600; }
30
+ .meta { font-size: 12px; margin-top: 2px; }
31
+ .amount { font-size: 14px; font-weight: 700; }
32
+ &[positive] .amount { color: var(--emerald); }
33
+ </style>