Skip to content

Commit 6d3e2fc

Browse files
committed
Update stylings on my data page
1 parent 0d03c21 commit 6d3e2fc

3 files changed

Lines changed: 105 additions & 45 deletions

File tree

_TODO.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ https://mermaid.js.org/config/directives.html
127127
- /
128128
- /404
129129
- /about
130-
- /consent
131130
- /contact
132131
- /downloads/[slug]
133132
- /newsletter

src/components/Pages/MyData/index.astro

Lines changed: 69 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
---
2-
// import List from '@components/List/index.astro'
32
import Icon from '@components/Icon/index.astro'
4-
// import HeadingAnchor from '@components/Layout/HeadingAnchor/index.astro'
3+
import List from '@components/List/index.astro'
54
65
export type Props = {
76
content: {
87
header: {
98
title: string
109
description: string
1110
}
11+
intro: string
1212
introLinks: {
1313
privacyPolicyText: string
1414
consentPreferencesText: string
1515
}
16+
accessData: {
17+
heading: string
18+
description: string
19+
label: string
20+
buttonText: string
21+
},
22+
deleteData: {
23+
heading: string
24+
description: string
25+
label: string
26+
buttonText: string
27+
confirmText: string
28+
},
29+
next: {
30+
heading: string
31+
items: {
32+
lead: string
33+
text: string
34+
}[]
35+
}
1636
}
1737
}
1838
@@ -44,12 +64,15 @@ const { content } = Astro.props
4464
class="hidden rounded-xl border px-4 py-3 text-sm"
4565
></div>
4666

47-
<section class="bg-page-offset border border-trim rounded-2xl p-6" aria-labelledby="my-data-intro-title">
67+
<section
68+
class="flex flex-col items-center bg-page-offset border border-trim rounded-2xl p-6"
69+
aria-labelledby="my-data-intro-title"
70+
>
4871
<h2 class="sr-only" id="my-data-intro-title">Overview</h2>
4972
<p class="text-content-active">
50-
Use the forms below to request a copy of your data or request its deletion.
73+
{content.intro}
5174
</p>
52-
<div class="mt-4 flex justify-evenly">
75+
<div class="mt-4 flex justify-evenly gap-8">
5376
<a
5477
href="/privacy"
5578
class="text-page-inverse underline decoration-page-inverse decoration-dotted underline-offset-4 hover:text-secondary hover:decoration-secondary focus-visible:outline-2 focus-visible:outline-spotlight focus-visible:outline-offset-2"
@@ -66,32 +89,37 @@ const { content } = Astro.props
6689
</section>
6790

6891
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
69-
<section class="bg-content-inverse border border-trim rounded-2xl p-6 md:p-8" aria-labelledby="my-data-access-title">
70-
<h2 id="my-data-access-title" class="text-xl font-semibold mb-3">
71-
<span aria-hidden="true">📥</span> Access My Data
92+
<sectionclass
93+
class="bg-content-inverse border border-trim rounded-2xl p-2 md:p-4"
94+
aria-labelledby="my-data-access-title"
95+
>
96+
<h2 id="my-data-access-title" class="text-page-inverse text-xl font-semibold mb-3">
97+
{content.accessData.heading}
7298
</h2>
7399
<p class="text-content-active">
74-
Request a copy of personal data we have about you, including consent records and newsletter subscriptions.
100+
{content.accessData.description}
75101
</p>
76102

77103
<form id="access-form" class="mt-6 space-y-4" novalidate>
78104
<div class="space-y-2">
79-
<label for="access-email" class="block text-content-active text-sm font-medium">Email Address</label>
105+
<label for="access-email" class="block text-content-active text-sm font-medium">
106+
{content.accessData.label}
107+
</label>
80108
<input
81109
type="email"
82110
id="access-email"
83111
name="email"
84112
required
85113
placeholder="your@email.com"
86-
class="w-full rounded-md border border-trim bg-content-inverse px-3 py-2 placeholder:text-content-active focus:border-primary focus:ring-0 focus:outline-none transition-colors duration-200"
114+
class="w-full rounded-md border border-content bg-content-inverse px-3 py-2 placeholder:text-content-active focus:border-primary transition-colors duration-200"
87115
/>
88116
</div>
89117

90118
<button
91119
type="submit"
92-
class="inline-flex items-center justify-center rounded-xl px-6 py-3 bg-spotlight hover:bg-spotlight-offset text-white font-semibold transition-colors"
120+
class="inline-flex items-center justify-center rounded-xl px-6 py-3 bg-spotlight-offset hover:bg-spotlight text-white font-semibold transition-colors mt-8"
93121
>
94-
Request My Data
122+
{content.accessData.buttonText}
95123
</button>
96124

97125
<div
@@ -103,41 +131,52 @@ const { content } = Astro.props
103131
tabindex="-1"
104132
></div>
105133
</form>
106-
</section>
107-
108-
<section class="bg-content-inverse border border-trim rounded-2xl p-6 md:p-8" aria-labelledby="my-data-delete-title">
109-
<h2 id="my-data-delete-title" class="text-xl font-semibold mb-3">
110-
<span aria-hidden="true">🗑️</span> Delete My Data
134+
</sectionclass>
135+
136+
<section
137+
class="bg-content-inverse border border-trim rounded-2xl p-2 md:p-4"
138+
aria-labelledby="my-data-delete-title"
139+
>
140+
<h2 id="my-data-delete-title" class="text-page-inverse text-xl font-semibold mb-3">
141+
{content.deleteData.heading}
111142
</h2>
112143

113-
<div class="rounded-xl border border-warning bg-warning-inverse text-warning px-4 py-3 text-sm mb-4">
114-
<strong><span aria-hidden="true">⚠️</span> Warning:</strong> This will permanently delete all your data from our systems.
115-
This action cannot be undone.
144+
<div class="flex rounded-xl border border-warning bg-warning-inverse text-warning px-4 py-3 text-sm mb-4">
145+
<span class="mt-2">
146+
<Icon
147+
icon="warning"
148+
color="warning-offset"
149+
size={6}
150+
/>
151+
</span>
152+
<span class="ml-3">{content.deleteData.description}</span>
116153
</div>
117154

118-
<form id="delete-form" class="mt-6 space-y-4" novalidate>
155+
<form id="delete-form" class="mt-11 space-y-4" novalidate>
119156
<div class="space-y-2">
120-
<label for="delete-email" class="block text-content-active text-sm font-medium">Email Address</label>
157+
<label for="delete-email" class="block text-content-active text-sm font-medium">
158+
{content.deleteData.label}
159+
</label>
121160
<input
122161
type="email"
123162
id="delete-email"
124163
name="email"
125164
required
126165
placeholder="your@email.com"
127-
class="w-full rounded-md border border-trim bg-content-inverse px-3 py-2 placeholder:text-content-active focus:border-primary focus:ring-0 focus:outline-none transition-colors duration-200"
166+
class="w-full rounded-md border border-content bg-content-inverse px-3 py-2 placeholder:text-content-active transition-colors duration-200"
128167
/>
129168
</div>
130169

131170
<label class="flex items-start gap-3 text-sm">
132171
<input type="checkbox" id="confirm-delete" required class="mt-1" />
133-
<span>I understand this will permanently delete all my data</span>
172+
<span class="mt-0.5">{content.deleteData.confirmText}</span>
134173
</label>
135174

136175
<button
137176
type="submit"
138-
class="inline-flex items-center justify-center rounded-xl px-6 py-3 bg-danger text-white font-semibold hover:opacity-90 transition-colors"
177+
class="inline-flex items-center justify-center rounded-xl px-6 py-3 bg-danger-offset text-white font-semibold hover:bg-danger transition-colors"
139178
>
140-
Delete My Data
179+
{content.deleteData.buttonText}
141180
</button>
142181

143182
<div
@@ -152,22 +191,9 @@ const { content } = Astro.props
152191
</section>
153192
</div>
154193

155-
<section class="bg-page-offset border border-trim rounded-2xl p-6" aria-labelledby="my-data-next-title">
156-
<h2 id="my-data-next-title" class="text-xl font-semibold">What Happens Next?</h2>
157-
<ol class="mt-4 list-decimal ml-6 space-y-3 text-content-active">
158-
<li>
159-
<strong>Verification Email:</strong> We'll send a verification link to your email address.
160-
</li>
161-
<li>
162-
<strong>Click the Link:</strong> Click the link in the email to verify your request (expires in 24 hours).
163-
</li>
164-
<li>
165-
<strong>For Access Requests:</strong> Your data will be automatically downloaded as a JSON file.
166-
</li>
167-
<li>
168-
<strong>For Deletion Requests:</strong> Your data will be permanently removed and you'll see a confirmation.
169-
</li>
170-
</ol>
194+
<section class="border border-trim rounded-2xl p-6" aria-labelledby="my-data-next-title">
195+
<h2 id="my-data-next-title" class="text-page-inverse text-xl font-semibold mb-4">{content.next.heading}</h2>
196+
<List variant="numbered-with-background-list" items={content.next.items} />
171197
</section>
172198
</div>
173199
</privacy-form>

src/pages/privacy/my-data.astro

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,48 @@ const description =
1010
<BaseLayout pageTitle={pageTitle} path={path} description={description}>
1111
<PrivacyForm content={{
1212
header: {
13-
title: "My Data &amp; Privacy Rights",
13+
title: "My Data & Privacy Rights",
1414
description: "Under GDPR, you have the right to access and control your personal data.",
1515
},
16+
intro: "Use the forms below to request a copy of your data or request its deletion.",
1617
introLinks: {
1718
privacyPolicyText: 'Privacy Policy',
1819
consentPreferencesText: 'Consent Preferences',
1920
},
21+
accessData: {
22+
heading: "Access My Data",
23+
description: "Request a copy of personal data we have about you, including consent records and newsletter subscriptions.",
24+
label: "Email Address",
25+
buttonText: "Request My Data",
26+
},
27+
deleteData: {
28+
heading: "Delete My Data",
29+
description: "Request deletion of your personal data. We will process your request in accordance with GDPR guidelines.",
30+
label: "Email Address",
31+
buttonText: "Delete My Data",
32+
confirmText: "I understand this will permanently delete all my data",
33+
},
34+
next: {
35+
heading: "What Happens Next?",
36+
items: [
37+
{
38+
lead: "Verification Email:",
39+
text: "We'll send a verification link to your email address.",
40+
},
41+
{
42+
lead: "Click the Link:",
43+
text: "Click the link in the email to verify your request (expires in 24 hours).",
44+
},
45+
{
46+
lead: "For Access Requests:",
47+
text: "Your data will be automatically downloaded as a JSON file.",
48+
},
49+
{
50+
lead: "For Deletion Requests:",
51+
text: "Your data will be permanently removed and you'll see a confirmation.",
52+
},
53+
]
54+
}
2055
}} />
2156
</BaseLayout>
2257

0 commit comments

Comments
 (0)