Fix homepage external link placement and publish sanitization
This commit is contained in:
+32
-2
@@ -494,7 +494,7 @@ function SiteFooter({ content }: { content: SiteContent }) {
|
||||
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',
|
||||
l => l.placement === 'footer' || l.placement === 'platforms' || l.placement === 'otherSites',
|
||||
)
|
||||
|
||||
return (
|
||||
@@ -524,7 +524,7 @@ function SiteFooter({ content }: { content: SiteContent }) {
|
||||
<>
|
||||
<span aria-hidden="true">·</span>
|
||||
<details className="footer-more-links">
|
||||
<summary>More Platforms</summary>
|
||||
<summary>More Links</summary>
|
||||
<div className="footer-more-links-menu">
|
||||
{extraFooterLinks.map(link => (
|
||||
<a key={link.id} href={link.url} target="_blank" rel="noreferrer">{link.label}</a>
|
||||
@@ -950,6 +950,34 @@ function CustomBlocksSection({ content, page }: { content: SiteContent; page: st
|
||||
)
|
||||
}
|
||||
|
||||
function ExternalSitesSection({ content }: { content: SiteContent }) {
|
||||
const links = (content.customLinks ?? []).filter(link => link.placement === 'externalSites')
|
||||
if (links.length === 0) return null
|
||||
|
||||
return (
|
||||
<section className="section-resources" aria-label="External sites">
|
||||
<div className="section-inner">
|
||||
<div className="download-library-head">
|
||||
<p className="eyebrow">Homepage Links</p>
|
||||
<h2 className="section-heading">External sites and ministries worth checking out.</h2>
|
||||
<p className="download-library-copy">These links are shown on the homepage, separate from the footer menu.</p>
|
||||
</div>
|
||||
<div className="resources-list">
|
||||
{links.map(link => (
|
||||
<a key={link.id} href={link.url} target="_blank" rel="noreferrer" className="resource-link">
|
||||
<div className="resource-download-meta">
|
||||
<span className="resource-link-label">{link.label}</span>
|
||||
{link.description && <p className="resource-link-description">{link.description}</p>}
|
||||
<span className="resource-link-action">Open external site →</span>
|
||||
</div>
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
function LandingPage({ content }: { content: SiteContent }) {
|
||||
const featuredStudy = getHomepageFeaturedStudy(content)
|
||||
|
||||
@@ -1068,6 +1096,8 @@ function LandingPage({ content }: { content: SiteContent }) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<ExternalSitesSection content={content} />
|
||||
|
||||
<section className="section-home-jump" aria-label="Homepage navigation">
|
||||
<div className="section-inner">
|
||||
<div className="home-jump-head">
|
||||
|
||||
Reference in New Issue
Block a user