1import { useRouter } from "next/router";
2import Head from "next/head";
3import Meta from "../Meta";
4import ErrorPage from "../../pages/404";
5import classnames from "classnames";
12} from "@urbit/foundation-design-system";
13import Header from "../Header";
14import Footer from "../Footer";
15import MetadataBlock from "./MetadataBlock";
17export default function BasicPage({
24 const router = useRouter();
25 if (!router.isFallback && !post?.slug) {
28 const metaPost = Object.assign({}, post);
29 metaPost.title = `${post.title} - ${section}`;
30 metaPost.description =
31 section === "Podcast" ? `${post.podcast} - ${post.date}` : post.description;
32 section === "Article" ? `${post.publication} - ${post.date}` : post.description;
37 {post.title} • {section}
41 <IntraNav ourSite="https://urbit.org" search={search} />
43 <Header search={search} />
44 <Section narrow className="space-y-12">
45 <div className="flex items-center space-x-4">
46 <img src={post.image} className="w-36" />
47 <div className="flex flex-col pl-2">
48 <h1 className="text-3xl">
54 {/* General purpose metadata bar -- podcast listen button is special-cased URL, flexed at the end of the row */}
55 <div className="flex justify-between">
56 <div className="flex space-x-12">
60 content={post.podcast}
63 {post?.publication && (
66 content={post.publication}
82 {post?.URL && section !== "Podcast" && section !== "Article" && (
83 <div className="flex flex-col">
84 <p className="font-bold text-wall-400">Website</p>
86 className="text-green-400 text-sm font-semibold font-mono"
89 {post.URL.slice(post.URL.indexOf("://") + 3)}
94 {post?.URL && section === "Urbit Marketplace" && (
95 <div className="flex flex-col">
96 <p className="font-bold text-wall-400">Accepts</p>
97 <p className="text-sm font-semibold font-mono">
98 {post.payment.join(", ")}
103 {post?.URL && section === "Podcast" && (
106 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
108 <img src="/images/sound.svg" />
112 {post?.URL && section === "Article" && (
115 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
121 <div className="flex">
122 <div className="markdown w-full">
123 <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