Skip to content

Commit ffef103

Browse files
committed
Add List layout for downloads pages
1 parent 04499b2 commit ffef103

6 files changed

Lines changed: 450 additions & 7 deletions

File tree

‎_TODO.md‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,7 @@ This article has different approaches to [print pagination](https://www.customjs
264264

265265
- Social shares - module CSS doesn't appear correct with nested button hover classes, not sure how network name is generated or styled but it needs improvement. Should be rendered inside article content column, not across both content and TOC columns.
266266

267-
268-
### Component Stylings
267+
### Component Stylings
269268

270269
The bottom margin issues on CTAs need to handle paragraphs differently than headers. Headers are properly spaced now; paragraphs are flush with the CTA with no top margin.
271270

@@ -276,5 +275,3 @@ The bottom margin issues on CTAs need to handle paragraphs differently than head
276275
- Callouts should get round corners like the Download and Newsletter CTAs
277276

278277
- Tags need styled at the top of articles item view pages
279-
280-
<Newsletter />

‎src/components/List/index.astro‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import CardGridList from '@components/List/layouts/CardGridList.astro'
55
import CheckIconsList from '@components/List/layouts/CheckIconsList.astro'
66
import ChevronList from '@components/List/layouts/ChevronList.astro'
77
import ColoredMarkerList from '@components/List/layouts/ColoredMarkerList.astro'
8+
import DownloadPageList from '@components/List/layouts/DownloadPageList.astro'
89
import NumberedWithBackgroundList from '@components/List/layouts/NumberedWithBackgroundList.astro'
910
import PlainIconList from '@components/List/layouts/PlainIconList.astro'
1011
import SideBySideList from '@components/List/layouts/SideBySideList.astro'
@@ -65,6 +66,7 @@ const itemsWithIconAndColor = items as Array<{
6566
{variant === 'check-icons-list' && <CheckIconsList items={items} {...classesProps} />}
6667
{variant === 'chevron-list' && <ChevronList items={items} {...classesProps} />}
6768
{variant === 'colored-marker-list' && <ColoredMarkerList items={itemsWithColor} {...classesProps} {...sizeProps} />}
69+
{variant === 'download-page-list' && <DownloadPageList items={itemsWithIconAndColor} {...classesProps} {...sizeProps} />}
6870
{variant === 'numbered-with-background-list' && <NumberedWithBackgroundList items={items} {...classesProps} />}
6971
{variant === 'plain-icon-list' && <PlainIconList items={itemsWithIconAndColor} {...classesProps} {...sizeProps} />}
7072
{variant === 'side-by-side-list' && <SideBySideList items={items} {...classesProps} />}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
export type Props = {
3+
items: {
4+
text: string
5+
}[]
6+
}
7+
8+
const { items } = Astro.props
9+
10+
const ulClass = ["list-disc pl-0 space-y-3 mb-0 mt-2"]
11+
const liClass = ["flex items-start gap-3"]
12+
---
13+
14+
<ul class:list={ulClass}>
15+
{
16+
items.map(({ text }) => (
17+
<li class:list={liClass}>
18+
<span>{text}</span>
19+
</li>
20+
))
21+
}
22+
</ul>

‎src/components/List/layouts/PlainIconList.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ const markerClasses = props.classes?.svg
3232
</li>
3333
))
3434
}
35-
</ul>
35+
</ul>

‎src/pages/downloads/branding.png‎

-10.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)