Skip to content

Commit 0d78475

Browse files
committed
Add PDF image to Download CTA component
1 parent 5fe7249 commit 0d78475

2 files changed

Lines changed: 18 additions & 105 deletions

File tree

‎src/components/CallToAction/Download/README.md‎

Lines changed: 0 additions & 99 deletions
This file was deleted.

‎src/components/CallToAction/Download/index.astro‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
* download page, which is implemented by Forms/Download.
55
*/
66
import { BuildError } from '@lib/errors/BuildError'
7+
import { Image } from 'astro:assets'
78
import Button from '@components/Button/index.astro'
89
import List from '@components/List/index.astro'
910
import Icon from '@components/Icon/index.astro'
11+
import pdfDownloadImg from '@assets/images/pdf-download.jpg'
1012
1113
export interface Props {
1214
/** Optional base id for internal aria relationships */
@@ -95,15 +97,25 @@ const downloadUrl = `/downloads/${normalizedResource}`
9597

9698
<div class="lg:w-72 lg:shrink-0">
9799
<div class="bg-content-inverse rounded-xl border border-trim p-5 shadow-sm">
98-
<div class="text-center mb-4">
99-
<div class="w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3">
100+
<div class="flex text-center mb-4">
101+
<div class="w-20 h-20 rounded-lg overflow-hidden ml-2 mb-3">
102+
<Image
103+
src={pdfDownloadImg}
104+
alt="PDF download"
105+
width={80}
106+
height={80}
107+
class="w-full h-full object-cover"
108+
/>
109+
</div>
110+
<div class="flex flex-col justify-start items-center gap-2 mx-auto mt-2 text-trim">
111+
<p class="text-sm leading-none">Free resource</p>
100112
<Icon
101-
icon={"document"}
102-
size={8}
103-
color={"primary-offset"}
113+
icon={"lightning"}
114+
size={5}
115+
color={"text-trim"}
104116
/>
117+
<p class="text-sm leading-none">Instant access</p>
105118
</div>
106-
<p class="text-xs text-content">Free resource · Instant access</p>
107119
</div>
108120

109121
<div class="space-y-3">

0 commit comments

Comments
 (0)