on master help sign in
index: add ecosystem blurb
285739bMatilde Park
pages/index.js+50−6
@@ -16,8 +16,15 @@ import EventPreview from "../components/EventPreview";
16import TwoUp from "../components/TwoUp";
16import TwoUp from "../components/TwoUp";
17import { getAllPosts, getAllEvents, generateRealtimeDate } from "../lib/lib";
17import { getAllPosts, getAllEvents, generateRealtimeDate } from "../lib/lib";
18import { eventKeys } from "../lib/constants";
18import { eventKeys } from "../lib/constants";
19+import IndexCard from "../components/ecosystem/IndexCard";
19
20
20−export default function Home({ posts, events, grantNumbers, search }) {
21+export default function Home({
22+ posts,
23+ ecosystem,
24+ events,
25+ grantNumbers,
26+ search,
27+}) {
21 return (
28 return (
22 <Container>
29 <Container>
23 <Head>
30 <Head>
@@ -69,9 +76,9 @@ export default function Home({ posts, events, grantNumbers, search }) {
69 computer from scratch. Good thing we started over a decade ago.
76 computer from scratch. Good thing we started over a decade ago.
70 </p>
77 </p>
71 <p className="max-w-prose">
78 <p className="max-w-prose">
72− Today, Urbit is a real system with thousands of users that are building
79+ Today, Urbit is a real system with thousands of users that are
73− all kinds of communities, software, DAOs, and more. And it’s getting
80+ building all kinds of communities, software, DAOs, and more. And
74− better every day.{" "}
81+ it’s getting better every day.{" "}
75 </p>
82 </p>
76 <Link href="/overview" passHref>
83 <Link href="/overview" passHref>
77 <a className="button-lg bg-green-400 text-white type-ui max-w-fit">
84 <a className="button-lg bg-green-400 text-white type-ui max-w-fit">
@@ -79,7 +86,38 @@ export default function Home({ posts, events, grantNumbers, search }) {
79 </a>
86 </a>
80 </Link>
87 </Link>
81 </Section>
88 </Section>
82−
89+ {/* Ecosystem */}
90+ <Section>
91+ <div className="flex flex-col space-y-8 pb-12">
92+ <h2 className="m-0 p-0 mr-4">Ecosystem</h2>
93+ <p>
94+ The Urbit ecosystem is comprised of a wide variety of individuals
95+ and organizations, including developers, DAOs, podcasters, and
96+ more.
97+ </p>
98+ <div className="flex flex-col space-y-4 md:space-y-0 md:flex-row md:space-x-4">
99+ {["featured-1", "featured-2", "featured-3"].map((feat) => {
100+ if (ecosystem?.[feat]) {
101+ return (
102+ <IndexCard
103+ slug={
104+ ecosystem[feat].type === "Application"
105+ ? `/ids/${ecosystem[feat].URL}`
106+ : ecosystem[feat].URL
107+ }
108+ feat={ecosystem[feat]}
109+ />
110+ );
111+ }
112+ })}
113+ </div>
114+ <Link href="/ecosystem" passHref>
115+ <a className="button-lg bg-green-400 text-white w-fit">
116+ Explore Ecosystem
117+ </a>
118+ </Link>
119+ </div>
120+ </Section>
83 {
121 {
84 // Grants
122 // Grants
85 }
123 }
@@ -222,7 +260,6 @@ export default function Home({ posts, events, grantNumbers, search }) {
222 <Contact emphasize />
260 <Contact emphasize />
223 </Section>
261 </Section>
224 </SingleColumn>
262 </SingleColumn>
225−
226 <Footer />
263 <Footer />
227 </Container>
264 </Container>
228 );
265 );
@@ -235,6 +272,12 @@ export async function getStaticProps() {
235 "date"
272 "date"
236 );
273 );
237
274
275+ const ecosystem = getAllPosts(
276+ ["featured-1", "featured-2", "featured-3"],
277+ "ecosystem/spotlight",
278+ "date"
279+ )[0];
280+
238 const events = getAllEvents(eventKeys, "events");
281 const events = getAllEvents(eventKeys, "events");
239
282
240 const grants = getAllPosts(["extra", "taxonomies"], "grants", "date");
283 const grants = getAllPosts(["extra", "taxonomies"], "grants", "date");
@@ -291,6 +334,7 @@ export async function getStaticProps() {
291 return {
334 return {
292 props: {
335 props: {
293 posts,
336 posts,
337+ ecosystem,
294 grantNumbers,
338 grantNumbers,
295 events: happeningNow.concat(futureEvents).concat(pastEvents),
339 events: happeningNow.concat(futureEvents).concat(pastEvents),
296 },
340 },