@content-streamline/nextjs 0.0.10 → 0.0.11
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostsList.d.ts","sourceRoot":"","sources":["../../src/components/PostsList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACzF;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CAC5F;AAED,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,OAAkB,EAClB,QAAiB,EACjB,SAAa,EACb,QAAe,EACf,SAAc,EACd,aA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AW,EACX,aAAa,GACd,EAAE,cAAc,2CA8EhB"}
|
|
@@ -17,12 +17,12 @@ export function PostsList({ posts, baseUrl = '/posts', platform = 'blog', skipFi
|
|
|
17
17
|
return null;
|
|
18
18
|
const featuredImage = post.images.find((img) => img.ordering === 0) || post.images[0];
|
|
19
19
|
const date = new Date(post.created_at);
|
|
20
|
-
return (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
return (_jsx("article", { className: `content-streamline-list-item ${itemClassName}`, children: _jsxs("a", { href: `${baseUrl}/${post.id}/${translation.slug}`, className: "content-streamline-list-link", children: [showImages && featuredImage && (_jsx("div", { className: "content-streamline-list-image", children: _jsx("img", { src: featuredImage.thumbnail_url, alt: featuredImage.alt || translation.title, loading: "lazy" }) })), _jsxs("div", { className: "content-streamline-list-content", children: [showDate && (_jsx("time", { className: "content-streamline-list-date", dateTime: post.created_at, children: date.toLocaleDateString('en-US', {
|
|
21
|
+
year: 'numeric',
|
|
22
|
+
month: 'short',
|
|
23
|
+
day: 'numeric',
|
|
24
|
+
}) })), _jsx("h3", { className: "content-streamline-list-title", children: renderTitle ? renderTitle(post, translation) : translation.title }), showExcerpt && translation.meta_description && (_jsx("p", { className: "content-streamline-list-excerpt", children: renderExcerpt
|
|
25
|
+
? renderExcerpt(post, translation)
|
|
26
|
+
: translation.meta_description }))] })] }) }, post.id));
|
|
27
27
|
}) }));
|
|
28
28
|
}
|
|
@@ -191,11 +191,13 @@
|
|
|
191
191
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.content-streamline-list-
|
|
195
|
-
display:
|
|
194
|
+
.content-streamline-list-link {
|
|
195
|
+
display: grid;
|
|
196
|
+
grid-template-columns: inherit;
|
|
197
|
+
gap: inherit;
|
|
196
198
|
text-decoration: none;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
color: inherit;
|
|
200
|
+
cursor: pointer;
|
|
199
201
|
}
|
|
200
202
|
|
|
201
203
|
.content-streamline-list-image {
|
|
@@ -236,15 +238,11 @@
|
|
|
236
238
|
font-weight: 600;
|
|
237
239
|
margin: 0 0 0.5rem 0;
|
|
238
240
|
line-height: 1.4;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.content-streamline-list-title a {
|
|
242
241
|
color: #111827;
|
|
243
|
-
text-decoration: none;
|
|
244
242
|
transition: color 0.2s ease;
|
|
245
243
|
}
|
|
246
244
|
|
|
247
|
-
.content-streamline-list-
|
|
245
|
+
.content-streamline-list-link:hover .content-streamline-list-title {
|
|
248
246
|
color: #3b82f6;
|
|
249
247
|
}
|
|
250
248
|
|
|
@@ -511,6 +509,11 @@
|
|
|
511
509
|
padding: 0.75rem;
|
|
512
510
|
}
|
|
513
511
|
|
|
512
|
+
.content-streamline-list-link {
|
|
513
|
+
grid-template-columns: inherit;
|
|
514
|
+
gap: inherit;
|
|
515
|
+
}
|
|
516
|
+
|
|
514
517
|
.content-streamline-list-title {
|
|
515
518
|
font-size: 0.9375rem;
|
|
516
519
|
}
|
|
@@ -545,6 +548,11 @@
|
|
|
545
548
|
gap: 0.75rem;
|
|
546
549
|
}
|
|
547
550
|
|
|
551
|
+
.content-streamline-list-link {
|
|
552
|
+
grid-template-columns: 1fr;
|
|
553
|
+
gap: 0.75rem;
|
|
554
|
+
}
|
|
555
|
+
|
|
548
556
|
.content-streamline-list-image {
|
|
549
557
|
aspect-ratio: 16 / 9;
|
|
550
558
|
}
|