@rmdes/indiekit-endpoint-microsub 1.0.48 → 1.0.50

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.
package/assets/styles.css CHANGED
@@ -154,15 +154,40 @@
154
154
  margin-bottom: var(--space-s);
155
155
  }
156
156
 
157
+ .ms-item-card__avatar-wrap {
158
+ flex-shrink: 0;
159
+ height: 40px;
160
+ position: relative;
161
+ width: 40px;
162
+ }
163
+
164
+ .ms-item-card__avatar-wrap > img {
165
+ position: absolute;
166
+ inset: 0;
167
+ z-index: 1;
168
+ }
169
+
157
170
  .ms-item-card__author-photo {
158
171
  border: var(--border-width-thin) solid var(--color-offset);
159
172
  border-radius: 50%;
160
- flex-shrink: 0;
161
173
  height: 40px;
162
174
  object-fit: cover;
163
175
  width: 40px;
164
176
  }
165
177
 
178
+ .ms-item-card__author-photo--default {
179
+ align-items: center;
180
+ background: var(--color-offset);
181
+ border-radius: 50%;
182
+ color: var(--color-on-offset);
183
+ display: flex;
184
+ font-size: var(--font-size-s);
185
+ font-weight: 600;
186
+ height: 40px;
187
+ justify-content: center;
188
+ width: 40px;
189
+ }
190
+
166
191
  .ms-item-card__author-info {
167
192
  display: flex;
168
193
  flex-direction: column;
@@ -496,6 +521,19 @@
496
521
  margin-bottom: var(--space-m);
497
522
  }
498
523
 
524
+ .ms-item__avatar-wrap {
525
+ flex-shrink: 0;
526
+ height: 48px;
527
+ position: relative;
528
+ width: 48px;
529
+ }
530
+
531
+ .ms-item__avatar-wrap > img {
532
+ position: absolute;
533
+ inset: 0;
534
+ z-index: 1;
535
+ }
536
+
499
537
  .ms-item__author-photo {
500
538
  border-radius: 50%;
501
539
  height: 48px;
@@ -503,6 +541,19 @@
503
541
  width: 48px;
504
542
  }
505
543
 
544
+ .ms-item__author-photo--default {
545
+ align-items: center;
546
+ background: var(--color-offset);
547
+ border-radius: 50%;
548
+ color: var(--color-on-offset);
549
+ display: flex;
550
+ font-size: var(--font-size-m);
551
+ font-weight: 600;
552
+ height: 48px;
553
+ justify-content: center;
554
+ width: 48px;
555
+ }
556
+
506
557
  .ms-item__author-info {
507
558
  display: flex;
508
559
  flex-direction: column;
@@ -1010,12 +1061,37 @@
1010
1061
  gap: var(--space-m);
1011
1062
  }
1012
1063
 
1064
+ .ms-actor-profile__avatar-wrap {
1065
+ flex-shrink: 0;
1066
+ height: 80px;
1067
+ position: relative;
1068
+ width: 80px;
1069
+ }
1070
+
1071
+ .ms-actor-profile__avatar-wrap > img {
1072
+ position: absolute;
1073
+ inset: 0;
1074
+ z-index: 1;
1075
+ }
1076
+
1013
1077
  .ms-actor-profile__avatar {
1014
1078
  border-radius: 50%;
1015
- flex-shrink: 0;
1016
1079
  object-fit: cover;
1017
1080
  }
1018
1081
 
1082
+ .ms-actor-profile__avatar--default {
1083
+ align-items: center;
1084
+ background: var(--color-offset);
1085
+ border-radius: 50%;
1086
+ color: var(--color-on-offset);
1087
+ display: flex;
1088
+ font-size: var(--font-size-xl);
1089
+ font-weight: 600;
1090
+ height: 80px;
1091
+ justify-content: center;
1092
+ width: 80px;
1093
+ }
1094
+
1019
1095
  .ms-actor-profile__info {
1020
1096
  flex: 1;
1021
1097
  min-width: 0;
package/locales/de.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Feed nicht gefunden",
100
100
  "invalidUrl": "Ungültige URL",
101
101
  "invalidAction": "Ungültige Aktion"
102
+ },
103
+ "views": {
104
+ "channels": "Kanäle",
105
+ "deck": "Deck",
106
+ "timeline": "Zeitleiste"
102
107
  }
103
108
  }
104
109
  }
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Feed no encontrado",
100
100
  "invalidUrl": "URL no válida",
101
101
  "invalidAction": "Acción no válida"
102
+ },
103
+ "views": {
104
+ "channels": "Canales",
105
+ "deck": "Deck",
106
+ "timeline": "Línea de tiempo"
102
107
  }
103
108
  }
104
109
  }
package/locales/es.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Fuente no encontrada",
100
100
  "invalidUrl": "URL no válida",
101
101
  "invalidAction": "Acción no válida"
102
+ },
103
+ "views": {
104
+ "channels": "Canales",
105
+ "deck": "Deck",
106
+ "timeline": "Cronología"
102
107
  }
103
108
  }
104
109
  }
package/locales/fr.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Flux introuvable",
100
100
  "invalidUrl": "URL invalide",
101
101
  "invalidAction": "Action invalide"
102
+ },
103
+ "views": {
104
+ "channels": "Chaînes",
105
+ "deck": "Deck",
106
+ "timeline": "Fil d'actualité"
102
107
  }
103
108
  }
104
109
  }
package/locales/hi.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "फीड नहीं मिला",
100
100
  "invalidUrl": "अमान्य URL",
101
101
  "invalidAction": "अमान्य क्रिया"
102
+ },
103
+ "views": {
104
+ "channels": "चैनल",
105
+ "deck": "डेक",
106
+ "timeline": "टाइमलाइन"
102
107
  }
103
108
  }
104
109
  }
package/locales/id.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Umpan tidak ditemukan",
100
100
  "invalidUrl": "URL tidak valid",
101
101
  "invalidAction": "Tindakan tidak valid"
102
+ },
103
+ "views": {
104
+ "channels": "Kanal",
105
+ "deck": "Deck",
106
+ "timeline": "Lini masa"
102
107
  }
103
108
  }
104
109
  }
package/locales/it.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Feed non trovato",
100
100
  "invalidUrl": "URL non valido",
101
101
  "invalidAction": "Azione non valida"
102
+ },
103
+ "views": {
104
+ "channels": "Canali",
105
+ "deck": "Deck",
106
+ "timeline": "Timeline"
102
107
  }
103
108
  }
104
109
  }
package/locales/nl.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Feed niet gevonden",
100
100
  "invalidUrl": "Ongeldige URL",
101
101
  "invalidAction": "Ongeldige actie"
102
+ },
103
+ "views": {
104
+ "channels": "Kanalen",
105
+ "deck": "Deck",
106
+ "timeline": "Tijdlijn"
102
107
  }
103
108
  }
104
109
  }
package/locales/pl.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Nie znaleziono kanału RSS",
100
100
  "invalidUrl": "Nieprawidłowy URL",
101
101
  "invalidAction": "Nieprawidłowa akcja"
102
+ },
103
+ "views": {
104
+ "channels": "Kanały",
105
+ "deck": "Deck",
106
+ "timeline": "Oś czasu"
102
107
  }
103
108
  }
104
109
  }
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Feed não encontrado",
100
100
  "invalidUrl": "URL inválida",
101
101
  "invalidAction": "Ação inválida"
102
+ },
103
+ "views": {
104
+ "channels": "Canais",
105
+ "deck": "Deck",
106
+ "timeline": "Linha do tempo"
102
107
  }
103
108
  }
104
109
  }
package/locales/pt.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Feed não encontrado",
100
100
  "invalidUrl": "URL inválido",
101
101
  "invalidAction": "Acção inválida"
102
+ },
103
+ "views": {
104
+ "channels": "Canais",
105
+ "deck": "Deck",
106
+ "timeline": "Cronologia"
102
107
  }
103
108
  }
104
109
  }
package/locales/sr.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Довод није пронађен",
100
100
  "invalidUrl": "Неважећи URL",
101
101
  "invalidAction": "Неважећа радња"
102
+ },
103
+ "views": {
104
+ "channels": "Канали",
105
+ "deck": "Deck",
106
+ "timeline": "Временска линија"
102
107
  }
103
108
  }
104
109
  }
package/locales/sv.json CHANGED
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "Flöde hittades inte",
100
100
  "invalidUrl": "Ogiltig URL",
101
101
  "invalidAction": "Ogiltig åtgärd"
102
+ },
103
+ "views": {
104
+ "channels": "Kanaler",
105
+ "deck": "Deck",
106
+ "timeline": "Tidslinje"
102
107
  }
103
108
  }
104
109
  }
@@ -99,6 +99,11 @@
99
99
  "feedNotFound": "未找到订阅源",
100
100
  "invalidUrl": "无效的 URL",
101
101
  "invalidAction": "无效的操作"
102
+ },
103
+ "views": {
104
+ "channels": "频道",
105
+ "deck": "面板",
106
+ "timeline": "时间线"
102
107
  }
103
108
  }
104
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-microsub",
3
- "version": "1.0.48",
3
+ "version": "1.0.50",
4
4
  "description": "Microsub endpoint for Indiekit. Enables subscribing to feeds and reading content using the Microsub protocol.",
5
5
  "keywords": [
6
6
  "indiekit",
package/views/actor.njk CHANGED
@@ -11,13 +11,16 @@
11
11
  {# Actor profile card #}
12
12
  <div class="ms-actor-profile">
13
13
  <div class="ms-actor-profile__header">
14
- {% if actor.photo %}
15
- <img src="{{ actor.photo }}"
16
- alt=""
17
- class="ms-actor-profile__avatar"
18
- width="80"
19
- height="80">
20
- {% endif %}
14
+ <div class="ms-actor-profile__avatar-wrap" data-avatar-fallback>
15
+ {% if actor.photo %}
16
+ <img src="{{ actor.photo }}"
17
+ alt=""
18
+ class="ms-actor-profile__avatar"
19
+ width="80"
20
+ height="80">
21
+ {% endif %}
22
+ <span class="ms-actor-profile__avatar ms-actor-profile__avatar--default" aria-hidden="true">{{ actor.name[0] | upper if actor.name else "?" }}</span>
23
+ </div>
21
24
  <div class="ms-actor-profile__info">
22
25
  <h2 class="ms-actor-profile__name">{{ actor.name }}</h2>
23
26
  {% if actor.handle %}
@@ -73,14 +76,17 @@
73
76
  {# Author #}
74
77
  {% if item.author %}
75
78
  <div class="ms-item-card__author" style="padding: 12px 16px 0;">
76
- {% if item.author.photo %}
77
- <img src="{{ item.author.photo }}"
78
- alt=""
79
- class="ms-item-card__author-photo"
80
- width="40"
81
- height="40"
82
- loading="lazy">
83
- {% endif %}
79
+ <div class="ms-item-card__avatar-wrap" data-avatar-fallback>
80
+ {% if item.author.photo %}
81
+ <img src="{{ item.author.photo }}"
82
+ alt=""
83
+ class="ms-item-card__author-photo"
84
+ width="40"
85
+ height="40"
86
+ loading="lazy">
87
+ {% endif %}
88
+ <span class="ms-item-card__author-photo ms-item-card__author-photo--default" aria-hidden="true">{{ item.author.name[0] | upper if item.author.name else "?" }}</span>
89
+ </div>
84
90
  <div class="ms-item-card__author-info">
85
91
  <span class="ms-item-card__author-name">{{ item.author.name or "Unknown" }}</span>
86
92
  {% if item.author.url %}
package/views/item.njk CHANGED
@@ -8,14 +8,17 @@
8
8
 
9
9
  {% if item.author %}
10
10
  <header class="ms-item__author">
11
- {% if item.author.photo %}
12
- <img src="{{ item.author.photo }}"
13
- alt=""
14
- class="ms-item__author-photo"
15
- width="48"
16
- height="48"
17
- loading="lazy">
18
- {% endif %}
11
+ <div class="ms-item__avatar-wrap" data-avatar-fallback>
12
+ {% if item.author.photo %}
13
+ <img src="{{ item.author.photo }}"
14
+ alt=""
15
+ class="ms-item__author-photo"
16
+ width="48"
17
+ height="48"
18
+ loading="lazy">
19
+ {% endif %}
20
+ <span class="ms-item__author-photo ms-item__author-photo--default" aria-hidden="true">{{ item.author.name[0] | upper if item.author.name else "?" }}</span>
21
+ </div>
19
22
  <div class="ms-item__author-info">
20
23
  <span class="ms-item__author-name">
21
24
  {% if item.author.url %}
@@ -9,4 +9,6 @@
9
9
  {% include "partials/breadcrumbs.njk" %}
10
10
  {% include "partials/view-switcher.njk" %}
11
11
  {% block reader %}{% endblock %}
12
+ {# Avatar fallback — remove broken images to reveal initials fallback underneath #}
13
+ <script>document.addEventListener("error",function(e){var t=e.target;if(t.tagName==="IMG"&&t.closest("[data-avatar-fallback]"))t.remove()},true)</script>
12
14
  {% endblock %}
@@ -1,9 +1,12 @@
1
1
  {# Author display #}
2
2
  {% if author %}
3
3
  <div class="author">
4
- {% if author.photo %}
5
- <img src="{{ author.photo }}" alt="" class="author__photo" width="48" height="48" loading="lazy">
6
- {% endif %}
4
+ <div class="ms-item__avatar-wrap" data-avatar-fallback>
5
+ {% if author.photo %}
6
+ <img src="{{ author.photo }}" alt="" class="author__photo" width="48" height="48" loading="lazy">
7
+ {% endif %}
8
+ <span class="ms-item__author-photo ms-item__author-photo--default" aria-hidden="true">{{ author.name[0] | upper if author.name else "?" }}</span>
9
+ </div>
7
10
  <div class="author__info">
8
11
  <span class="author__name">
9
12
  {% if author.url %}
@@ -53,14 +53,17 @@
53
53
  {# Author #}
54
54
  {% if item.author %}
55
55
  <div class="ms-item-card__author">
56
- {% if item.author.photo %}
57
- <img src="{{ item.author.photo }}"
58
- alt=""
59
- class="ms-item-card__author-photo"
60
- width="40"
61
- height="40"
62
- loading="lazy">
63
- {% endif %}
56
+ <div class="ms-item-card__avatar-wrap" data-avatar-fallback>
57
+ {% if item.author.photo %}
58
+ <img src="{{ item.author.photo }}"
59
+ alt=""
60
+ class="ms-item-card__author-photo"
61
+ width="40"
62
+ height="40"
63
+ loading="lazy">
64
+ {% endif %}
65
+ <span class="ms-item-card__author-photo ms-item-card__author-photo--default" aria-hidden="true">{{ item.author.name[0] | upper if item.author.name else "?" }}</span>
66
+ </div>
64
67
  <div class="ms-item-card__author-info">
65
68
  <span class="ms-item-card__author-name">{{ item.author.name or "Unknown" }}</span>
66
69
  {% if item._source %}