Refine sharing and cookie consent button styles

This commit is contained in:
nmemmert
2026-04-12 19:03:07 -04:00
parent 770d2357ac
commit 6e8b360398
2 changed files with 73 additions and 2 deletions
+35 -2
View File
@@ -458,6 +458,25 @@
padding: 0; padding: 0;
} }
.share-show-wrap {
margin-top: 1rem;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.45rem;
}
.btn-share-show {
width: fit-content;
}
.share-feedback {
margin: 0;
font-family: 'Barlow Condensed', sans-serif;
color: #cdb483;
font-size: 0.9rem;
}
.qr-code-wrap { .qr-code-wrap {
text-align: center; text-align: center;
flex-shrink: 0; flex-shrink: 0;
@@ -1324,8 +1343,22 @@
.consent-actions .btn-primary, .consent-actions .btn-primary,
.consent-actions .btn-secondary { .consent-actions .btn-secondary {
font-size: 0.85rem; font-size: 1rem;
padding: 0.55rem 1rem; padding: 0.75rem 1.4rem;
min-width: 140px;
justify-content: center;
}
.consent-actions .btn-secondary {
color: #c8860a;
border-color: rgba(200, 134, 10, 0.55);
background: transparent;
}
.consent-actions .btn-secondary:hover {
color: #0a0a0a;
background: #c8860a;
border-color: #c8860a;
} }
.admin-form { .admin-form {
+38
View File
@@ -240,6 +240,43 @@ function AnalyticsConsentBanner() {
) )
} }
function ShareShowButton() {
const [feedback, setFeedback] = useState('')
async function handleShare() {
const shareUrl = window.location.origin
const shareTitle = 'Verse by Verse with Nate'
const shareText = 'Check out Verse by Verse with Nate.'
try {
if (navigator.share) {
await navigator.share({ title: shareTitle, text: shareText, url: shareUrl })
setFeedback('Shared successfully.')
return
}
if (navigator.clipboard?.writeText) {
await navigator.clipboard.writeText(shareUrl)
setFeedback('Link copied. Share it with a friend.')
return
}
setFeedback(`Copy this link: ${shareUrl}`)
} catch {
setFeedback('Share canceled.')
}
}
return (
<div className="share-show-wrap">
<button type="button" className="btn-primary btn-share-show" onClick={handleShare}>
Share the Show
</button>
{feedback && <p className="share-feedback">{feedback}</p>}
</div>
)
}
function LandingPage({ content }: { content: SiteContent }) { function LandingPage({ content }: { content: SiteContent }) {
return ( return (
<div className="site"> <div className="site">
@@ -446,6 +483,7 @@ function LandingPage({ content }: { content: SiteContent }) {
> >
creators.spotify.com/pod/profile/nmemmert creators.spotify.com/pod/profile/nmemmert
</a> </a>
<ShareShowButton />
</div> </div>
<div className="qr-code-wrap"> <div className="qr-code-wrap">
<div className="qr-frame"> <div className="qr-frame">