Add 💩 emoji favicon
This commit is contained in:
parent
b63a2ec476
commit
d37594a6f8
|
|
@ -11,6 +11,9 @@ export const metadata: Metadata = {
|
||||||
description:
|
description:
|
||||||
"Exploring how we can decompose the excesses of capitalism and cultivate regenerative (com)post-capitalist systems that work for the many, not the few.",
|
"Exploring how we can decompose the excesses of capitalism and cultivate regenerative (com)post-capitalist systems that work for the many, not the few.",
|
||||||
generator: "v0.app",
|
generator: "v0.app",
|
||||||
|
icons: {
|
||||||
|
icon: "data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>💩</text></svg>",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { ZombifiedInstitutions } from "@/components/zombified-institutions"
|
||||||
import { ResourcesForChange } from "@/components/resources-for-change"
|
import { ResourcesForChange } from "@/components/resources-for-change"
|
||||||
import { NetworkLinks } from "@/components/network-links"
|
import { NetworkLinks } from "@/components/network-links"
|
||||||
import { MycelialMentions } from "@/components/mycelial-mentions"
|
import { MycelialMentions } from "@/components/mycelial-mentions"
|
||||||
|
import { NewsletterSignup } from "@/components/newsletter-signup"
|
||||||
import { Footer } from "@/components/footer"
|
import { Footer } from "@/components/footer"
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
|
@ -15,6 +16,7 @@ export default function Home() {
|
||||||
<ResourcesForChange />
|
<ResourcesForChange />
|
||||||
<NetworkLinks />
|
<NetworkLinks />
|
||||||
<MycelialMentions />
|
<MycelialMentions />
|
||||||
|
<NewsletterSignup />
|
||||||
<Footer />
|
<Footer />
|
||||||
</main>
|
</main>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
"use client"
|
||||||
|
|
||||||
|
import { useState } from "react"
|
||||||
|
import { Button } from "@/components/ui/button"
|
||||||
|
|
||||||
|
const LISTMONK_URL = "https://newsletter.jeffemmett.com"
|
||||||
|
const LIST_UUID = "fc27ffbd-400c-436b-ae23-2aa2776d8010" // Compost Capitalism list
|
||||||
|
|
||||||
|
export function NewsletterSignup() {
|
||||||
|
const [email, setEmail] = useState("")
|
||||||
|
const [status, setStatus] = useState<"idle" | "loading" | "success" | "error">("idle")
|
||||||
|
const [message, setMessage] = useState("")
|
||||||
|
|
||||||
|
const handleSubmit = async (e: React.FormEvent) => {
|
||||||
|
e.preventDefault()
|
||||||
|
|
||||||
|
if (!email) return
|
||||||
|
|
||||||
|
setStatus("loading")
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch(`${LISTMONK_URL}/subscription/form`, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
},
|
||||||
|
body: new URLSearchParams({
|
||||||
|
email: email,
|
||||||
|
list: LIST_UUID,
|
||||||
|
name: "",
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
if (response.ok) {
|
||||||
|
setStatus("success")
|
||||||
|
setMessage("Check your email to confirm your subscription!")
|
||||||
|
setEmail("")
|
||||||
|
} else {
|
||||||
|
throw new Error("Subscription failed")
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
setStatus("error")
|
||||||
|
setMessage("Something went wrong. Please try again.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section className="py-16 bg-gradient-to-b from-background to-muted/30">
|
||||||
|
<div className="container mx-auto px-4">
|
||||||
|
<div className="max-w-xl mx-auto text-center space-y-6">
|
||||||
|
<div className="space-y-2">
|
||||||
|
<h2 className="text-2xl font-bold">
|
||||||
|
Join the Mycelial Network
|
||||||
|
</h2>
|
||||||
|
<p className="text-muted-foreground">
|
||||||
|
Subscribe for updates on regenerative economics, composting capitalism,
|
||||||
|
and building post-capitalist futures.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{status === "success" ? (
|
||||||
|
<div className="p-4 rounded-lg bg-green-500/10 border border-green-500/20 text-green-600 dark:text-green-400">
|
||||||
|
{message}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<form onSubmit={handleSubmit} className="flex flex-col sm:flex-row gap-3">
|
||||||
|
<input
|
||||||
|
type="email"
|
||||||
|
placeholder="your@email.com"
|
||||||
|
value={email}
|
||||||
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
|
required
|
||||||
|
className="flex-1 px-4 py-2 rounded-lg border bg-background focus:outline-none focus:ring-2 focus:ring-primary/50"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
disabled={status === "loading"}
|
||||||
|
className="px-6"
|
||||||
|
>
|
||||||
|
{status === "loading" ? "Subscribing..." : "Subscribe"}
|
||||||
|
</Button>
|
||||||
|
</form>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{status === "error" && (
|
||||||
|
<p className="text-sm text-red-500">{message}</p>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<p className="text-xs text-muted-foreground">
|
||||||
|
No spam, unsubscribe anytime. We respect your privacy.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue