@rmdes/indiekit-endpoint-microsub 1.0.1 → 1.0.3

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.
@@ -0,0 +1,764 @@
1
+ /**
2
+ * Microsub Reader Styles
3
+ * Inspired by Aperture/Monocle
4
+ */
5
+
6
+ /* ==========================================================================
7
+ Reader Layout
8
+ ========================================================================== */
9
+
10
+ .reader {
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: var(--space-m);
14
+ }
15
+
16
+ .reader__header {
17
+ align-items: center;
18
+ display: flex;
19
+ flex-wrap: wrap;
20
+ gap: var(--space-s);
21
+ justify-content: space-between;
22
+ }
23
+
24
+ .reader__actions {
25
+ display: flex;
26
+ flex-wrap: wrap;
27
+ gap: var(--space-xs);
28
+ }
29
+
30
+ /* ==========================================================================
31
+ Channel List
32
+ ========================================================================== */
33
+
34
+ .reader__channels {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: var(--space-xs);
38
+ }
39
+
40
+ .reader__channel {
41
+ align-items: center;
42
+ background: var(--color-offset);
43
+ border-radius: var(--border-radius);
44
+ color: inherit;
45
+ display: flex;
46
+ gap: var(--space-s);
47
+ padding: var(--space-s) var(--space-m);
48
+ text-decoration: none;
49
+ transition:
50
+ background-color 0.2s ease,
51
+ box-shadow 0.2s ease;
52
+ }
53
+
54
+ .reader__channel:hover {
55
+ background: var(--color-offset-active);
56
+ }
57
+
58
+ .reader__channel--active {
59
+ background: var(--color-primary);
60
+ color: var(--color-background);
61
+ }
62
+
63
+ .reader__channel-name {
64
+ flex: 1;
65
+ font-weight: 500;
66
+ }
67
+
68
+ .reader__channel-badge {
69
+ align-items: center;
70
+ background: var(--color-primary);
71
+ border-radius: 0.75rem;
72
+ color: var(--color-background);
73
+ display: inline-flex;
74
+ font-size: var(--font-size-small);
75
+ font-weight: 600;
76
+ height: 1.5rem;
77
+ justify-content: center;
78
+ min-width: 1.5rem;
79
+ padding: 0 var(--space-xs);
80
+ }
81
+
82
+ .reader__channel--active .reader__channel-badge {
83
+ background: var(--color-background);
84
+ color: var(--color-primary);
85
+ }
86
+
87
+ /* Dot indicator for boolean unread state */
88
+ .reader__channel-badge--dot {
89
+ height: 0.75rem;
90
+ min-width: 0.75rem;
91
+ padding: 0;
92
+ width: 0.75rem;
93
+ }
94
+
95
+ /* ==========================================================================
96
+ Timeline
97
+ ========================================================================== */
98
+
99
+ .timeline {
100
+ display: flex;
101
+ flex-direction: column;
102
+ gap: var(--space-m);
103
+ }
104
+
105
+ .timeline__paging {
106
+ border-top: 1px solid var(--color-offset);
107
+ display: flex;
108
+ gap: var(--space-m);
109
+ justify-content: space-between;
110
+ padding-top: var(--space-m);
111
+ }
112
+
113
+ /* ==========================================================================
114
+ Item Card
115
+ ========================================================================== */
116
+
117
+ .item-card {
118
+ background: var(--color-background);
119
+ border: 1px solid var(--color-offset);
120
+ border-radius: var(--border-radius);
121
+ display: block;
122
+ overflow: hidden;
123
+ transition:
124
+ box-shadow 0.2s ease,
125
+ transform 0.1s ease;
126
+ }
127
+
128
+ .item-card:hover {
129
+ border-color: var(--color-offset-active);
130
+ }
131
+
132
+ /* Unread state - yellow glow (Aperture pattern) */
133
+ .item-card:not(.item-card--read) {
134
+ border-color: rgba(255, 204, 0, 0.5);
135
+ box-shadow: 0 0 10px 0 rgba(255, 204, 0, 0.8);
136
+ }
137
+
138
+ .item-card--read {
139
+ opacity: 0.85;
140
+ }
141
+
142
+ .item-card__link {
143
+ color: inherit;
144
+ display: block;
145
+ padding: var(--space-m);
146
+ text-decoration: none;
147
+ }
148
+
149
+ /* Author */
150
+ .item-card__author {
151
+ align-items: center;
152
+ display: flex;
153
+ gap: var(--space-s);
154
+ margin-bottom: var(--space-s);
155
+ }
156
+
157
+ .item-card__author-photo {
158
+ border: 1px solid var(--color-offset);
159
+ border-radius: 50%;
160
+ flex-shrink: 0;
161
+ height: 40px;
162
+ object-fit: cover;
163
+ width: 40px;
164
+ }
165
+
166
+ .item-card__author-info {
167
+ display: flex;
168
+ flex-direction: column;
169
+ min-width: 0;
170
+ }
171
+
172
+ .item-card__author-name {
173
+ font-size: var(--font-size-body);
174
+ font-weight: 600;
175
+ overflow: hidden;
176
+ text-overflow: ellipsis;
177
+ white-space: nowrap;
178
+ }
179
+
180
+ .item-card__source {
181
+ color: var(--color-text-muted);
182
+ font-size: var(--font-size-small);
183
+ overflow: hidden;
184
+ text-overflow: ellipsis;
185
+ white-space: nowrap;
186
+ }
187
+
188
+ /* Post type indicator */
189
+ .item-card__type {
190
+ align-items: center;
191
+ background: var(--color-offset);
192
+ border-radius: var(--border-radius);
193
+ color: var(--color-text-muted);
194
+ display: inline-flex;
195
+ font-size: var(--font-size-small);
196
+ gap: var(--space-xs);
197
+ margin-bottom: var(--space-s);
198
+ padding: var(--space-xs) var(--space-s);
199
+ }
200
+
201
+ .item-card__type svg {
202
+ height: 1em;
203
+ width: 1em;
204
+ }
205
+
206
+ /* Context bar for interactions (Aperture pattern) */
207
+ .item-card__context {
208
+ align-items: center;
209
+ background: var(--color-offset);
210
+ display: flex;
211
+ font-size: var(--font-size-small);
212
+ gap: var(--space-xs);
213
+ margin: calc(-1 * var(--space-m));
214
+ margin-bottom: var(--space-s);
215
+ padding: var(--space-s) var(--space-m);
216
+ }
217
+
218
+ .item-card__context a {
219
+ color: var(--color-primary);
220
+ text-decoration: none;
221
+ }
222
+
223
+ .item-card__context a:hover {
224
+ text-decoration: underline;
225
+ }
226
+
227
+ .item-card__context svg {
228
+ flex-shrink: 0;
229
+ height: 1em;
230
+ width: 1em;
231
+ }
232
+
233
+ /* Title */
234
+ .item-card__title {
235
+ font-size: var(--font-size-heading-4);
236
+ font-weight: 600;
237
+ line-height: 1.3;
238
+ margin-bottom: var(--space-xs);
239
+ }
240
+
241
+ /* Content with expandable overflow (Aperture pattern) */
242
+ .item-card__content {
243
+ color: var(--color-text);
244
+ line-height: 1.5;
245
+ margin-bottom: var(--space-s);
246
+ max-height: 200px;
247
+ overflow: hidden;
248
+ position: relative;
249
+ }
250
+
251
+ .item-card__content--expanded {
252
+ max-height: none;
253
+ }
254
+
255
+ .item-card__content--truncated::after {
256
+ background: linear-gradient(to bottom, transparent, var(--color-background));
257
+ bottom: 0;
258
+ content: "";
259
+ height: 60px;
260
+ left: 0;
261
+ pointer-events: none;
262
+ position: absolute;
263
+ right: 0;
264
+ }
265
+
266
+ .item-card__read-more {
267
+ color: var(--color-primary);
268
+ cursor: pointer;
269
+ display: block;
270
+ font-size: var(--font-size-small);
271
+ padding: var(--space-xs);
272
+ text-align: center;
273
+ }
274
+
275
+ /* Photo grid (Aperture multi-photo pattern) */
276
+ .item-card__photos {
277
+ border-radius: var(--border-radius);
278
+ display: grid;
279
+ gap: 2px;
280
+ margin-bottom: var(--space-s);
281
+ overflow: hidden;
282
+ }
283
+
284
+ /* Single photo */
285
+ .item-card__photos--1 {
286
+ grid-template-columns: 1fr;
287
+ }
288
+
289
+ /* 2 photos - side by side */
290
+ .item-card__photos--2 {
291
+ grid-template-columns: 1fr 1fr;
292
+ }
293
+
294
+ /* 3 photos - one large, two small */
295
+ .item-card__photos--3 {
296
+ grid-template-columns: 2fr 1fr;
297
+ grid-template-rows: 1fr 1fr;
298
+ }
299
+
300
+ /* 4+ photos - grid */
301
+ .item-card__photos--4 {
302
+ grid-template-columns: 1fr 1fr;
303
+ grid-template-rows: 1fr 1fr;
304
+ }
305
+
306
+ /* Base photo styles - must come before specific overrides */
307
+ .item-card__photo {
308
+ background: var(--color-offset);
309
+ height: 150px;
310
+ object-fit: cover;
311
+ width: 100%;
312
+ }
313
+
314
+ .item-card__photos--1 .item-card__photo {
315
+ height: auto;
316
+ max-height: 400px;
317
+ }
318
+
319
+ .item-card__photos--3 .item-card__photo:first-child {
320
+ grid-row: 1 / 3;
321
+ height: 302px;
322
+ }
323
+
324
+ /* Video/Audio */
325
+ .item-card__video,
326
+ .item-card__audio {
327
+ border-radius: var(--border-radius);
328
+ margin-bottom: var(--space-s);
329
+ width: 100%;
330
+ }
331
+
332
+ /* Footer */
333
+ .item-card__footer {
334
+ align-items: center;
335
+ border-top: 1px solid var(--color-offset);
336
+ color: var(--color-text-muted);
337
+ display: flex;
338
+ font-size: var(--font-size-small);
339
+ justify-content: space-between;
340
+ padding-top: var(--space-s);
341
+ }
342
+
343
+ .item-card__date {
344
+ color: inherit;
345
+ }
346
+
347
+ .item-card__unread {
348
+ color: var(--color-warning, #ffcc00);
349
+ font-size: 0.75rem;
350
+ }
351
+
352
+ /* Categories/Tags */
353
+ .item-card__categories {
354
+ display: flex;
355
+ flex-wrap: wrap;
356
+ gap: var(--space-xs);
357
+ margin-bottom: var(--space-s);
358
+ }
359
+
360
+ .item-card__category {
361
+ background: var(--color-offset);
362
+ border-radius: var(--border-radius);
363
+ color: var(--color-text-muted);
364
+ display: inline-block;
365
+ font-size: var(--font-size-small);
366
+ padding: 2px var(--space-xs);
367
+ }
368
+
369
+ /* ==========================================================================
370
+ Item Actions (inline on cards)
371
+ ========================================================================== */
372
+
373
+ .item-actions {
374
+ border-top: 1px solid var(--color-offset);
375
+ display: flex;
376
+ gap: var(--space-s);
377
+ padding-top: var(--space-s);
378
+ }
379
+
380
+ .item-actions__button {
381
+ align-items: center;
382
+ background: transparent;
383
+ border: 1px solid var(--color-offset);
384
+ border-radius: var(--border-radius);
385
+ color: var(--color-text-muted);
386
+ cursor: pointer;
387
+ display: inline-flex;
388
+ font-size: var(--font-size-small);
389
+ gap: var(--space-xs);
390
+ padding: var(--space-xs) var(--space-s);
391
+ text-decoration: none;
392
+ transition: all 0.2s ease;
393
+ }
394
+
395
+ .item-actions__button:hover {
396
+ background: var(--color-offset);
397
+ border-color: var(--color-offset-active);
398
+ color: var(--color-text);
399
+ }
400
+
401
+ .item-actions__button svg {
402
+ height: 1em;
403
+ width: 1em;
404
+ }
405
+
406
+ .item-actions__button--primary {
407
+ background: var(--color-primary);
408
+ border-color: var(--color-primary);
409
+ color: var(--color-background);
410
+ }
411
+
412
+ .item-actions__button--primary:hover {
413
+ background: var(--color-primary-dark, var(--color-primary));
414
+ border-color: var(--color-primary-dark, var(--color-primary));
415
+ color: var(--color-background);
416
+ }
417
+
418
+ /* Mark as read button */
419
+ .item-actions__mark-read {
420
+ margin-left: auto;
421
+ }
422
+
423
+ /* ==========================================================================
424
+ Single Item View
425
+ ========================================================================== */
426
+
427
+ .item {
428
+ max-width: 40rem;
429
+ }
430
+
431
+ .item__header {
432
+ margin-bottom: var(--space-m);
433
+ }
434
+
435
+ .item__author {
436
+ align-items: center;
437
+ display: flex;
438
+ gap: var(--space-s);
439
+ margin-bottom: var(--space-m);
440
+ }
441
+
442
+ .item__author-photo {
443
+ border-radius: 50%;
444
+ height: 48px;
445
+ object-fit: cover;
446
+ width: 48px;
447
+ }
448
+
449
+ .item__author-info {
450
+ display: flex;
451
+ flex-direction: column;
452
+ }
453
+
454
+ .item__author-name {
455
+ font-weight: 600;
456
+ }
457
+
458
+ .item__date {
459
+ color: var(--color-text-muted);
460
+ font-size: var(--font-size-small);
461
+ }
462
+
463
+ .item__title {
464
+ font-size: var(--font-size-heading-2);
465
+ margin-bottom: var(--space-m);
466
+ }
467
+
468
+ .item__content {
469
+ line-height: 1.6;
470
+ margin-bottom: var(--space-m);
471
+ }
472
+
473
+ .item__content img {
474
+ border-radius: var(--border-radius);
475
+ height: auto;
476
+ max-width: 100%;
477
+ }
478
+
479
+ .item__photos {
480
+ display: grid;
481
+ gap: var(--space-s);
482
+ margin-bottom: var(--space-m);
483
+ }
484
+
485
+ .item__photo {
486
+ border-radius: var(--border-radius);
487
+ width: 100%;
488
+ }
489
+
490
+ .item__context {
491
+ background: var(--color-offset);
492
+ border-radius: var(--border-radius);
493
+ margin-bottom: var(--space-m);
494
+ padding: var(--space-m);
495
+ }
496
+
497
+ .item__context-label {
498
+ color: var(--color-text-muted);
499
+ font-size: var(--font-size-small);
500
+ margin-bottom: var(--space-xs);
501
+ }
502
+
503
+ .item__actions {
504
+ border-top: 1px solid var(--color-offset);
505
+ display: flex;
506
+ flex-wrap: wrap;
507
+ gap: var(--space-s);
508
+ padding-top: var(--space-m);
509
+ }
510
+
511
+ /* ==========================================================================
512
+ Channel Header
513
+ ========================================================================== */
514
+
515
+ .channel__header {
516
+ align-items: center;
517
+ display: flex;
518
+ flex-wrap: wrap;
519
+ gap: var(--space-s);
520
+ justify-content: space-between;
521
+ margin-bottom: var(--space-m);
522
+ }
523
+
524
+ .channel__actions {
525
+ display: flex;
526
+ gap: var(--space-xs);
527
+ }
528
+
529
+ /* ==========================================================================
530
+ Feeds Management
531
+ ========================================================================== */
532
+
533
+ .feeds {
534
+ display: flex;
535
+ flex-direction: column;
536
+ gap: var(--space-m);
537
+ }
538
+
539
+ .feeds__header {
540
+ align-items: center;
541
+ display: flex;
542
+ flex-wrap: wrap;
543
+ gap: var(--space-s);
544
+ justify-content: space-between;
545
+ }
546
+
547
+ .feeds__list {
548
+ display: flex;
549
+ flex-direction: column;
550
+ gap: var(--space-s);
551
+ }
552
+
553
+ .feeds__item {
554
+ align-items: center;
555
+ background: var(--color-offset);
556
+ border-radius: var(--border-radius);
557
+ display: flex;
558
+ gap: var(--space-m);
559
+ padding: var(--space-m);
560
+ }
561
+
562
+ .feeds__photo {
563
+ border-radius: var(--border-radius);
564
+ flex-shrink: 0;
565
+ height: 48px;
566
+ object-fit: cover;
567
+ width: 48px;
568
+ }
569
+
570
+ .feeds__info {
571
+ flex: 1;
572
+ min-width: 0;
573
+ }
574
+
575
+ .feeds__name {
576
+ font-weight: 600;
577
+ overflow: hidden;
578
+ text-overflow: ellipsis;
579
+ white-space: nowrap;
580
+ }
581
+
582
+ .feeds__url {
583
+ color: var(--color-text-muted);
584
+ font-size: var(--font-size-small);
585
+ overflow: hidden;
586
+ text-overflow: ellipsis;
587
+ white-space: nowrap;
588
+ }
589
+
590
+ .feeds__actions {
591
+ flex-shrink: 0;
592
+ }
593
+
594
+ .feeds__add {
595
+ background: var(--color-offset);
596
+ border-radius: var(--border-radius);
597
+ padding: var(--space-m);
598
+ }
599
+
600
+ .feeds__form {
601
+ display: flex;
602
+ gap: var(--space-s);
603
+ }
604
+
605
+ .feeds__form input {
606
+ flex: 1;
607
+ }
608
+
609
+ /* ==========================================================================
610
+ Search
611
+ ========================================================================== */
612
+
613
+ .search {
614
+ display: flex;
615
+ flex-direction: column;
616
+ gap: var(--space-m);
617
+ }
618
+
619
+ .search__form {
620
+ display: flex;
621
+ gap: var(--space-s);
622
+ }
623
+
624
+ .search__form input {
625
+ flex: 1;
626
+ }
627
+
628
+ .search__results {
629
+ margin-top: var(--space-m);
630
+ }
631
+
632
+ .search__list {
633
+ display: flex;
634
+ flex-direction: column;
635
+ gap: var(--space-s);
636
+ }
637
+
638
+ .search__item {
639
+ align-items: center;
640
+ background: var(--color-offset);
641
+ border-radius: var(--border-radius);
642
+ display: flex;
643
+ justify-content: space-between;
644
+ padding: var(--space-m);
645
+ }
646
+
647
+ .search__feed {
648
+ flex: 1;
649
+ min-width: 0;
650
+ }
651
+
652
+ .search__url {
653
+ color: var(--color-text-muted);
654
+ font-size: var(--font-size-small);
655
+ overflow: hidden;
656
+ text-overflow: ellipsis;
657
+ white-space: nowrap;
658
+ }
659
+
660
+ /* ==========================================================================
661
+ Compose
662
+ ========================================================================== */
663
+
664
+ .compose {
665
+ max-width: 40rem;
666
+ }
667
+
668
+ .compose__context {
669
+ background: var(--color-offset);
670
+ border-radius: var(--border-radius);
671
+ margin-bottom: var(--space-m);
672
+ padding: var(--space-m);
673
+ }
674
+
675
+ .compose__counter {
676
+ color: var(--color-text-muted);
677
+ font-size: var(--font-size-small);
678
+ margin-top: var(--space-xs);
679
+ text-align: right;
680
+ }
681
+
682
+ /* ==========================================================================
683
+ Settings
684
+ ========================================================================== */
685
+
686
+ .settings {
687
+ max-width: 40rem;
688
+ }
689
+
690
+ .settings .divider {
691
+ border-top: 1px solid var(--color-offset);
692
+ margin: var(--space-l) 0;
693
+ }
694
+
695
+ .settings .danger-zone {
696
+ background: rgba(var(--color-error-rgb, 255, 0, 0), 0.1);
697
+ border: 1px solid var(--color-error);
698
+ border-radius: var(--border-radius);
699
+ padding: var(--space-m);
700
+ }
701
+
702
+ /* ==========================================================================
703
+ Keyboard Navigation Focus
704
+ ========================================================================== */
705
+
706
+ .item-card:focus-within,
707
+ .item-card.item-card--focused {
708
+ outline: 2px solid var(--color-primary);
709
+ outline-offset: 2px;
710
+ }
711
+
712
+ /* ==========================================================================
713
+ Empty States
714
+ ========================================================================== */
715
+
716
+ .reader__empty {
717
+ color: var(--color-text-muted);
718
+ padding: var(--space-xl);
719
+ text-align: center;
720
+ }
721
+
722
+ .reader__empty svg {
723
+ height: 4rem;
724
+ margin-bottom: var(--space-m);
725
+ opacity: 0.5;
726
+ width: 4rem;
727
+ }
728
+
729
+ /* ==========================================================================
730
+ Responsive
731
+ ========================================================================== */
732
+
733
+ @media (max-width: 640px) {
734
+ .item-card__photos--3 {
735
+ grid-template-columns: 1fr 1fr;
736
+ grid-template-rows: auto auto;
737
+ }
738
+
739
+ .item-card__photos--3 .item-card__photo:first-child {
740
+ grid-column: 1 / 3;
741
+ grid-row: 1;
742
+ height: 200px;
743
+ }
744
+
745
+ .item-card__photos--3 .item-card__photo:nth-child(2),
746
+ .item-card__photos--3 .item-card__photo:nth-child(3) {
747
+ height: 100px;
748
+ }
749
+
750
+ .feeds__item {
751
+ flex-wrap: wrap;
752
+ }
753
+
754
+ .feeds__info {
755
+ order: 1;
756
+ width: calc(100% - 64px);
757
+ }
758
+
759
+ .feeds__actions {
760
+ margin-top: var(--space-s);
761
+ order: 2;
762
+ width: 100%;
763
+ }
764
+ }