on master help sign in
pages, components: revise for og card layout
8bd0e94Matilde Park
components/BasicPage.js+1−1
@@ -22,7 +22,7 @@ export default function BasicPage({ post, markdown, search, index = false }) {
22 return (
22 return (
23 <Container>
23 <Container>
24 <Head>
24 <Head>
25− <title>Urbit • {post.title}</title>
25+ <title>{post.title}</title>
26 {Meta(post)}
26 {Meta(post)}
27 </Head>
27 </Head>
28 <IntraNav ourSite="https://urbit.org" search={search} />
28 <IntraNav ourSite="https://urbit.org" search={search} />
components/ecosystem/BasicPage.js+6−8
@@ -29,7 +29,7 @@ export default function BasicPage({
29 <Container>
29 <Container>
30 <Head>
30 <Head>
31 <title>
31 <title>
32− {post.title} • {section} • Urbit
32+ {post.title} • {section}
33 </title>
33 </title>
34 {Meta(post)}
34 {Meta(post)}
35 </Head>
35 </Head>
@@ -40,12 +40,10 @@ export default function BasicPage({
40 <div className="flex items-center space-x-4">
40 <div className="flex items-center space-x-4">
41 <img src={post.image} className="w-36" />
41 <img src={post.image} className="w-36" />
42 <div className="flex flex-col pl-2">
42 <div className="flex flex-col pl-2">
43− <h1
44− className={classnames({ "text-3xl": section === "Podcasts" })}
43+ <h1 className={classnames({ "text-3xl": section === "Podcast" })}>
45− >
46 {post.title}
44 {post.title}
47 </h1>
45 </h1>
48− <p>{section.slice(0, -1)}</p>
46+ <p>{section}</p>
49 </div>
47 </div>
50 </div>
48 </div>
51 {/* General purpose metadata bar -- podcast listen button is special-cased URL, flexed at the end of the row */}
49 {/* General purpose metadata bar -- podcast listen button is special-cased URL, flexed at the end of the row */}
@@ -63,7 +61,7 @@ export default function BasicPage({
63 <p className="shrink-0">{post.date}</p>
61 <p className="shrink-0">{post.date}</p>
64 </div>
62 </div>
65 )}
63 )}
66− {post?.URL && section !== "Podcasts" && (
64+ {post?.URL && section !== "Podcast" && (
67 <div className="flex flex-col">
65 <div className="flex flex-col">
68 <p className="font-bold text-wall-400">Website</p>
66 <p className="font-bold text-wall-400">Website</p>
69 <a
67 <a
@@ -74,7 +72,7 @@ export default function BasicPage({
74 </a>
72 </a>
75 </div>
73 </div>
76 )}
74 )}
77− {post?.URL && section === "Marketplaces" && (
75+ {post?.URL && section === "Urbit Marketplace" && (
78 <div className="flex flex-col">
76 <div className="flex flex-col">
79 <p className="font-bold text-wall-400">Accepts</p>
77 <p className="font-bold text-wall-400">Accepts</p>
80 <p className="text-sm font-semibold font-mono">
78 <p className="text-sm font-semibold font-mono">
@@ -83,7 +81,7 @@ export default function BasicPage({
83 </div>
81 </div>
84 )}
82 )}
85 </div>
83 </div>
86− {post?.URL && section === "Podcasts" && (
84+ {post?.URL && section === "Podcast" && (
87 <a
85 <a
88 href={post.URL}
86 href={post.URL}
89 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
87 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
pages/applications/[[...application]].js+4−15
@@ -24,13 +24,6 @@ const ApplicationPage = ({ data, markdown, organisation, search, params }) => {
24 if (!ob.isValidPatp(application[0])) {
24 if (!ob.isValidPatp(application[0])) {
25 return <Gateway404 type="application" />;
25 return <Gateway404 type="application" />;
26 }
26 }
27− const reqParams = [
28− data?.bgColor ? `color=${encodeURIComponent(data?.bgColor)}` : "",
29− data?.image ? `images=${encodeURIComponent(data?.image)}` : "",
30− ].filter((e) => e !== "");
31− const image = `https://urbit-id-og-cards-78ieodof2-urbit.vercel.app/${
32− data.title
33− }.png?${reqParams.join("&")}`;
34
27
35 let devLink;
28 let devLink;
36
29
@@ -60,16 +53,12 @@ const ApplicationPage = ({ data, markdown, organisation, search, params }) => {
60 return (
53 return (
61 <Container>
54 <Container>
62 <Head>
55 <Head>
63− <title>{data.title} • Applications • urbit.org</title>
56+ <title>{data.title} • Urbit Application</title>
64 <link rel="icon" type="image/png" href="/images/favicon.ico" />
57 <link rel="icon" type="image/png" href="/images/favicon.ico" />
65− <meta
66− name="twitter:card"
58+ <meta name="twitter:card" content="summary" key="twitter-card" />
67− content="summary_large_image"
68− key="twitter-card"
69− />
70 <meta
59 <meta
71 name="og:title"
60 name="og:title"
72− content={`${data.title} • Applications • urbit.org`}
61+ content={`${data.title} • Urbit Application`}
73 key="title"
62 key="title"
74 />
63 />
75 <meta
64 <meta
@@ -80,7 +69,7 @@ const ApplicationPage = ({ data, markdown, organisation, search, params }) => {
80 }
69 }
81 key="description"
70 key="description"
82 />
71 />
83− <meta property="twitter:image" content={image} key="image" />
72+ <meta property="twitter:image" content={data.image} key="image" />
84 </Head>
73 </Head>
85 <IntraNav ourSite="https://urbit.org" search={search} />
74 <IntraNav ourSite="https://urbit.org" search={search} />
86 <SingleColumn>
75 <SingleColumn>
pages/blog/[slug].js+1−2
@@ -21,7 +21,6 @@ import {
21} from "@urbit/foundation-design-system";
21} from "@urbit/foundation-design-system";
22import Header from "../../components/Header";
22import Header from "../../components/Header";
23import Footer from "../../components/Footer";
23import Footer from "../../components/Footer";
24−import Contact from "../../components/Contact";
25import PostPreview from "../../components/PostPreview";
24import PostPreview from "../../components/PostPreview";
26import TwoUp from "../../components/TwoUp";
25import TwoUp from "../../components/TwoUp";
27
26
@@ -41,7 +40,7 @@ export default function Post({
41 <Container>
40 <Container>
42 <Head>
41 <Head>
43 <title>{post.title} • Blog • urbit.org</title>
42 <title>{post.title} • Blog • urbit.org</title>
44− {Meta(post)}
43+ {Meta(post, false, true)}
45 </Head>
44 </Head>
46 <IntraNav ourSite="https://urbit.org" search={search} />
45 <IntraNav ourSite="https://urbit.org" search={search} />
47 <SingleColumn>
46 <SingleColumn>
pages/community/[[...slug]].js+1−1
@@ -62,7 +62,7 @@ export default function UsingLayout({ posts, data, markdown, params, search }) {
62 return (
62 return (
63 <>
63 <>
64 <Head>
64 <Head>
65− <title>{data.title} • Community • urbit.org</title>
65+ <title>{data.title} • Community</title>
66 {Meta(data)}
66 {Meta(data)}
67 </Head>
67 </Head>
68 <div className="flex h-screen min-h-screen w-screen sidebar">
68 <div className="flex h-screen min-h-screen w-screen sidebar">
pages/ecosystem/index.js+1−1
@@ -67,7 +67,7 @@ export default function Ecosystem({
67 return (
67 return (
68 <Container>
68 <Container>
69 <Head>
69 <Head>
70− <title>{title} • Urbit</title>
70+ <title>{title}</title>
71 {Meta(data)}
71 {Meta(data)}
72 </Head>
72 </Head>
73 <IntraNav ourSite="https://urbit.org" search={search} />
73 <IntraNav ourSite="https://urbit.org" search={search} />
pages/ecosystem/spotlight/[slug].js+1−1
@@ -24,7 +24,7 @@ export default function BasicPage({ post, markdown, search, index = false }) {
24 return (
24 return (
25 <Container>
25 <Container>
26 <Head>
26 <Head>
27− <title>Urbit • {post.title}</title>
27+ <title>Ecosystem Spotlight - {post.title}</title>
28 {Meta(post)}
28 {Meta(post)}
29 </Head>
29 </Head>
30 <IntraNav ourSite="https://urbit.org" search={search} />
30 <IntraNav ourSite="https://urbit.org" search={search} />
pages/events/[slug].js+1−1
@@ -49,7 +49,7 @@ export default function Event({
49 <Container>
49 <Container>
50 <Head>
50 <Head>
51 <title>{event.title} • Events • urbit.org</title>
51 <title>{event.title} • Events • urbit.org</title>
52− {Meta(event)}
52+ {Meta(event, false, true)}
53 </Head>
53 </Head>
54 <IntraNav ourSite="https://urbit.org" search={search} />
54 <IntraNav ourSite="https://urbit.org" search={search} />
55 <SingleColumn>
55 <SingleColumn>
pages/getting-started/[[...slug]].js+1−1
@@ -42,7 +42,7 @@ export default function UsingLayout({ posts, data, params, search, markdown }) {
42 return (
42 return (
43 <>
43 <>
44 <Head>
44 <Head>
45− <title>{data.title} • Getting Started • urbit.org</title>
45+ <title>{data.title} • Getting Started</title>
46 {Meta(data)}
46 {Meta(data)}
47 </Head>
47 </Head>
48 <div className="flex h-screen min-h-screen w-screen sidebar">
48 <div className="flex h-screen min-h-screen w-screen sidebar">
pages/grants/[slug].js+1−1
@@ -46,7 +46,7 @@ export default function Grant({ post, markdown, search }) {
46 return (
46 return (
47 <Container>
47 <Container>
48 <Head>
48 <Head>
49− <title>{post.title} • Grants • urbit.org</title>
49+ <title>{post.title} • Grant</title>
50 {Meta(post)}
50 {Meta(post)}
51 </Head>
51 </Head>
52 <IntraNav ourSite="https://urbit.org" search={search} />
52 <IntraNav ourSite="https://urbit.org" search={search} />
pages/groups/[[...group]].js+4−22
@@ -24,33 +24,15 @@ const GroupPage = ({ data, markdown, params, search }) => {
24 return <Gateway404 type="group" />;
24 return <Gateway404 type="group" />;
25 }
25 }
26
26
27− const color = data?.tile && data?.tile.startsWith("#");
28− const reqParams = [
29− color ? `color=${encodeURIComponent(data.tile)}` : "",
30− !color
31− ? `images=${encodeURIComponent(
32− data?.tile ||
33− "https://media.urbit.org/public-links/placeholder-image.png"
34− )}`
35− : "",
36− ].filter((e) => e !== "");
37− const image = `https://urbit-id-og-cards-667veow91-urbit.vercel.app/${
38− data.title
39− }.png?${reqParams.join("&")}`;
40−
41 return (
27 return (
42 <Container>
28 <Container>
43 <Head>
29 <Head>
44− <title>{data.title} • Groups • urbit.org</title>
30+ <title>{data.title} • Urbit Group</title>
45 <link rel="icon" type="image/png" href="/images/favicon.ico" />
31 <link rel="icon" type="image/png" href="/images/favicon.ico" />
46− <meta
47− name="twitter:card"
32+ <meta name="twitter:card" content="summary" key="twitter-card" />
48− content="summary_large_image"
49− key="twitter-card"
50− />
51 <meta
33 <meta
52 name="og:title"
34 name="og:title"
53− content={`${data.title} • Groups • urbit.org`}
35+ content={`${data.title} • Urbit Group`}
54 key="title"
36 key="title"
55 />
37 />
56 <meta
38 <meta
@@ -60,7 +42,7 @@ const GroupPage = ({ data, markdown, params, search }) => {
60 }
42 }
61 key="description"
43 key="description"
62 />
44 />
63− <meta property="twitter:image" content={image} key="image" />
45+ <meta property="twitter:image" content={data.tile} key="image" />
64 </Head>
46 </Head>
65 <SingleColumn>
47 <SingleColumn>
66 <Header search={search} />
48 <Header search={search} />
pages/ids/[id].js+13−22
@@ -24,15 +24,6 @@ const IdPage = ({ data, markdown, applications, groups, network, params }) => {
24 return <Gateway404 type="ID" />;
24 return <Gateway404 type="ID" />;
25 }
25 }
26
26
27− const reqParams = [
28− data?.bgColor ? `color=${encodeURIComponent(data?.bgColor)}` : "",
29− data?.nickname ? `nickname=${encodeURIComponent(data?.nickname)}` : "",
30− data?.image ? `images=${encodeURIComponent(data?.image)}` : "",
31− ].filter((e) => e !== "");
32− const image = `https://urbit-id-og-cards-kappa.vercel.app/${deSig(
33− id
34− )}.png?${reqParams.join("&")}`;
35−
36 // Galaxies shouldn't show parents, so store it as boolean here for reference.
27 // Galaxies shouldn't show parents, so store it as boolean here for reference.
37 const isGalaxy = ob.clan(id) === "galaxy";
28 const isGalaxy = ob.clan(id) === "galaxy";
38
29
@@ -48,24 +39,24 @@ const IdPage = ({ data, markdown, applications, groups, network, params }) => {
48 return (
39 return (
49 <Container>
40 <Container>
50 <Head>
41 <Head>
51− <title>{id} • Urbit ID • urbit.org</title>
42+ <title>{id} • Urbit ID</title>
52 <link rel="icon" type="image/png" href="/images/favicon.ico" />
43 <link rel="icon" type="image/png" href="/images/favicon.ico" />
53− <meta
54− name="twitter:card"
44+ <meta name="twitter:card" content="summary" key="twitter-card" />
55− content="summary_large_image"
56− key="twitter-card"
57− />
58− <meta
59− name="og:title"
60− content={`${id} • Urbit ID • urbit.org`}
45+ <meta name="og:title" content={`${id} • Urbit ID`} key="title" />
61− key="title"
62− />
63 <meta
46 <meta
64 name="og:description"
47 name="og:description"
65− content="View more about this Urbit ID on urbit.org."
48+ content={`ID Type: ${
49+ ob.clan(id).slice(0, 1).toUpperCase() + ob.clan(id).slice(1)
50+ }`}
66 key="description"
51 key="description"
67 />
52 />
53+ <meta
68− <meta property="twitter:image" content={image} key="image" />
54+ property="twitter:image"
55+ content={
56+ data?.image || `/api/sigil?patp=${id}&color=${bgColor || "24201E"}`
57+ }
58+ key="image"
59+ />
69 </Head>
60 </Head>
70 <SingleColumn>
61 <SingleColumn>
71 <Section className="space-y-12 w-full" narrow>
62 <Section className="space-y-12 w-full" narrow>
pages/index.js+66−46
@@ -19,6 +19,7 @@ import { eventKeys } from "../lib/constants";
19import IndexCard from "../components/ecosystem/IndexCard";
19import IndexCard from "../components/ecosystem/IndexCard";
20import fs from "fs";
20import fs from "fs";
21import path from "path";
21import path from "path";
22+import Meta from "../components/Meta";
22
23
23export default function Home({
24export default function Home({
24 posts,
25 posts,
@@ -27,10 +28,15 @@ export default function Home({
27 grantNumbers,
28 grantNumbers,
28 search,
29 search,
29}) {
30}) {
31+ const post = {
32+ title: "Urbit",
33+ description: "A clean-slate OS and network for the 21st century.",
34+ };
30 return (
35 return (
31 <Container>
36 <Container>
32 <Head>
37 <Head>
33− <title>urbit.org</title>
38+ <title>Urbit</title>
39+ {Meta(post)}
34 </Head>
40 </Head>
35 <IntraNav ourSite="https://urbit.org" search={search} />
41 <IntraNav ourSite="https://urbit.org" search={search} />
36 <SingleColumn>
42 <SingleColumn>
@@ -47,7 +53,6 @@ export default function Home({
47 // Hero
53 // Hero
48 }
54 }
49 <Section>
55 <Section>
50−
51 <div className="bg-yellow-100 dark:bg-[#5C5037] w-full p-8 md:p-12 rounded-3xl flex flex-col md:flex-row">
56 <div className="bg-yellow-100 dark:bg-[#5C5037] w-full p-8 md:p-12 rounded-3xl flex flex-col md:flex-row">
52 <div className="md:w-10/12 w-full md:mr-6">
57 <div className="md:w-10/12 w-full md:mr-6">
53 <h2 className="m-0 p-0 mr-4 pb-6">Assembly 2022</h2>
58 <h2 className="m-0 p-0 mr-4 pb-6">Assembly 2022</h2>
@@ -172,44 +177,44 @@ export default function Home({
172 // Build on Urbit Developer CTA
177 // Build on Urbit Developer CTA
173 }
178 }
174 <Section narrow>
179 <Section narrow>
175− <h2 className="pb-8">Build on Urbit</h2>
180+ <h2 className="pb-8">Build on Urbit</h2>
176− <h4 className="pb-6">
181+ <h4 className="pb-6">
177− Urbit is a personal OS designed from scratch to run peer-to-peer
182+ Urbit is a personal OS designed from scratch to run peer-to-peer
178− applications.
183+ applications.
179− </h4>
184+ </h4>
180− <p className="pb-6">
185+ <p className="pb-6">
181− It solves the hard problems of implementing a peer-to-peer network
186+ It solves the hard problems of implementing a peer-to-peer network
182− (including identity, NAT traversal, and exactly-once delivery) in
187+ (including identity, NAT traversal, and exactly-once delivery) in
183− the kernel so app developers can focus on business logic.
188+ the kernel so app developers can focus on business logic.
184− </p>
189+ </p>
185− <p className="pb-6">
190+ <p className="pb-6">
186− The entire OS is a{" "}
191+ The entire OS is a{" "}
187− <Link href="https://urbit.org/docs/nock/definition/" passHref>
192+ <Link href="https://urbit.org/docs/nock/definition/" passHref>
188− <a>single pure function</a>
193+ <a>single pure function</a>
189− </Link>{" "}
194+ </Link>{" "}
190− that provides application developers with strong guarantees:
195+ that provides application developers with strong guarantees:
191− automated persistence and memory management, repeatable builds,
196+ automated persistence and memory management, repeatable builds, and
192− and support for hot code reloading.
197+ support for hot code reloading.
193− </p>
198+ </p>
194− <p className="pb-10">
199+ <p className="pb-10">
195− You can get started learning how to{" "}
200+ You can get started learning how to{" "}
196− <Link href="https://urbit.org/docs/development/develop/" passHref>
201+ <Link href="https://urbit.org/docs/development/develop/" passHref>
197− <a>contribute to the project</a>
202+ <a>contribute to the project</a>
198− </Link>
199− , or view a variety of{" "}
200− <Link
201− href="https://github.com/urbit/awesome-urbit#http-apis-airlock"
202− passHref
203− >
204− <a>libraries</a>
205− </Link>{" "}
206− for building on Urbit using the languages you already know.
207− </p>
208− <Link href="https://developers.urbit.org" passHref>
209− <a className="button-lg type-ui text-white bg-green-400 max-w-fit">
210− Visit Urbit Developers
211− </a>
212 </Link>
203 </Link>
204+ , or view a variety of{" "}
205+ <Link
206+ href="https://github.com/urbit/awesome-urbit#http-apis-airlock"
207+ passHref
208+ >
209+ <a>libraries</a>
210+ </Link>{" "}
211+ for building on Urbit using the languages you already know.
212+ </p>
213+ <Link href="https://developers.urbit.org" passHref>
214+ <a className="button-lg type-ui text-white bg-green-400 max-w-fit">
215+ Visit Urbit Developers
216+ </a>
217+ </Link>
213 </Section>
218 </Section>
214
219
215 {
220 {
@@ -261,14 +266,29 @@ export default function Home({
261
266
262 <Section narrow>
267 <Section narrow>
263 <h2 className="pb-8">Social Media</h2>
268 <h2 className="pb-8">Social Media</h2>
269+ <p className="pb-2">
264− <p className="pb-2">Follow us on <Link href="http://twitter.com/urbit">Twitter</Link></p>
270+ Follow us on <Link href="http://twitter.com/urbit">Twitter</Link>
271+ </p>
272+ <p className="pb-2">
273+ Check out our posts on{" "}
265− <p className="pb-2">Check out our posts on <Link href="http://instagram.com/urbit">Instagram</Link></p>
274+ <Link href="http://instagram.com/urbit">Instagram</Link>
275+ </p>
276+ <p className="pb-2">
277+ Watch livestreams on{" "}
266− <p className="pb-2">Watch livestreams on <Link href="https://www.youtube.com/channel/UCNYIS9_SktINCC9yqO4CFZw">YouTube</Link></p>
278+ <Link href="https://www.youtube.com/channel/UCNYIS9_SktINCC9yqO4CFZw">
279+ YouTube
280+ </Link>
281+ </p>
282+ <p className="pb-2">
267− <p className="pb-2">Dig into code on <Link href="http://github.com/urbit">Github</Link></p>
283+ Dig into code on <Link href="http://github.com/urbit">Github</Link>
284+ </p>
285+ <p className="pb-2">
286+ Boot Urbit and join{" "}
268− <p className="pb-2">Boot Urbit and join <Link href="https://urbit.org/groups/~bitbet-bolbel/urbit-community">Urbit Community</Link></p>
287+ <Link href="https://urbit.org/groups/~bitbet-bolbel/urbit-community">
288+ Urbit Community
289+ </Link>
290+ </p>
269 </Section>
291 </Section>
270−
271−
272 </SingleColumn>
292 </SingleColumn>
273 <Footer />
293 <Footer />
274 </Container>
294 </Container>
pages/marketplaces/[slug].js+1−1
@@ -12,7 +12,7 @@ export default function Marketplace({
12}) {
12}) {
13 return (
13 return (
14 <BasicPage
14 <BasicPage
15− section="Marketplaces"
15+ section="Urbit Marketplace"
16 post={post}
16 post={post}
17 markdown={markdown}
17 markdown={markdown}
18 search={search}
18 search={search}
pages/organizations/[slug].js+1−4
@@ -1,6 +1,3 @@
1−// Single page per organisation
2−// Needs to have *associated ships* by which it polls content/applications for applications it "owns"
3−// Needs to look for its title in ecosystem/spotlight
4import { getAllPosts, getPostBySlug, getPostSlugs } from "../../lib/lib";
1import { getAllPosts, getPostBySlug, getPostSlugs } from "../../lib/lib";
5import BasicPage from "../../components/ecosystem/BasicPage";
2import BasicPage from "../../components/ecosystem/BasicPage";
6import { Markdown } from "@urbit/foundation-design-system";
3import { Markdown } from "@urbit/foundation-design-system";
@@ -19,7 +16,7 @@ export default function Organization({
19}) {
16}) {
20 return (
17 return (
21 <BasicPage
18 <BasicPage
22− section="Organizations"
19+ section="Organization"
23 post={post}
20 post={post}
24 markdown={markdown}
21 markdown={markdown}
25 search={search}
22 search={search}
pages/overview/[[...slug]].js+1−1
@@ -21,7 +21,7 @@ export default function Overview({ posts, data, markdown, search }) {
21 return (
21 return (
22 <Container>
22 <Container>
23 <Head>
23 <Head>
24− <title>{data.title} • Overview • Urbit</title>
24+ <title>{data.title} • Overview</title>
25 {Meta(data)}
25 {Meta(data)}
26 </Head>
26 </Head>
27 <IntraNav ourSite="https://urbit.org" search={search} />
27 <IntraNav ourSite="https://urbit.org" search={search} />
pages/podcasts/[slug].js+1−1
@@ -12,7 +12,7 @@ export default function Podcast({
12}) {
12}) {
13 return (
13 return (
14 <BasicPage
14 <BasicPage
15− section="Podcasts"
15+ section="Podcast"
16 post={post}
16 post={post}
17 markdown={markdown}
17 markdown={markdown}
18 search={search}
18 search={search}
pages/updates/[slug].js+1−1
@@ -30,7 +30,7 @@ export default function Post({ post, markdown, search }) {
30 return (
30 return (
31 <Container>
31 <Container>
32 <Head>
32 <Head>
33− <title>{post.title} • Updates • urbit.org</title>
33+ <title>{post.title} • Updates</title>
34 {Meta(post)}
34 {Meta(post)}
35 </Head>
35 </Head>
36 <IntraNav ourSite="https://urbit.org" search={search} />
36 <IntraNav ourSite="https://urbit.org" search={search} />