@@ -50,8 +50,8 @@ const icons = [ |
50 | 50 |
|
51 | 51 | const sha = process.env.NEXT_PUBLIC_COMMIT_SHA ?? "dev"; |
52 | 52 |
|
53 | | -function ext(href: string) { |
54 | | - return href.startsWith("http") || href.startsWith("mailto:"); |
| 53 | +function isExternal(href: string) { |
| 54 | + return href.startsWith("http"); |
55 | 55 | } |
56 | 56 |
|
57 | 57 | function LinkCol({ title, links }: { title: string; links: { label: string; href: string }[] }) { |
@@ -68,21 +68,21 @@ function LinkCol({ title, links }: { title: string; links: { label: string; href |
68 | 68 | gap: 14, |
69 | 69 | }} |
70 | 70 | >gt; |
71 | | - {links.map((link) =>gt; ( |
72 | | - li key={link.label}>gt; |
73 | | - {ext(link.href) ? ( |
| 71 | + {links.map((l) =>gt; ( |
| 72 | + li key={l.label}>gt; |
| 73 | + {isExternal(l.href) ? ( |
74 | 74 | a |
75 | | - href={link.href} |
| 75 | + href={l.href} |
76 | 76 | target="_blank" |
77 | 77 | rel="noopener noreferrer" |
78 | 78 | className="footer-link" |
79 | 79 | style={footerLinkStyles} |
80 | 80 | >gt; |
81 | | - {link.label} |
| 81 | + {l.label} |
82 | 82 | a>gt; |
83 | 83 | ) : ( |
84 | | - Link href={link.href} className="footer-link" style={footerLinkStyles}>gt; |
85 | | - {link.label} |
| 84 | + Link href={l.href} className="footer-link" style={footerLinkStyles}>gt; |
| 85 | + {l.label} |
86 | 86 | Link>gt; |
87 | 87 | )} |
88 | 88 | li>gt; |
@@ -93,6 +93,8 @@ function LinkCol({ title, links }: { title: string; links: { label: string; href |
93 | 93 | } |
94 | 94 |
|
95 | 95 | export function Footer() { |
| 96 | + const year = new Date().getFullYear(); |
| 97 | + |
96 | 98 | return ( |
97 | 99 | footer |
98 | 100 | className="site-footer" |
@@ -112,10 +114,9 @@ export function Footer() { |
112 | 114 | Image |
113 | 115 | className="site-footer-illustration" |
114 | 116 | src="/assets/footer.webp" |
115 | | - alt="footer illustration" |
116 | | - loading="lazy" |
117 | | - width={2048} |
118 | | - height={1680} |
| 117 | + alt="" |
| 118 | + width={680} |
| 119 | + height={558} |
119 | 120 | style={{ |
120 | 121 | position: "absolute", |
121 | 122 | right: 0, |
@@ -144,13 +145,15 @@ export function Footer() { |
144 | 145 | style={{ display: "flex", flexDirection: "column", gap: 0, flexShrink: 0, width: 280 }} |
145 | 146 | >gt; |
146 | 147 | div style={{ marginBottom: 28 }}>gt; |
147 | | - Image |
148 | | - src="/assets/hackClubFlag.svg" |
149 | | - alt="Hack Club" |
150 | | - width={200} |
151 | | - height={70} |
152 | | - style={{ display: "block", objectFit: "contain" }} |
153 | | - />gt; |
| 148 | + Link href="/">gt; |
| 149 | + Image |
| 150 | + src="/assets/hackClubFlag.svg" |
| 151 | + alt="Hack Club" |
| 152 | + width={200} |
| 153 | + height={70} |
| 154 | + style={{ display: "block", objectFit: "contain" }} |
| 155 | + />gt; |
| 156 | + Link>gt; |
154 | 157 | div>gt; |
155 | 158 | p |
156 | 159 | style={{ |
@@ -166,6 +169,7 @@ export function Footer() { |
166 | 169 | p>gt; |
167 | 170 | a |
168 | 171 | href="tel:18556254225" |
| 172 | + aria-label="Call Hack Club toll-free at 1-855-625-4225" |
169 | 173 | style={{ |
170 | 174 | fontWeight: 400, |
171 | 175 | fontSize: 20, |
@@ -180,13 +184,13 @@ export function Footer() { |
180 | 184 | 1-855-625-HACK (call toll-free) |
181 | 185 | a>gt; |
182 | 186 | div style={{ display: "flex", gap: 12 }}>gt; |
183 | | - {icons.map((icon) =>gt; ( |
| 187 | + {icons.map((i) =>gt; ( |
184 | 188 | a |
185 | | - key={icon.label} |
186 | | - href={icon.href} |
187 | | - target={ext(icon.href) ? "_blank" : undefined} |
188 | | - rel={ext(icon.href) ? "noopener noreferrer" : undefined} |
189 | | - aria-label={icon.label} |
| 189 | + key={i.label} |
| 190 | + href={i.href} |
| 191 | + target={isExternal(i.href) ? "_blank" : undefined} |
| 192 | + rel={isExternal(i.href) ? "noopener noreferrer" : undefined} |
| 193 | + aria-label={i.label} |
190 | 194 | className="footer-social-link" |
191 | 195 | style={{ |
192 | 196 | display: "flex", |
@@ -201,7 +205,7 @@ export function Footer() { |
201 | 205 | color: "#fff", |
202 | 206 | }} |
203 | 207 | >gt; |
204 | | - Icon glyph={icon.glyph} size={48} />gt; |
| 208 | + Icon glyph={i.glyph} size={48} />gt; |
205 | 209 | a>gt; |
206 | 210 | ))} |
207 | 211 | div>gt; |
@@ -223,7 +227,7 @@ export function Footer() { |
223 | 227 | lineHeight: 1.5, |
224 | 228 | }} |
225 | 229 | >gt; |
226 | | - © 2026 Hack Club. Registered under{" "} |
| 230 | + © {year} Hack Club. Registered under{" "} |
227 | 231 | a |
228 | 232 | href="https://the.hackfoundation.org/" |
229 | 233 | target="_blank" |
@@ -250,7 +254,7 @@ export function Footer() { |
250 | 254 | .footer-social-link:hover, .footer-social-link:focus-visible { opacity: 1 !important; } |
251 | 255 | @media (max-width: 767px) { |
252 | 256 | .site-footer { padding-top: 120px !important; } |
253 | | - .site-footer-illustration { width: min(320px, 72vw) !important; height: auto !important; transform: translateY(-40%) !important; } |
| 257 | + .site-footer-illustration { width: min(320px, 72vw) !important; transform: translateY(-40%) !important; } |
254 | 258 | } |
255 | 259 | `}style>gt; |
256 | 260 | footer>gt; |
|
0 commit comments