diff --git a/app/page.tsx b/app/page.tsx index f8c02dc..1bc362c 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,12 +4,42 @@ import type React from "react" import { Button } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" -import { ArrowRight, Calendar, MapPin, Users, Heart, Sprout, Network, X } from "lucide-react" +import { Input } from "@/components/ui/input" +import { ArrowRight, Calendar, MapPin, Users, Heart, Sprout, Network, X, Mail, Loader2, CheckCircle2 } from "lucide-react" import Link from "next/link" import { useState } from "react" export default function HomePage() { const [selectedImage, setSelectedImage] = useState(null) + const [email, setEmail] = useState("") + const [subscribeStatus, setSubscribeStatus] = useState<"idle" | "loading" | "success" | "error">("idle") + const [subscribeError, setSubscribeError] = useState("") + + const handleSubscribe = async (e: React.FormEvent) => { + e.preventDefault() + if (!email) return + + setSubscribeStatus("loading") + setSubscribeError("") + + try { + const res = await fetch("https://blog.crypto-commons.org/members/api/send-magic-link/", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ email, emailType: "subscribe" }), + }) + + if (res.ok) { + setSubscribeStatus("success") + setEmail("") + } else { + throw new Error("Subscription failed") + } + } catch { + setSubscribeStatus("error") + setSubscribeError("Something went wrong. Please try again.") + } + } const handleImageClick = (imageSrc: string) => { setSelectedImage(imageSrc) @@ -114,10 +144,10 @@ END:VCALENDAR` building, and radical imagination in the Austrian Alps.

-
+
+
+

+ Drop your email to stay in the loop on upcoming announcements! +

+ {subscribeStatus === "success" ? ( +
+ + You're subscribed! Check your inbox to confirm. +
+ ) : ( +
+ { setEmail(e.target.value); setSubscribeStatus("idle") }} + required + className="bg-background/80 backdrop-blur-sm" + /> + +
+ )} + {subscribeStatus === "error" && ( +

{subscribeError}

+ )} +
+
@@ -406,19 +470,146 @@ END:VCALENDAR`
+ +
+

+ Drop your email to stay in the loop on upcoming announcements! +

+ {subscribeStatus === "success" ? ( +
+ + You're subscribed! Check your inbox to confirm. +
+ ) : ( +
+ { setEmail(e.target.value); setSubscribeStatus("idle") }} + required + /> + +
+ )} + {subscribeStatus === "error" && ( +

{subscribeError}

+ )} +
+

Interested in the Crypto Commons Association cooperative? Learn more at the event.

+ {/* Valley of the Commons Section */} +
+
+
+
+
+

New for 2026

+

+ Stay for the Valley of the Commons +

+

+ When CCG wraps on August 22, the experiment is just getting started. Stick around for 1 to 4 weeks and + join a new extended event right where you are — in the Austrian Alps. +

+
+ +
+
+

What is it?

+

+ Valley of the Commons is a four-week experimental pop-up village running{" "} + August 24 – September 20, 2026 — picking up + just two days after CCG ends. It's not a conference or a simulation: it's a functioning co-living + community taking concrete steps toward permanent settlement in the Höllental valley. +

+

+ Mornings are structured learning paths, afternoons bring workshops and working groups, evenings are + communal time, and weekends are open for exploring the Alps. You can stay for one week or all four. +

+
+ +
+

Weekly Themes

+
+
+ WK 1 +
+

Return of the Commons

+

Commons theory and history, with guest speakers

+
+
+
+ WK 2 +
+

Production & Value

+

Cosmo-local production, open value accounting systems

+
+
+
+ WK 3 +
+

Cooperative Housing

+

Nomad-friendly communal housing, renovation, ecological integration

+
+
+
+ WK 4 +
+

Governance & Funding

+

Horizontal governance, legal frameworks, funding mechanisms

+
+
+
+
+
+ + + +
+
+

CCG + Valley: The Full Experience

+

+ Come for CCG's unconference week (Aug 16-22), then flow straight into Valley of the Commons + (Aug 24 – Sep 20). Same mountains, same community, deeper roots. Perfect for digital workers, + post-corporate professionals, and anyone seeking grounded, cooperative ways of living. +

+
+ +
+
+
+
+
+ {/* Footer */}