Skip to content

Commit b363f5a

Browse files
authored
Add compliance links to footer (#79)
1 parent 5fdd727 commit b363f5a

1 file changed

Lines changed: 80 additions & 18 deletions

File tree

packages/demo/src/components/Footer.tsx

Lines changed: 80 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,17 @@ const useStyles = makeStyles({
3232
link: {
3333
color: 'var(--color-text-light)',
3434
textDecoration: 'none',
35-
fontSize: tokens.fontSizeBase300,
3635
transition: 'color var(--transition-speed) ease',
36+
'&.top-section': {
37+
fontSize: tokens.fontSizeBase300,
38+
},
39+
'&.bottom-section': {
40+
fontSize: tokens.fontSizeBase200,
41+
},
3742
'&:hover': {
3843
color: 'var(--color-primary)',
3944
},
4045
},
41-
copyright: {
42-
textAlign: 'center',
43-
color: 'var(--color-text-light)',
44-
fontSize: tokens.fontSizeBase300,
45-
marginTop: 'calc(var(--spacing-unit) * 4)',
46-
},
4746
list: {
4847
listStyle: 'none',
4948
padding: 0,
@@ -53,6 +52,27 @@ const useStyles = makeStyles({
5352
alignItems: 'center',
5453
gap: 'calc(var(--spacing-unit) * 2)',
5554
},
55+
bottomRowContainer: {
56+
maxWidth: '1200px',
57+
margin: '16px auto 0',
58+
width: '100%',
59+
},
60+
bottomRow: {
61+
borderTop: 'var(--border-width) solid var(--color-border)',
62+
display: 'flex',
63+
flexDirection: 'row',
64+
alignItems: 'center',
65+
justifyContent: 'flex-end',
66+
gap: '24px',
67+
padding: '16px',
68+
color: 'var(--color-text-light)',
69+
marginTop: '0',
70+
},
71+
copyright: {
72+
marginLeft: 'auto',
73+
color: 'var(--color-text-light)',
74+
fontSize: tokens.fontSizeBase200,
75+
},
5676
});
5777

5878
export function Footer(): JSX.Element {
@@ -67,31 +87,37 @@ export function Footer(): JSX.Element {
6787
<ul className={styles.list}>
6888
{currentUser ? (
6989
<li>
70-
<Link to={`/profile/${currentUser.id}`} className={styles.link}>
90+
<Link
91+
to={`/profile/${currentUser.id}`}
92+
className={`${styles.link} top-section`}
93+
>
7194
View Profile
7295
</Link>
7396
</li>
7497
) : (
7598
<li>
76-
<Link to="/get-started" className={styles.link}>
99+
<Link
100+
to="/get-started"
101+
className={`${styles.link} top-section`}
102+
>
77103
Consent Demo
78104
</Link>
79105
</li>
80106
)}
81107
<li>
82-
<Link to="/policies" className={styles.link}>
108+
<Link to="/policies" className={`${styles.link} top-section`}>
83109
Admin Demo
84110
</Link>
85111
</li>
86112
<li>
87-
<Link to="/playground" className={styles.link}>
113+
<Link to="/playground" className={`${styles.link} top-section`}>
88114
Playground
89115
</Link>
90116
</li>
91117
<li>
92118
<Link
93119
to="https://github.com/microsoft/Open-Source-Consent-Package/tree/main/docs"
94-
className={styles.link}
120+
className={`${styles.link} top-section`}
95121
target="_blank"
96122
rel="noopener noreferrer"
97123
>
@@ -106,7 +132,7 @@ export function Footer(): JSX.Element {
106132
<li>
107133
<Link
108134
to="https://github.com/microsoft/Open-Source-Consent-Package"
109-
className={styles.link}
135+
className={`${styles.link} top-section`}
110136
target="_blank"
111137
rel="noopener noreferrer"
112138
>
@@ -116,7 +142,7 @@ export function Footer(): JSX.Element {
116142
<li>
117143
<Link
118144
to="https://github.com/microsoft/Open-Source-Consent-Package/issues"
119-
className={styles.link}
145+
className={`${styles.link} top-section`}
120146
target="_blank"
121147
rel="noopener noreferrer"
122148
>
@@ -131,7 +157,7 @@ export function Footer(): JSX.Element {
131157
<li>
132158
<Link
133159
to="https://github.com/microsoft/Open-Source-Consent-Package/blob/main/SECURITY.md"
134-
className={styles.link}
160+
className={`${styles.link} top-section`}
135161
target="_blank"
136162
rel="noopener noreferrer"
137163
>
@@ -141,7 +167,7 @@ export function Footer(): JSX.Element {
141167
<li>
142168
<Link
143169
to="https://github.com/microsoft/Open-Source-Consent-Package/blob/main/LICENSE"
144-
className={styles.link}
170+
className={`${styles.link} top-section`}
145171
target="_blank"
146172
rel="noopener noreferrer"
147173
>
@@ -151,8 +177,44 @@ export function Footer(): JSX.Element {
151177
</ul>
152178
</div>
153179
</div>
154-
<div className={styles.copyright}>
155-
© {new Date().getFullYear()} Microsoft. All rights reserved.
180+
<div className={styles.bottomRowContainer}>
181+
<div className={styles.bottomRow}>
182+
<a
183+
href="https://go.microsoft.com/fwlink/?LinkId=521839"
184+
className={`${styles.link} bottom-section`}
185+
target="_blank"
186+
rel="noopener noreferrer"
187+
>
188+
Privacy & Cookies
189+
</a>
190+
<a
191+
href="https://go.microsoft.com/fwlink/?linkid=2259814"
192+
className={`${styles.link} bottom-section`}
193+
target="_blank"
194+
rel="noopener noreferrer"
195+
>
196+
Consumer Health Privacy
197+
</a>
198+
<a
199+
href="https://www.microsoft.com/trademarks"
200+
className={`${styles.link} bottom-section`}
201+
target="_blank"
202+
rel="noopener noreferrer"
203+
>
204+
Trademarks
205+
</a>
206+
<a
207+
href="https://go.microsoft.com/fwlink/?LinkID=206977"
208+
className={`${styles.link} bottom-section`}
209+
target="_blank"
210+
rel="noopener noreferrer"
211+
>
212+
Terms of use
213+
</a>
214+
<span className={styles.copyright}>
215+
&copy; Microsoft {new Date().getFullYear()}
216+
</span>
217+
</div>
156218
</div>
157219
</footer>
158220
);

0 commit comments

Comments
 (0)