Skip to content

Commit 552f371

Browse files
committed
Changed footer credits to 'Website Made By' and moved styling from FooterLinkElement to Footer SCSS. Fixed placeholder link width issue when initiative image is missing.
1 parent e5ccd89 commit 552f371

File tree

2 files changed

+38
-46
lines changed

2 files changed

+38
-46
lines changed

components/Footer.js

Lines changed: 32 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -98,50 +98,36 @@ function Footer() {
9898
<a className={styles['link-footer']} href="mailto: [email protected]">
9999
<span className="footer-text">[email protected]</span>
100100
</a>
101-
<h3 className={styles['footer-header']}>Made By</h3>
102-
<ul
103-
className={`list-unstyled text-left ${styles['footer-committee-sidebar-container']}`}
104-
>
105-
<li
106-
key={footerInitiativeLinks[0].slug} style={{ textAlign: 'center', width: '100%' }}
107-
>
108-
<FooterLinkElement
109-
path={footerInitiativeLinks[0].path}
110-
title={
111-
footerInitiativeLinks[0].useImage ? (
112-
<div
113-
style={{
114-
textAlign: 'center',
115-
display: 'flex',
116-
justifyContent: 'center',
117-
}}
118-
>
119-
<img
120-
className="committee-sidebar-image"
121-
src={footerInitiativeLinks[0].wordmark_dark}
122-
alt={`ACM ${footerInitiativeLinks[0].name}`}
123-
style={{
124-
margin: '0 auto',
125-
transform: 'translateX(-7px) scale(0.85)',
126-
}}
127-
onError={(e) => {
128-
e.target.onerror = null;
129-
e.target.style.display = 'none';
130-
const parentNode = e.target.parentNode;
131-
parentNode.textContent = `ACM ${footerInitiativeLinks[0].name}`;
132-
parentNode.style.textAlign = 'center';
133-
parentNode.style.display = 'block';
134-
}}
135-
/>
136-
</div>
137-
) : (
138-
<span style={{ display: 'block', textAlign: 'center' }}>ACM {footerInitiativeLinks[0].name}</span>
139-
)
140-
}
141-
ext={false}
142-
/>
143-
</li>
144-
</ul>
101+
<h3 className={styles['footer-header']}>Website Made By</h3>
102+
<FooterLinkElement
103+
path={footerInitiativeLinks[0].path}
104+
title={
105+
footerInitiativeLinks[0].useImage ? (
106+
<div className={styles['footer-image-container']}>
107+
<img
108+
className="committee-sidebar-image"
109+
src={footerInitiativeLinks[0].wordmark_dark}
110+
alt={`ACM ${footerInitiativeLinks[0].name}`}
111+
style={{
112+
margin: '0 auto',
113+
transform: 'translateX(-3px) scale(0.85)',
114+
}}
115+
onError={(e) => {
116+
e.target.onerror = null;
117+
e.target.style.display = 'none';
118+
const parentNode = e.target.parentNode;
119+
parentNode.textContent = `ACM ${footerInitiativeLinks[0].name}`;
120+
parentNode.style.textAlign = 'center';
121+
parentNode.style.display = 'block';
122+
}}
123+
/>
124+
</div>
125+
) : (
126+
<span className="footer-text">ACM {footerInitiativeLinks[0].name}</span>
127+
)
128+
}
129+
ext={false}
130+
/>
145131
</div>
146132
<div>
147133
<h3 className={styles['footer-header']}>About ACM at UCLA</h3>
@@ -163,7 +149,7 @@ function Footer() {
163149
path={initiative.path}
164150
title={
165151
initiative.useImage ? (
166-
<div style={{ textAlign: 'center', display: 'flex', justifyContent: 'center' }}>
152+
<div className={styles['footer-image-container']}>
167153
<img
168154
className="committee-sidebar-image"
169155
src={initiative.wordmark_dark}
@@ -184,7 +170,7 @@ function Footer() {
184170
/>
185171
</div>
186172
) : (
187-
<span style={{ display: 'block', textAlign: 'center' }}>ACM {initiative.name}</span>
173+
<span className="footer-text">ACM {initiative.name}</span>
188174
)
189175
}
190176
ext={false}

styles/components/Footer.module.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,9 @@
4141
.display-inline {
4242
display: inline;
4343
}
44+
45+
.footer-image-container {
46+
text-align: center;
47+
display: flex;
48+
justify-content: center;
49+
}

0 commit comments

Comments
 (0)