1import { useRouter } from "next/router";
2import Head from "next/head";
3import Link from "next/link";
4import Meta from "../Meta";
5import ErrorPage from "../../pages/404";
6import classnames from "classnames";
13} from "@urbit/foundation-design-system";
14import Header from "../Header";
15import Footer from "../Footer";
16import MetadataBlock from "./MetadataBlock";
18export default function BasicPage({
25 const router = useRouter();
26 if (!router.isFallback && !post?.slug) {
29 const metaPost = Object.assign({}, post);
30 metaPost.title = `${post.title} - ${section}`;
31 metaPost.description =
32 section === "Podcast" ? `${post.podcast} - ${post.date}` : post.description;
33 section === "Article" ? `${post.publication} - ${post.date}` : post.description;
38 {post.title} • {section}
42 <IntraNav ourSite="https://urbit.org" search={search} />
44 <Header search={search} />
45 <Section narrow className="space-y-12">
46 <div className="flex items-center space-x-4">
47 <img src={post.image} className="w-36" />
48 <div className="flex flex-col pl-2">
49 <h1 className="text-3xl">
55 {/* General purpose metadata bar -- podcast listen button is special-cased URL, flexed at the end of the row */}
56 <div className="flex justify-between">
57 <div className="flex space-x-12">
61 content={post.podcast}
64 {post?.publication && (
67 content={post.publication}
84 <div className="flex flex-col">
85 <p className="font-bold text-wall-400">Twitter</p>
86 <Link href={"http://twitter.com/" + post.twitter}>
87 <a className="text-green-400 text-sm font-semibold font-mono">@{post.twitter}</a>
93 {post?.URL && section !== "Podcast" && section !== "Article" && (
94 <div className="flex flex-col">
95 <p className="font-bold text-wall-400">Website</p>
97 className="text-green-400 text-sm font-semibold font-mono"
100 {post.URL.slice(post.URL.indexOf("://") + 3)}
105 {post?.URL && section === "Urbit Marketplace" && (
106 <div className="flex flex-col">
107 <p className="font-bold text-wall-400">Accepts</p>
108 <p className="text-sm font-semibold font-mono">
109 {post.payment.join(", ")}
117 {post?.URL && section === "Podcast" && (
120 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
122 <img src="/images/sound.svg" />
126 {post?.URL && section === "Article" && (
129 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
135 <div className="flex">
136 <div className="markdown w-full">
137 <Markdown.render content={JSON.parse(markdown)} />
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list