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";
16export default function BasicPage({
23 const router = useRouter();
24 if (!router.isFallback && !post?.slug) {
27 const metaPost = Object.assign({}, post);
28 metaPost.title = `${post.title} - ${section}`;
29 metaPost.description =
30 section === "Podcast" ? `${post.podcast} - ${post.date}` : post.description;
31 section === "Article" ? `${post.publication} - ${post.date}` : post.description;
36 {post.title} • {section}
40 <IntraNav ourSite="https://urbit.org" search={search} />
42 <Header search={search} />
43 <Section narrow className="space-y-12">
44 <div className="flex items-center space-x-4">
45 <img src={post.image} className="w-36" />
46 <div className="flex flex-col pl-2">
47 <h1 className={classnames({ "text-3xl": section === "Podcast" },{ "text-3xl": section === "Article" })}>
53 {/* General purpose metadata bar -- podcast listen button is special-cased URL, flexed at the end of the row */}
54 <div className="flex justify-between">
55 <div className="flex space-x-12">
57 <div className="flex flex-col">
58 <p className="font-bold text-wall-400">Podcast</p>
62 {post?.publication && (
63 <div className="flex flex-col">
64 <p className="font-bold text-wall-400">Publication</p>
65 <p>{post.publication}</p>
69 <div className="flex flex-col">
70 <p className="font-bold text-wall-400">Author</p>
75 <div className="flex flex-col">
76 <p className="font-bold text-wall-400">Date</p>
77 <p className="shrink-0">{post.date}</p>
81 {post?.URL && section !== "Podcast" && section !== "Article" && (
82 <div className="flex flex-col">
83 <p className="font-bold text-wall-400">Website</p>
85 className="text-green-400 text-sm font-semibold font-mono"
88 {post.URL.slice(post.URL.indexOf("://") + 3)}
93 {post?.URL && section === "Urbit Marketplace" && (
94 <div className="flex flex-col">
95 <p className="font-bold text-wall-400">Accepts</p>
96 <p className="text-sm font-semibold font-mono">
97 {post.payment.join(", ")}
102 {post?.URL && section === "Podcast" && (
105 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
107 <img src="/images/sound.svg" />
111 {post?.URL && section === "Article" && (
114 className="button-lg bg-green-400 text-white cursor-pointer flex space-x-2"
120 <div className="flex">
121 <div className="markdown w-full">
122 <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