on master help sign in
post, index: spotlight cards link to their section
e87b3acMatilde Park
components/ecosystem/Post.js+4−1
@@ -4,7 +4,10 @@ import Link from "next/link";
4export default function Post({ post }) {
4export default function Post({ post }) {
5 return ["featured-1", "featured-2", "featured-3"].map((feat) => {
5 return ["featured-1", "featured-2", "featured-3"].map((feat) => {
6 return post?.[feat] ? (
6 return post?.[feat] ? (
7+ <div
7− <div className="mt-8 mb-24">
8+ className="mt-8 mb-24"
9+ id={post?.[feat].title.toLowerCase().replace(/ /, "-")}
10+ >
8 <div className="flex space-x-4 items-center">
11 <div className="flex space-x-4 items-center">
9 <img
12 <img
10 className="rounded-xl w-24 object-cover"
13 className="rounded-xl w-24 object-cover"
pages/index.js+3−11
@@ -18,7 +18,6 @@ import { getAllPosts, getAllEvents, generateRealtimeDate } from "../lib/lib";
18import { eventKeys } from "../lib/constants";
18import { eventKeys } from "../lib/constants";
19import IndexCard from "../components/ecosystem/IndexCard";
19import IndexCard from "../components/ecosystem/IndexCard";
20
20
21−
22export default function Home({
21export default function Home({
23 posts,
22 posts,
24 ecosystem,
23 ecosystem,
@@ -101,11 +100,9 @@ export default function Home({
101 if (ecosystem?.[feat]) {
100 if (ecosystem?.[feat]) {
102 return (
101 return (
103 <IndexCard
102 <IndexCard
104− slug={
105− ecosystem[feat].type === "Application"
103+ slug={`/ecosystem/#${ecosystem[feat]?.title
106− ? `/ids/${ecosystem[feat].URL}`
104+ .toLowerCase()
107− : ecosystem[feat].URL
105+ .replace(/ /, "-")}`}
108− }
109 feat={ecosystem[feat]}
106 feat={ecosystem[feat]}
110 />
107 />
111 );
108 );
@@ -254,17 +251,12 @@ export default function Home({
254 </Link>
251 </Link>
255 </Section>
252 </Section>
256
253
257−
258 <Section narrow>
254 <Section narrow>
259−
260 <h3 className="pb-2">Urbit Monthly</h3>
255 <h3 className="pb-2">Urbit Monthly</h3>
261 <p className="pb-8">Get monthly email updates on all things Urbit.</p>
256 <p className="pb-8">Get monthly email updates on all things Urbit.</p>
262
257
263−
264 <Contact emphasize />
258 <Contact emphasize />
265 </Section>
259 </Section>
266−
267−
268 </SingleColumn>
260 </SingleColumn>
269 <Footer />
261 <Footer />
270 </Container>
262 </Container>