Clean up footer with More Platforms menu
This commit is contained in:
+16
-4
@@ -433,6 +433,9 @@ function SiteFooter({ content }: { content: SiteContent }) {
|
||||
const amazonUrl = content.platformAmazonUrl || '/amazon'
|
||||
const creatorUrl = content.platformCreatorUrl || 'https://creators.spotify.com/pod/profile/nmemmert/'
|
||||
const facebookUrl = content.platformFacebookUrl || 'https://facebook.com/versebyversewithnate'
|
||||
const extraFooterLinks = (content.customLinks ?? []).filter(
|
||||
l => l.placement === 'footer' || l.placement === 'platforms',
|
||||
)
|
||||
|
||||
return (
|
||||
<footer className="site-footer">
|
||||
@@ -457,10 +460,19 @@ function SiteFooter({ content }: { content: SiteContent }) {
|
||||
<a href={creatorUrl} target="_blank" rel="noreferrer">Creator Profile</a>
|
||||
<span aria-hidden="true">·</span>
|
||||
<a href={facebookUrl} target="_blank" rel="noreferrer">Facebook</a>
|
||||
{(content.customLinks ?? []).filter(l => l.placement === 'footer').flatMap(l => [
|
||||
<span key={`sep-${l.id}`} aria-hidden="true">·</span>,
|
||||
<a key={l.id} href={l.url} target="_blank" rel="noreferrer">{l.label}</a>,
|
||||
])}
|
||||
{extraFooterLinks.length > 0 && (
|
||||
<>
|
||||
<span aria-hidden="true">·</span>
|
||||
<details className="footer-more-links">
|
||||
<summary>More Platforms</summary>
|
||||
<div className="footer-more-links-menu">
|
||||
{extraFooterLinks.map(link => (
|
||||
<a key={link.id} href={link.url} target="_blank" rel="noreferrer">{link.label}</a>
|
||||
))}
|
||||
</div>
|
||||
</details>
|
||||
</>
|
||||
)}
|
||||
</nav>
|
||||
<nav className="footer-links footer-links--legal" aria-label="Legal links">
|
||||
<Link to="/privacy">Privacy Policy</Link>
|
||||
|
||||
Reference in New Issue
Block a user