@@ -1,11 +1,9 @@
1import Head from "next/head";
1import Head from "next/head";
2import Link from "next/link";
2import Link from "next/link";
3−import { getPage } from "../../lib/lib";
3+import { getPage, getAllPosts } from "../../lib/lib";
4import { join } from "path";
4import { join } from "path";
5−import Meta from "../../components/Meta";
6import Container from "../../components/Container";
5import Container from "../../components/Container";
7import SingleColumn from "../../components/SingleColumn";
6import SingleColumn from "../../components/SingleColumn";
8−import ErrorPage from "../404";
9import Section from "../../components/Section";
7import Section from "../../components/Section";
10import ob from "urbit-ob";
8import ob from "urbit-ob";
11import Markdown from "../../components/Markdown";
9import Markdown from "../../components/Markdown";
@@ -17,7 +15,7 @@ import MetadataLink from "../../components/gateway/MetadataLink";
17import Description from "../../components/gateway/Description";
15import Description from "../../components/gateway/Description";
18import axios from "axios";
16import axios from "axios";
20−const IdPage = ({ data, markdown, network, params }) => {
18+const IdPage = ({ data, markdown, applications, groups, network, params }) => {
21 const { id } = params;
19 const { id } = params;
22 if (!ob.isValidPatp(id) || id.length > 14) {
20 if (!ob.isValidPatp(id) || id.length > 14) {
23 return <Gateway404 type="ID" />;
21 return <Gateway404 type="ID" />;
@@ -97,6 +95,18 @@ const IdPage = ({ data, markdown, network, params }) => {
101+ parentSlug="application"
105+ title="Hosted Groups"
100 <Description
110 <Description
101 description={data.description}
111 description={data.description}
102 fallback="An Urbit ID."
112 fallback="An Urbit ID."
@@ -157,6 +167,33 @@ const IdPage = ({ data, markdown, network, params }) => {
170+const Creations = ({ id, title, data, parentSlug }) => {
172+ data?.length > 0 && (
173+ <div className="flex flex-col space-y-2">
174+ <p className="text-wall-400 font-semibold">{title}</p>
175+ <div className="flex flex-wrap space-x-4">
176+ {data.map((each) => (
177+ <Link href={`/${parentSlug}/${id}/${each.slug}`}>
178+ <div className="cursor-pointer flex flex-col items-center space-y-1">
180+ className="overflow-hidden rounded-xl"
181+ style={{ width: 100, height: 100 }}
184+ "https://media.urbit.org/logo/urbit-logo-card.png"
187+ <a className="text-green-400 font-semibold">{each.title}</a>
160function deSig(string) {
197function deSig(string) {
161 return string.startsWith("~") ? string.substring(1) : string;
198 return string.startsWith("~") ? string.substring(1) : string;
@@ -171,6 +208,12 @@ export const getServerSideProps = async ({ params, res }) => {
171 join(process.cwd(), "content/id/", params.id.slice(1))
208 join(process.cwd(), "content/id/", params.id.slice(1))
172 ) || { data: {}, content: "" };
209 ) || { data: {}, content: "" };
211+ const applications = getAllPosts(
212+ ["title", "slug", "image"],
213+ `application/${params.id}`
215+ const groups = getAllPosts(["title", "slug", "image"], `group/${params.id}`);
174 if (!data.ship && ob.isValidPatp(params.id)) {
217 if (!data.ship && ob.isValidPatp(params.id)) {
175 data = { ship: params.id, description: "An Urbit ID." };
218 data = { ship: params.id, description: "An Urbit ID." };
@@ -188,6 +231,8 @@ export const getServerSideProps = async ({ params, res }) => {
191 markdown,
236 markdown,