cg / hackerproducts

60 files · 5,551 lines · 153.3 KB — Next.js 15, React 19, TypeScript, PostgreSQL, Object Storage, plain CSS.

Quick jump: page.tsx / page.tsx / globals.css / schema.sql / package.json

root / src / app / globals.css

src/app/globals.css · 615 lines · 8.9 KB← back to folder
1*,
2*::before,
3*::after {
4 box-sizing: border-box;
5}
6
7html {
8 background: #ffffff;
9 color: #111111;
10 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
11 font-size: 16px;
12 line-height: 1.6;
13 -webkit-font-smoothing: antialiased;
14}
15
16body {
17 margin: 0;
18 padding: 0;
19 background: #ffffff;
20 color: #111111;
21}
22
23a {
24 color: #0000ee;
25 text-decoration: underline;
26 text-underline-offset: 2px;
27}
28
29a:hover {
30 color: #0000aa;
31}
32
33.container {
34 max-width: 850px;
35 margin: 0 auto;
36 padding: 28px 20px 64px;
37}
38
39/* Header */
40.site-header {
41 display: flex;
42 align-items: baseline;
43 justify-content: space-between;
44 gap: 16px;
45 flex-wrap: wrap;
46 margin-bottom: 44px;
47}
48
49.site-brand {
50 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
51 font-size: 18px;
52 font-weight: 700;
53 color: #111111;
54 text-decoration: none;
55 letter-spacing: -0.02em;
56}
57
58.site-brand:hover {
59 color: #111111;
60 text-decoration: underline;
61}
62
63.site-nav {
64 display: flex;
65 align-items: baseline;
66 gap: 8px;
67 font-size: 15px;
68}
69
70.nav-sep {
71 color: #666666;
72 user-select: none;
73}
74
75/* Footer */
76.site-footer {
77 margin-top: 64px;
78 padding-top: 20px;
79 border-top: 1px solid #e5e5e5;
80 display: flex;
81 align-items: baseline;
82 justify-content: space-between;
83 flex-wrap: wrap;
84 gap: 12px;
85 font-size: 14px;
86 color: #555555;
87}
88
89.footer-links {
90 display: flex;
91 align-items: baseline;
92 gap: 8px;
93 flex-wrap: wrap;
94}
95
96.link-button {
97 background: none;
98 border: none;
99 padding: 0;
100 margin: 0;
101 font: inherit;
102 color: #0000ee;
103 text-decoration: underline;
104 text-underline-offset: 2px;
105 cursor: pointer;
106}
107
108.link-button:hover {
109 color: #0000aa;
110}
111
112/* Typography */
113h1 {
114 font-size: 32px;
115 line-height: 1.2;
116 font-weight: 700;
117 margin: 0 0 8px;
118 letter-spacing: -0.02em;
119 color: #000000;
120}
121
122h2 {
123 font-size: 20px;
124 line-height: 1.3;
125 font-weight: 700;
126 margin: 28px 0 10px;
127 color: #000000;
128}
129
130h3 {
131 font-size: 16px;
132 line-height: 1.4;
133 font-weight: 700;
134 margin: 24px 0 8px;
135 color: #000000;
136}
137
138.subtitle {
139 margin: 0 0 28px;
140 color: #333333;
141 font-size: 16px;
142}
143
144.muted {
145 color: #555555;
146}
147
148/* Homepage Product List */
149.date-group {
150 margin-top: 28px;
151}
152
153.date-heading {
154 font-size: 15px;
155 font-weight: 700;
156 margin: 0 0 12px;
157 color: #111111;
158}
159
160.product-list {
161 list-style: none;
162 margin: 0;
163 padding: 0;
164}
165
166.product-row {
167 display: flex;
168 align-items: flex-start;
169 gap: 10px;
170 margin-bottom: 10px;
171 font-size: 15px;
172 line-height: 1.5;
173}
174
175.product-index {
176 min-width: 24px;
177 text-align: right;
178 color: #444444;
179 font-variant-numeric: tabular-nums;
180 flex-shrink: 0;
181}
182
183.product-icon {
184 width: 24px;
185 height: 24px;
186 border-radius: 5px;
187 object-fit: cover;
188 flex-shrink: 0;
189 display: inline-flex;
190 align-items: center;
191 justify-content: center;
192 font-size: 13px;
193 font-weight: 700;
194 color: #ffffff;
195 user-select: none;
196}
197
198.product-row-body {
199 min-width: 0;
200 flex: 1;
201}
202
203.product-name-link {
204 font-weight: 500;
205}
206
207.product-sep {
208 color: #555555;
209}
210
211.product-desc {
212 color: #222222;
213}
214
215.star-inline {
216 margin-left: 8px;
217 color: #444444;
218 font-size: 14px;
219 white-space: nowrap;
220 font-variant-numeric: tabular-nums;
221}
222
223.upvote-inline {
224 margin-left: 8px;
225 padding: 0;
226 border: none;
227 background: none;
228 color: #444444;
229 font: inherit;
230 font-size: 14px;
231 white-space: nowrap;
232 font-variant-numeric: tabular-nums;
233 cursor: pointer;
234}
235
236.upvote-inline:hover {
237 color: #000000;
238}
239
240.upvote-inline[aria-pressed="true"] {
241 color: #000000;
242 font-weight: 600;
243}
244
245.pagination {
246 margin-top: 32px;
247 display: flex;
248 gap: 20px;
249 font-size: 15px;
250}
251
252/* Product Detail Page */
253.product-meta {
254 margin: 0 0 12px;
255 font-size: 15px;
256 color: #444444;
257}
258
259.product-website {
260 margin: 0 0 14px;
261 font-size: 15px;
262 word-break: break-all;
263}
264
265.product-summary {
266 margin: 0 0 16px;
267 font-size: 16px;
268 color: #111111;
269}
270
271.product-actions {
272 display: flex;
273 align-items: center;
274 gap: 16px;
275 margin: 0 0 24px;
276 font-size: 15px;
277}
278
279.star-btn {
280 background: #ffffff;
281 color: #111111;
282 border: 1px solid #cccccc;
283 padding: 3px 10px;
284 font: inherit;
285 font-size: 14px;
286 cursor: pointer;
287 font-variant-numeric: tabular-nums;
288}
289
290.star-btn:hover {
291 border-color: #111111;
292}
293
294.star-btn[aria-pressed="true"] {
295 border-color: #111111;
296 font-weight: 600;
297}
298
299.product-screenshot {
300 display: block;
301 width: 100%;
302 max-width: 100%;
303 height: auto;
304 margin: 20px 0 28px;
305 border: 1px solid #e5e5e5;
306}
307
308/* Markdown README Content */
309.readme {
310 font-size: 16px;
311 line-height: 1.65;
312 color: #111111;
313 word-wrap: break-word;
314}
315
316.readme > :first-child {
317 margin-top: 0;
318}
319
320.readme p {
321 margin: 0 0 16px;
322}
323
324.readme ul,
325.readme ol {
326 margin: 0 0 16px;
327 padding-left: 24px;
328}
329
330.readme li {
331 margin-bottom: 4px;
332}
333
334.readme img {
335 max-width: 100%;
336 height: auto;
337 display: block;
338 margin: 16px 0;
339}
340
341.readme pre {
342 background: #f6f6f6;
343 border: 1px solid #e5e5e5;
344 padding: 12px 14px;
345 overflow-x: auto;
346 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
347 font-size: 14px;
348 line-height: 1.5;
349 margin: 0 0 16px;
350}
351
352.readme code {
353 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
354 font-size: 0.9em;
355 background: #f4f4f4;
356 padding: 1px 4px;
357}
358
359.readme pre code {
360 background: transparent;
361 padding: 0;
362}
363
364.readme blockquote {
365 margin: 0 0 16px;
366 padding-left: 14px;
367 border-left: 3px solid #cccccc;
368 color: #444444;
369}
370
371.readme table {
372 width: 100%;
373 border-collapse: collapse;
374 margin: 0 0 16px;
375 font-size: 15px;
376}
377
378.readme th,
379.readme td {
380 border: 1px solid #dddddd;
381 padding: 6px 10px;
382 text-align: left;
383}
384
385.readme th {
386 background: #f6f6f6;
387 font-weight: 600;
388}
389
390.readme hr {
391 border: none;
392 border-top: 1px solid #e5e5e5;
393 margin: 24px 0;
394}
395
396/* Comments */
397.comments-section {
398 margin-top: 44px;
399 padding-top: 20px;
400 border-top: 1px solid #e5e5e5;
401}
402
403.comments-section h2 {
404 margin-top: 0;
405}
406
407.comment-list {
408 list-style: none;
409 margin: 0;
410 padding: 0;
411}
412
413.comment-item {
414 margin-bottom: 18px;
415}
416
417.comment-meta {
418 margin: 0 0 4px;
419 font-size: 14px;
420}
421
422.comment-body {
423 margin: 0;
424 font-size: 15px;
425 line-height: 1.55;
426 white-space: pre-wrap;
427 word-wrap: break-word;
428}
429
430/* Forms */
431.plain-form {
432 max-width: 680px;
433}
434
435.form-field {
436 margin-bottom: 18px;
437}
438
439.form-field label {
440 display: block;
441 font-weight: 600;
442 font-size: 14px;
443 margin-bottom: 5px;
444}
445
446.form-field input[type="text"],
447.form-field input[type="url"],
448.form-field input[type="email"],
449.form-field input[type="password"],
450.form-field textarea {
451 width: 100%;
452 padding: 8px 10px;
453 font: inherit;
454 font-size: 15px;
455 color: #111111;
456 background: #ffffff;
457 border: 1px solid #999999;
458}
459
460.form-field textarea {
461 font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
462 font-size: 14px;
463 line-height: 1.5;
464 resize: vertical;
465}
466
467.form-hint {
468 margin: 4px 0 0;
469 font-size: 13px;
470 color: #555555;
471}
472
473.form-error {
474 margin: 0 0 16px;
475 padding: 8px 12px;
476 border: 1px solid #cc0000;
477 color: #aa0000;
478 font-size: 14px;
479}
480
481.form-status {
482 margin: 0 0 16px;
483 font-size: 14px;
484 color: #222222;
485}
486
487.btn {
488 background: #111111;
489 color: #ffffff;
490 border: 1px solid #111111;
491 padding: 7px 16px;
492 font: inherit;
493 font-size: 15px;
494 cursor: pointer;
495}
496
497.btn:disabled {
498 opacity: 0.6;
499 cursor: default;
500}
501
502.btn-secondary {
503 background: #ffffff;
504 color: #111111;
505 border: 1px solid #999999;
506 padding: 6px 14px;
507 font: inherit;
508 font-size: 14px;
509 cursor: pointer;
510}
511
512.btn-danger {
513 background: #ffffff;
514 color: #aa0000;
515 border: 1px solid #cc0000;
516 padding: 6px 14px;
517 font: inherit;
518 font-size: 14px;
519 cursor: pointer;
520}
521
522.preview-box {
523 border: 1px solid #cccccc;
524 padding: 16px;
525 min-height: 180px;
526 background: #ffffff;
527}
528
529.tabs-row {
530 display: flex;
531 gap: 12px;
532 margin-bottom: 8px;
533 font-size: 14px;
534}
535
536.upload-row {
537 display: flex;
538 align-items: center;
539 gap: 12px;
540 flex-wrap: wrap;
541}
542
543/* Maker Profile */
544.maker-header {
545 display: flex;
546 align-items: center;
547 gap: 14px;
548 margin-bottom: 14px;
549}
550
551.maker-avatar {
552 width: 48px;
553 height: 48px;
554 border-radius: 50%;
555 object-fit: cover;
556 flex-shrink: 0;
557 display: inline-flex;
558 align-items: center;
559 justify-content: center;
560 font-weight: 700;
561 font-size: 18px;
562 color: #ffffff;
563}
564
565.maker-avatar-sm {
566 width: 24px;
567 height: 24px;
568 border-radius: 50%;
569 object-fit: cover;
570 flex-shrink: 0;
571 display: inline-flex;
572 align-items: center;
573 justify-content: center;
574 font-weight: 700;
575 font-size: 12px;
576 color: #ffffff;
577}
578
579/* Admin table */
580.plain-table {
581 width: 100%;
582 border-collapse: collapse;
583 font-size: 14px;
584}
585
586.plain-table th,
587.plain-table td {
588 border-bottom: 1px solid #e5e5e5;
589 padding: 8px 6px;
590 text-align: left;
591 vertical-align: top;
592}
593
594.plain-table th {
595 font-weight: 700;
596}
597
598@media (max-width: 600px) {
599 .container {
600 padding: 20px 16px 48px;
601 }
602
603 .site-header {
604 margin-bottom: 32px;
605 }
606
607 h1 {
608 font-size: 26px;
609 }
610
611 .product-row {
612 gap: 8px;
613 }
614}
615
cg / hackerproducts — hacker products