feat: Dynamic footer based on vertical
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
This commit is contained in:
parent
9914fdb802
commit
b2c1ce6ef5
1 changed files with 102 additions and 9 deletions
|
|
@ -1,6 +1,87 @@
|
||||||
|
"use client"
|
||||||
|
|
||||||
import Link from "next/link"
|
import Link from "next/link"
|
||||||
|
import { useVertical } from "@/contexts/vertical-context"
|
||||||
|
|
||||||
|
// Configuration for band-specific footer links
|
||||||
|
const VERTICAL_LINKS: Record<string, {
|
||||||
|
listen: { name: string, url: string }[],
|
||||||
|
community: { name: string, url: string }[]
|
||||||
|
}> = {
|
||||||
|
"goose": {
|
||||||
|
listen: [
|
||||||
|
{ name: "Nugs.net", url: "https://www.nugs.net/goose-concerts-live-downloads-in-mp3-flac-or-online-music-streaming/" },
|
||||||
|
{ name: "Bandcamp", url: "https://goosetheband.bandcamp.com" },
|
||||||
|
{ name: "Spotify", url: "https://open.spotify.com/artist/6qqNVTkY8uBg9cP3Jd7DAH" },
|
||||||
|
{ name: "Relisten", url: "https://relisten.net/goose" }
|
||||||
|
],
|
||||||
|
community: [
|
||||||
|
{ name: "ElGoose.net", url: "https://elgoose.net" },
|
||||||
|
{ name: "Reddit", url: "https://www.reddit.com/r/GooseTheBand" },
|
||||||
|
{ name: "Wysteria Lane", url: "https://wysterialane.org" },
|
||||||
|
{ name: "WTED Radio", url: "https://wtedradio.com" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dead-and-company": {
|
||||||
|
listen: [
|
||||||
|
{ name: "Nugs.net", url: "https://www.nugs.net/dead-and-company-concerts-live-downloads-in-mp3-flac-or-online-music-streaming/" },
|
||||||
|
{ name: "Spotify", url: "https://open.spotify.com/artist/6z5WJ8c8e1d5u5u5u5u5u5" }, // Verify ID
|
||||||
|
{ name: "Relisten", url: "https://relisten.net/dead-and-company" }
|
||||||
|
],
|
||||||
|
community: [
|
||||||
|
{ name: "Reddit", url: "https://www.reddit.com/r/deadandcompany" },
|
||||||
|
{ name: "Dead.net", url: "https://www.dead.net" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"billy-strings": {
|
||||||
|
listen: [
|
||||||
|
{ name: "Nugs.net", url: "https://www.nugs.net/billy-strings-concerts-live-downloads-in-mp3-flac-or-online-music-streaming/" },
|
||||||
|
{ name: "Mixlr", url: "https://billystrings.mixlr.com/" },
|
||||||
|
{ name: "Relisten", url: "https://relisten.net/billy-strings" }
|
||||||
|
],
|
||||||
|
community: [
|
||||||
|
{ name: "Reddit", url: "https://www.reddit.com/r/BillyStrings" },
|
||||||
|
{ name: "Billy Strings Website", url: "https://www.billystrings.com" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"phish": {
|
||||||
|
listen: [
|
||||||
|
{ name: "LivePhish", url: "https://www.livephish.com" },
|
||||||
|
{ name: "Relisten", url: "https://relisten.net/phish" }
|
||||||
|
],
|
||||||
|
community: [
|
||||||
|
{ name: "Phish.net", url: "https://phish.net" },
|
||||||
|
{ name: "Reddit", url: "https://www.reddit.com/r/phish" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dmb": {
|
||||||
|
listen: [
|
||||||
|
{ name: "Nugs.net", url: "https://www.nugs.net/dave-matthews-band-concerts-live-downloads-in-mp3-flac-or-online-music-streaming/" },
|
||||||
|
{ name: "Relisten", url: "https://relisten.net/dave-matthews-band" }
|
||||||
|
],
|
||||||
|
community: [
|
||||||
|
{ name: "AntsMarching", url: "https://antsmarching.org" },
|
||||||
|
{ name: "DMB Almanac", url: "https://dmbalmanac.com" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const DEFAULT_LINKS = {
|
||||||
|
listen: [
|
||||||
|
{ name: "Nugs.net", url: "https://www.nugs.net" },
|
||||||
|
{ name: "Relisten", url: "https://relisten.net" }
|
||||||
|
],
|
||||||
|
community: []
|
||||||
|
}
|
||||||
|
|
||||||
export function Footer() {
|
export function Footer() {
|
||||||
|
const { currentVertical } = useVertical()
|
||||||
|
|
||||||
|
// Get links for current vertical or fallback
|
||||||
|
const links = (currentVertical && VERTICAL_LINKS[currentVertical.slug])
|
||||||
|
? VERTICAL_LINKS[currentVertical.slug]
|
||||||
|
: DEFAULT_LINKS
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="border-t mt-12">
|
<footer className="border-t mt-12">
|
||||||
{/* Sub-footer: Band & Community Links */}
|
{/* Sub-footer: Band & Community Links */}
|
||||||
|
|
@ -11,10 +92,13 @@ export function Footer() {
|
||||||
<div className="text-center md:text-left">
|
<div className="text-center md:text-left">
|
||||||
<h4 className="font-semibold text-sm mb-3">Listen</h4>
|
<h4 className="font-semibold text-sm mb-3">Listen</h4>
|
||||||
<ul className="space-y-2 text-sm text-muted-foreground">
|
<ul className="space-y-2 text-sm text-muted-foreground">
|
||||||
<li><a href="https://www.nugs.net/goose-concerts-live-downloads-in-mp3-flac-or-online-music-streaming/" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">Nugs.net</a></li>
|
{links.listen.map((link, i) => (
|
||||||
<li><a href="https://goosetheband.bandcamp.com" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">Bandcamp</a></li>
|
<li key={i}>
|
||||||
<li><a href="https://open.spotify.com/artist/6qqNVTkY8uBg9cP3Jd7DAH" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">Spotify</a></li>
|
<a href={link.url} target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">
|
||||||
<li><a href="https://relisten.net/goose" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">Relisten</a></li>
|
{link.name}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -22,10 +106,17 @@ export function Footer() {
|
||||||
<div className="text-center md:text-left">
|
<div className="text-center md:text-left">
|
||||||
<h4 className="font-semibold text-sm mb-3">Community</h4>
|
<h4 className="font-semibold text-sm mb-3">Community</h4>
|
||||||
<ul className="space-y-2 text-sm text-muted-foreground">
|
<ul className="space-y-2 text-sm text-muted-foreground">
|
||||||
<li><a href="https://elgoose.net" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">ElGoose.net</a></li>
|
{links.community.length > 0 ? (
|
||||||
<li><a href="https://www.reddit.com/r/GooseTheBand" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">Reddit</a></li>
|
links.community.map((link, i) => (
|
||||||
<li><a href="https://wysterialane.org" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">Wysteria Lane</a></li>
|
<li key={i}>
|
||||||
<li><a href="https://wtedradio.com" target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">WTED Radio</a></li>
|
<a href={link.url} target="_blank" rel="noopener noreferrer" className="hover:underline hover:text-foreground">
|
||||||
|
{link.name}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<li><span className="italic">No community links yet</span></li>
|
||||||
|
)}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -50,7 +141,9 @@ export function Footer() {
|
||||||
<div className="flex flex-col md:flex-row items-center justify-between gap-6">
|
<div className="flex flex-col md:flex-row items-center justify-between gap-6">
|
||||||
{/* Brand & Copyright */}
|
{/* Brand & Copyright */}
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex items-center gap-4">
|
||||||
<span className="text-lg font-bold">Elmeg</span>
|
<span className="text-lg font-bold">
|
||||||
|
{currentVertical ? currentVertical.name : "Fediversion"}
|
||||||
|
</span>
|
||||||
<span className="text-xs text-muted-foreground">
|
<span className="text-xs text-muted-foreground">
|
||||||
© {new Date().getFullYear()} All rights reserved
|
© {new Date().getFullYear()} All rights reserved
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue