Skip to content

Commit 9ec10d4

Browse files
committed
Merge pull request #974 from NalinDalal/2.0
Fix `<ul>` and `<ol>` Direct Children for HTML Compliance
1 parent 8a532cc commit 9ec10d4

File tree

2 files changed

+34
-16
lines changed

2 files changed

+34
-16
lines changed

src/components/RelatedItems/index.astro

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,35 @@ const { title, items, class: className } = Astro.props;
2626
<section class={className}>
2727
<h2>{title}</h2>
2828
<ul class="content-grid-simple">
29-
{
30-
items.map((i) => {
31-
if (isCurationResponse(i)) {
32-
return <GridItemSketch item={i} />;
33-
}
34-
switch (i.collection) {
35-
case "reference":
36-
return <GridItemReference item={i} />;
37-
case "examples":
38-
return <GridItemExample item={i} />;
39-
case "events":
40-
return <GridItemEvent item={i} />;
41-
}
42-
})
43-
}
29+
{items.map((i) => {
30+
if (isCurationResponse(i)) {
31+
return (
32+
<li>
33+
<GridItemSketch item={i} />
34+
</li>
35+
);
36+
}
37+
switch (i.collection) {
38+
case "reference":
39+
return (
40+
<li>
41+
<GridItemReference item={i} />
42+
</li>
43+
);
44+
case "examples":
45+
return (
46+
<li>
47+
<GridItemExample item={i} />
48+
</li>
49+
);
50+
case "events":
51+
return (
52+
<li>
53+
<GridItemEvent item={i} />
54+
</li>
55+
);
56+
}
57+
})}
4458
</ul>
4559
</section>
4660
</div>

src/layouts/SketchesLayout.astro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ const { entries, totalNumSketches, currentPage } = Astro.props;
2626
<BaseLayout title="Sketches" variant="item" topic="community">
2727
<section>
2828
<ul class="content-grid-simple">
29-
{entries.map((entry) => <GridItemSketch item={entry} />)}
29+
{entries.map((entry) => (
30+
<li>
31+
<GridItemSketch item={entry} />
32+
</li>
33+
))}
3034
</ul>
3135
<PaginationNav
3236
maxNumItems={totalNumSketches}

0 commit comments

Comments
 (0)