astro-tractstack 2.0.0-rc.56 → 2.0.0-rc.57
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/package.json
CHANGED
|
@@ -12,7 +12,6 @@ export interface Props {
|
|
|
12
12
|
|
|
13
13
|
const { options, contentMap } = Astro.props;
|
|
14
14
|
|
|
15
|
-
// Parse component options
|
|
16
15
|
let parsedOptions;
|
|
17
16
|
try {
|
|
18
17
|
parsedOptions = JSON.parse(options?.params?.options || '{}');
|
|
@@ -23,8 +22,6 @@ try {
|
|
|
23
22
|
|
|
24
23
|
const slug = parsedOptions.slug || '';
|
|
25
24
|
|
|
26
|
-
// Find the featured story from the contentMap
|
|
27
|
-
// It must have a description, panes, AND a thumbnail image to be valid
|
|
28
25
|
const featuredStory = contentMap.find(
|
|
29
26
|
(item: FullContentMapItem) =>
|
|
30
27
|
item.slug === slug &&
|
|
@@ -38,13 +35,10 @@ const featuredStory = contentMap.find(
|
|
|
38
35
|
|
|
39
36
|
{
|
|
40
37
|
featuredStory ? (
|
|
41
|
-
<div class="mx-auto w-full max-w-7xl px-8 py-
|
|
42
|
-
{/* A robust grid layout that ensures spacing and alignment */}
|
|
38
|
+
<div class="mx-auto w-full max-w-7xl px-8 py-12">
|
|
43
39
|
<div class="grid grid-cols-1 items-center gap-x-16 gap-y-12 md:grid-cols-2">
|
|
44
|
-
{/* --- TEXT COLUMN --- */}
|
|
45
40
|
<div class="w-full">
|
|
46
41
|
<a href={`/${featuredStory.slug}`} class="block">
|
|
47
|
-
{/* Constrained width for readability */}
|
|
48
42
|
<div class="max-w-lg pr-12">
|
|
49
43
|
<p class="font-action mb-4 text-lg font-bold uppercase text-gray-500">
|
|
50
44
|
Featured Article
|
|
@@ -72,9 +66,7 @@ const featuredStory = contentMap.find(
|
|
|
72
66
|
</a>
|
|
73
67
|
</div>
|
|
74
68
|
|
|
75
|
-
{/* --- IMAGE COLUMN --- */}
|
|
76
69
|
<div class="w-full py-6">
|
|
77
|
-
{/* Max width constraint on the image container */}
|
|
78
70
|
<div class="mx-auto max-w-2xl">
|
|
79
71
|
<a href={`/${featuredStory.slug}`}>
|
|
80
72
|
<img
|
|
@@ -292,7 +292,7 @@ export default function SearchWidget({ fullContentMap }: SearchWidgetProps) {
|
|
|
292
292
|
);
|
|
293
293
|
|
|
294
294
|
return (
|
|
295
|
-
<div className="mx-auto max-w-7xl px-4 py-
|
|
295
|
+
<div className="mx-auto max-w-7xl px-4 py-2">
|
|
296
296
|
<div className={searchResults ? `rounded-xl border-2 p-6 md:p-12` : ``}>
|
|
297
297
|
<div
|
|
298
298
|
className={`relative mx-auto mb-8 ${!searchResults ? `max-w-5xl` : ``}`}
|