@@ -8,9 +8,12 @@ import SingleColumn from "../../components/SingleColumn";
8import ErrorPage from "../404";
8import ErrorPage from "../404";
9import Section from "../../components/Section";
9import Section from "../../components/Section";
10import ob from "urbit-ob";
10import ob from "urbit-ob";
11−import { decode } from "html-entities";
12import Markdown from "../../components/Markdown";
11import Markdown from "../../components/Markdown";
13import Sigil from "../../components/Sigil";
12import Sigil from "../../components/Sigil";
13+import GatewayHeader from "../../components/gateway/GatewayHeader";
14+import MetadataBlock from "../../components/gateway/MetadataBlock";
15+import MetadataLink from "../../components/gateway/MetadataLink";
16+import Description from "../../components/gateway/Description";
14import axios from "axios";
17import axios from "axios";
16const IdPage = ({ data, markdown, network, params }) => {
19const IdPage = ({ data, markdown, network, params }) => {
@@ -31,6 +34,12 @@ const IdPage = ({ data, markdown, network, params }) => {
31 // Galaxies shouldn't show parents, so store it as boolean here for reference.
34 // Galaxies shouldn't show parents, so store it as boolean here for reference.
32 const isGalaxy = ob.clan(id) === "galaxy";
35 const isGalaxy = ob.clan(id) === "galaxy";
38+ <div className="rounded-xl overflow-hidden">
39+ <Sigil patp={id} size={100} />
35 <Container>
44 <Container>
@@ -56,67 +65,44 @@ const IdPage = ({ data, markdown, network, params }) => {
56 <SingleColumn>
65 <SingleColumn>
57 <Section className="space-y-12" narrow>
66 <Section className="space-y-12" narrow>
58 <div className="flex items-center space-x-4">
67 <div className="flex items-center space-x-4">
59− {/* Avatar or sigil */}
68+ <GatewayHeader
60− {data.image ? (
69+ title={id}
61− <img
70+ image={data?.image || false}
62− className="rounded-xl"
71+ sigil={sigil}
68− <div className="rounded-xl overflow-hidden">
69− <Sigil patp={id} size={100} />
72− <div className="flex flex-col">
74− <p>Urbit ID</p>
72+ item="Urbit ID"
77 <div className="flex flex-wrap md:flex-nowrap justify-between">
75 <div className="flex flex-wrap md:flex-nowrap justify-between">
78− <div className="flex flex-col basis-1/2 md:basis-auto mb-4 md:mb-0">
76+ <MetadataBlock
79− <p className="font-bold text-wall-400">ID Type</p>
77+ title="ID Type"
80− <p className="font-mono">
78+ content={
81− {ob.clan(id).slice(0, 1).toUpperCase() + ob.clan(id).slice(1)}
79+ ob.clan(id).slice(0, 1).toUpperCase() + ob.clan(id).slice(1)
84− <div className="flex flex-col basis-1/2 md:basis-auto mb-4 md:mb-0">
82+ <MetadataBlock
85− <p className="font-bold text-wall-400">Status</p>
83+ title="Status"
86− <p className="font-mono">
87− {network ? "Spawned/Owned" : "Unspawned"}
84+ content={network ? "Spawned/Owned" : "Unspawned"}
90 {!isGalaxy && (
86 {!isGalaxy && (
91− <div className="flex flex-col basis-1/2 md:basis-auto">
87+ <MetadataLink
92− <p className="font-bold text-wall-400">Parent</p>
88+ title="Parent"
93− <Link href={`/id/${parent}`}>
89+ href={`/id/${parent}`}
94− <a className="type-ui font-mono text-green-400">{parent}</a>
90+ content={parent}
98 {galaxy && (
93 {galaxy && (
99− <div className="flex flex-col basis-1/2 md:basis-auto">
94+ <MetadataLink
100− <p className="font-bold text-wall-400">Galaxy</p>
95+ title="Galaxy"
101− <Link href={`/id/${galaxy}`}>
96+ href={`/id/${galaxy}`}
102− <a className="type-ui font-mono text-green-400">{galaxy}</a>
97+ content={galaxy}
107− {(data.description !== "An Urbit ID." || markdown) && (
102+ description={data.description}
108− <div className="flex flex-col space-y-4">
103+ fallback="An Urbit ID."
109− <p className="font-bold text-wall-400">Description</p>
110− {markdown ? (
104+ markdown={markdown}
112− className="flex flex-col space-y-4"
113− dangerouslySetInnerHTML={{ __html: decode(markdown) }}
116− <p>{data.description}</p>
121 className="flex items-center"
107 className="flex items-center"
122 target="_blank"
108 target="_blank"