on master help sign in
polish, events page tile
commit0c69a39eac31e0f83d1e2e81fe575609306ab626 authorGavin Atkinson <gvnatknsn@protonmail.com> dateTue 13 Jul 2021, 14:50 (5 years ago) parent585d821
14 files changed+182−105
components/BasicPage.js+4 components/ContentArea.js+12−10 components/Footer.js+36−29 components/Header.js+4−1 components/MenuTray.js+4−2 components/Sidebar.js+1−1 content/events/2021-04-29-developer-call-real-time-communications-on-urbit.md+1−3 pages/404.js+3 pages/blog.js+5−3 pages/events.js+97−50 pages/events/[slug].js+1−1 pages/grants.js+6−4 pages/index.js+4−1 styles/globals.css+4
components/BasicPage.js+4
@@ -1,4 +1,5 @@
11import { useRouter } from "next/router";
2+import Head from "next/head";
23import ErrorPage from "../pages/404";
34import Container from "./Container";
45import Header from "./Header";
@@ -15,6 +16,9 @@ export default function BasicPage({ post, markdown, search }) {
1516 }
1617 return (
1718 <Container>
19+ <Head>
20+ <title>Urbit • {post.title}</title>
21+ </Head>
1822 <SingleColumn>
1923 <Header search={search} />
2024 <Section narrow>
components/ContentArea.js+12−10
@@ -1,17 +1,19 @@
11export default function ContentArea(props) {
22 return (
33 <div className="w-full min-w-0 flex flex-col">
4− <header className="flex justify-between items-center px-4 md:px-12 lg:px-24 pt-12 pb-8">
4+ <header className="w-full px-4 md:px-8 md:w-10/12 flex flex-row justify-between items-center pt-8 md:pt-10 lg:pt-12 pb-10 md:pb-12 lg:pb-24">
55 <div className="type-ui">{props.section}</div>
6− <button
7− onClick={(e) => {
8− e.stopPropagation();
9− props.search.toggleSearch();
10− }}
11− className="button-sm bg-wall text-gray"
12− >
13− Search<div className="ml-4 text-lightGray">⌘K</div>
14− </button>
6+ {
7+ // <button
8+ // onClick={(e) => {
9+ // e.stopPropagation();
10+ // props.search.toggleSearch();
11+ // }}
12+ // className="button-sm bg-wall text-gray"
13+ // >
14+ // Search<div className="ml-4 text-lightGray">⌘K</div>
15+ // </button>
16+ }
1517 </header>
1618 <div className="px-4 md:px-12 lg:px-24 pb-24 pt-16 flex flex-col w-full max-h-screen h-screen overflow-y-scroll">
1719 <div className="type-ui text-lightGray">{props.breadcrumbs}</div>
components/Footer.js+36−29
@@ -5,34 +5,36 @@ import { contact } from "../lib/constants";
55
66export default function Footer() {
77 return (
8− <footer className="py-16 bg-wall w-full mt-48 flex justify-center">
8+ <footer className="bg-wall w-full mt-48 flex justify-center">
99 <SingleColumn>
10− <Section short className="flex">
11− <div className="w-1/3 flex flex-col flex-shrink">
12− <h4 className="mb-8">Use Urbit</h4>
13− <Link href="">
10+ <Section short className="flex flex-row flex-wrap">
11+ <div className="w-1/2 md:w-1/3 flex flex-col flex-shrink">
12+ <h4 className="mt-16 mb-8">Use Urbit</h4>
13+ <Link href="https://github.com/urbit/port/releases">
1414 <div>
1515 <a className="type-sub text-gray">Urbit Client</a>
1616 </div>
1717 </Link>
18− <Link href="">
18+ <Link href="https://github.com/urbit/urbit/releases">
1919 <div>
2020 <a className="mt-2 type-sub text-gray">Urbit Binaries</a>
2121 </div>
2222 </Link>
23− <Link href="">
24− <div>
25− <a className="mt-2 type-sub text-gray">Urbit Apps</a>
26− </div>
27− </Link>
28− <Link href="">
23+ {
24+ // <Link href="">
25+ // <div>
26+ // <a className="mt-2 type-sub text-gray">Urbit Apps</a>
27+ // </div>
28+ // </Link>
29+ }
30+ <Link href="/getting-started/planet/#hosting-providers">
2931 <div>
3032 <a className="mt-2 type-sub text-gray">Hosting Providers</a>
3133 </div>
3234 </Link>
3335 </div>
34− <div className="w-1/3 flex flex-col flex-shrink">
35− <h4 className="mb-8">About</h4>
36+ <div className="w-1/2 md:w-1/3 flex flex-col flex-shrink">
37+ <h4 className="mt-16 mb-8">About</h4>
3638 <Link href="/understanding-urbit">
3739 <div>
3840 <a className="type-sub text-gray">What's Urbit?</a>
@@ -54,8 +56,8 @@ export default function Footer() {
5456 </div>
5557 </Link>
5658 </div>
57− <div className="w-1/3 flex flex-col flex-shrink">
58− <h4 className="mb-8">News</h4>
59+ <div className="w-1/2 md:w-1/3 flex flex-col flex-shrink">
60+ <h4 className="mt-16 mb-8">News</h4>
5961 <Link href="/blog">
6062 <div>
6163 <a className="type-sub text-gray">Blog</a>
@@ -67,10 +69,9 @@ export default function Footer() {
6769 </div>
6870 </Link>
6971 </div>
70− </Section>
71− <Section short className="flex">
72− <div className="w-1/3 flex flex-col">
73− <h4 className="mb-8">Develop</h4>
72+
73+ <div className="w-1/2 md:w-1/3 flex flex-col">
74+ <h4 className="mt-16 mb-8">Develop</h4>
7475 <Link href="/docs">
7576 <div>
7677 <a className="type-sub text-gray">Documentation</a>
@@ -87,8 +88,8 @@ export default function Footer() {
8788 </div>
8889 </Link>
8990 </div>
90− <div className="w-1/3 flex flex-col">
91− <h4 className="mb-8">Contribute</h4>
91+ <div className="w-1/2 md:w-1/3 flex flex-col">
92+ <h4 className="mt-16 mb-8">Contribute</h4>
9293 <Link href="https://github.com/urbit/urbit/issues">
9394 <div>
9495 <a className="type-sub text-gray">Issue Tracker</a>
@@ -100,8 +101,9 @@ export default function Footer() {
100101 </div>
101102 </Link>
102103 </div>
103− <div className="w-1/3 flex flex-col">
104− <h4 className="mb-8">Community</h4>
104+
105+ <div className="w-1/2 md:w-1/3 flex flex-col">
106+ <h4 className="mt-16 mb-8">Community</h4>
105107 <Link href="https://groups.google.com/a/urbit.org/g/dev?pli=1">
106108 <div>
107109 <a className="type-sub text-gray">Dev Mailing List</a>
@@ -124,24 +126,29 @@ export default function Footer() {
124126 </Link>
125127 </div>
126128 </Section>
127− <Section short className="flex">
128− <div className="w-1/3">
129+ <Section className="flex flex-col md:flex-row">
130+ <div className="md:w-1/3">
129131 <Link href="/privacy">
130132 <div>
131133 <a className="type-sub text-gray">Privacy Policy</a>
132134 </div>
133135 </Link>
134136 </div>
135− <div className="w-1/3">
137+ <div className="md:w-1/3">
136138 <Link href="/terms-of-service">
137139 <div>
138140 <a className="type-sub text-gray">Terms of Service</a>
139141 </div>
140142 </Link>
141143 </div>
142− <div className="w-1/3">
144+ <div className="md:w-1/3">
143145 <div>
144− <a className="type-sub text-gray">{"mailto:" + contact.email}</a>
146+ <a
147+ href={"mailto:" + contact.email}
148+ className="type-sub text-gray"
149+ >
150+ {contact.email}
151+ </a>
145152 </div>
146153 </div>
147154 </Section>
components/Header.js+4−1
@@ -66,7 +66,7 @@ export default function Header(props) {
6666 }
6767 <MenuTray isOpen={isOpen} toggleTray={toggleTray}>
6868 <Link href="/">
69− <a className="type-ui mb-12 mt-8">Urbit</a>
69+ <a className="type-ui mb-12">Urbit</a>
7070 </Link>
7171 <ActiveLink className="mr-5 mb-4 type-h3" href="/docs">
7272 Docs
@@ -77,6 +77,9 @@ export default function Header(props) {
7777 <ActiveLink className="mr-5 mb-4 type-h3" href="/events">
7878 Events
7979 </ActiveLink>
80+ <ActiveLink className="mr-5 mb-4 type-h3" href="/grants">
81+ Grants
82+ </ActiveLink>
8083 </MenuTray>
8184
8285 {
components/MenuTray.js+4−2
@@ -36,9 +36,11 @@ export default function MenuTray(props) {
3636 className={`bg-washedWhite w-screen h-screen ${overlayClasses}`}
3737 />
3838 <div
39− className={`absolute bg-wall h-screen top-0 left-0 p-4 tray-menu-width overflow-y-scroll ${trayClasses}`}
39+ className={`absolute bg-wall h-screen top-0 left-0 tray-menu-width overflow-y-scroll ${trayClasses}`}
4040 >
41− <div className="flex flex-col">{props.children}</div>
41+ <div className="flex flex-col px-4 md:px-8 pt-8 md:pt-10 lg:pt-12 pb-10 md:pb-12 lg:pb-24">
42+ {props.children}
43+ </div>
4244 </div>
4345 </nav>
4446 );
components/Sidebar.js+1−1
@@ -20,7 +20,7 @@ export default function Sidebar(props) {
2020
2121 <div className="block md:hidden">
2222 <MenuTray isOpen={isOpen} toggleTray={toggleTray}>
23− <header className="flex flex-shrink-0 justify-between items-center pt-8 pb-8">
23+ <header className="flex flex-shrink-0 justify-between items-center pb-8">
2424 <Link href="/">
2525 <a className="type-ui text-gray">Urbit</a>
2626 </Link>
content/events/2021-04-29-developer-call-real-time-communications-on-urbit.md+1−3
@@ -13,15 +13,13 @@ description = "Video chat on Urbit? It's nearly here with WebRTC."
1313youtube = "XFct6JZHPC0"
1414+++
1515
16−
1716Video chat on Urbit? It's nearly here using the WebRTC protocol. Edward Amsden (`~ritpub-sipsyl`) will be giving us a look at the WebRTC Airlock library that he has developed that handles all the hard parts of WebRTC. This will allow developers to simply call or answer calls by ship or app name. Edward will also be giving us a live text-based demo of WebRTC on urbit. Please join us for an exciting presentation.
1817
1918Edward is a software developer and the principal of Black River Software LLC. He has several years experience building both backend and IoT software in Haskell, and in particular building IoT control and software deployment infrastructure. He also has academic background in programming language research.
2019
2120As usual, there'll be an opportunity to jump on the call with us afterward to ask questions and hang out.
2221
23−
24−## Resources
22+## Resources
2523
2624- [Urbit WebRTC on GitHub](https://github.com/black-river-software/urbit-webrtc)
2725- Check out WebRTC progress reports on `~ritpub-sipsyl/webrtc-on-urbit`
pages/404.js+3
@@ -7,6 +7,9 @@ import Section from "../components/Section";
77export default function NotFound(props) {
88 return (
99 <Container>
10+ <Head>
11+ <title>Urbit • 404</title>
12+ </Head>
1013 <SingleColumn>
1114 <Header search={props.search} />
1215 <Section className="pt-48">
pages/blog.js+5−3
@@ -11,11 +11,14 @@ import { getAllPosts, formatDate } from "../lib/lib";
1111export default function Blog({ posts, search }) {
1212 return (
1313 <Container>
14+ <Head>
15+ <title>Urbit • Blog</title>
16+ </Head>
1417 <SingleColumn>
1518 <Header search={search} />
1619 <Section narrow>
1720 <div className="measure">
18− <h2 className="pb-16">Urbit Blog</h2>
21+ <h1 className="pb-16">Blog</h1>
1922 <p className="pb-6">
2023 Stories from the broader Urbit community, the Urbit Foundation,
2124 and the many people contributing to Urbit.
@@ -37,8 +40,7 @@ export default function Blog({ posts, search }) {
3740 post.extra.image ? (
3841 <BackgroundImage
3942 src={post.extra.image}
40− style={{ height: "620px" }}
41− className="w-full rounded-lg"
43+ className="w-full rounded-lg tile-height"
4244 />
4345 ) : null
4446 }
pages/events.js+97−50
@@ -10,60 +10,104 @@ import Section from "../components/Section";
1010import BackgroundImage from "../components/BackgroundImage";
1111import { getAllPosts, formatDate } from "../lib/lib";
1212
13−function assignEventCard(event) {
14− if (event.extra.youtube) {
15− return (
16− <img
17− src={`http://img.youtube.com/vi/${event.extra.youtube}/maxresdefault.jpg`}
18− className="w-full rounded-lg h-auto w-full"
19− />
20− );
21− }
22−
23− if (event.extra.image) {
24− return (
25− <BackgroundImage
26− src={event.extra.image}
27− style={{ height: "620px" }}
28− className="w-full rounded-lg"
29− />
30− );
31− }
13+// function assignEventCard(event) {
14+// if (event.extra.youtube) {
15+// return (
16+// <img
17+// src={`http://img.youtube.com/vi/${event.extra.youtube}/maxresdefault.jpg`}
18+// className="w-full rounded-lg h-auto w-full"
19+// />
20+// );
21+// }
22+//
23+// if (event.extra.image) {
24+// return (
25+// <BackgroundImage
26+// src={event.extra.image}
27+// style={{ height: "620px" }}
28+// className="w-full rounded-lg"
29+// />
30+// );
31+// }
32+//
33+// return (
34+// <div
35+// className="w-full rounded-lg bg-wall"
36+// style={{ height: "620px" }}
37+// ></div>
38+// );
39+// }
40+//
41+// function EventCard(props) {
42+// return (
43+// <div key={props.event.slug} className="mb-24 cursor-pointer">
44+// <Link href={`/events/${props.event.slug}`}>
45+// <div>
46+// {assignEventCard(props.event)}
47+// <h3 className="mt-4">{props.event.title}</h3>
48+// <div className="flex items-baseline">
49+// {props.event.extra.author ? (
50+// <div className="type-ui text-gray mt-4">
51+// {props.event.extra.author}
52+// </div>
53+// ) : null}
54+// {props.event.extra.author && post.extra.ship ? (
55+// <div className="mx-1 text-gray">•</div>
56+// ) : null}
57+// {props.event.extra.ship ? (
58+// <div className="type-ui text-gray font-mono">
59+// {props.event.extra.ship}
60+// </div>
61+// ) : null}
62+// </div>
63+//
64+// <div className="type-ui text-gray mt-2">
65+// {formatDate(new Date(props.event.date))} - {props.event.extra.time}
66+// </div>
67+// </div>
68+// </Link>
69+// </div>
70+// );
71+// }
3272
73+function EventCard({ event }) {
3374 return (
3475 <div
35− className="w-full rounded-lg bg-wall"
36− style={{ height: "620px" }}
37− ></div>
38− );
39−}
40−
41−function EventCard(props) {
42− return (
43− <div key={props.event.slug} className="mb-24 cursor-pointer">
44− <Link href={`/events/${props.event.slug}`}>
45− <div>
46− {assignEventCard(props.event)}
47− <h3 className="mt-4">{props.event.title}</h3>
48− <div className="flex items-baseline">
49− {props.event.extra.author ? (
50− <div className="type-ui text-gray mt-4">
51− {props.event.extra.author}
52− </div>
53− ) : null}
54− {props.event.extra.author && post.extra.ship ? (
55− <div className="mx-1 text-gray">•</div>
56− ) : null}
57− {props.event.extra.ship ? (
58− <div className="type-ui text-gray font-mono">
59− {props.event.extra.ship}
60− </div>
61− ) : null}
76+ key={event.slug}
77+ className="mb-24 cursor-pointer bg-wall rounded-xl tile-height"
78+ style={{ backgroundImage: event.extra?.image || "" }}
79+ >
80+ <Link href={`/events/${event.slug}`}>
81+ <div className="flex flex-col p-8 justify-between items-between h-full relative">
82+ <div className="flex-grow-1 flex flex-col justify-center h-full">
83+ <h3 className="mb-4">{event.title}</h3>
84+ <h4 className="mt-4 type-gray">{event?.type}</h4>
6285 </div>
63−
64− <div className="type-ui text-gray mt-2">
65− {formatDate(new Date(props.event.date))} - {props.event.extra.time}
86+ <div className="absolute left-8 bottom-8 w-full">
87+ <p className="text-gray">{event.extra.host}</p>
88+ <p className="text-gray">{event.extra.guests}</p>
6689 </div>
90+ {event.extra.youtube ? (
91+ <a
92+ onClick={(e) => e.stopPropagation()}
93+ className="absolute w-16 h-16 right-8 bottom-8 bg-white flex items-center justify-center rounded-full bg-cover bg-center bg-no-repeat"
94+ target="_blank"
95+ href={`https://www.youtube.com/watch?v=${event.extra.youtube}`}
96+ >
97+ <svg
98+ width="48"
99+ height="48"
100+ viewBox="0 0 16 16"
101+ fill="none"
102+ xmlns="http://www.w3.org/2000/svg"
103+ >
104+ <path
105+ d="M11.25 7.56699C11.5833 7.75944 11.5833 8.24056 11.25 8.43301L6.75 11.0311C6.41667 11.2235 6 10.983 6 10.5981L6 5.40192C6 5.01702 6.41667 4.77646 6.75 4.96891L11.25 7.56699Z"
106+ fill="black"
107+ />
108+ </svg>
109+ </a>
110+ ) : null}
67111 </div>
68112 </Link>
69113 </div>
@@ -73,11 +117,14 @@ function EventCard(props) {
73117export default function Events({ pastEvents, currentEvents, search }) {
74118 return (
75119 <Container>
120+ <Head>
121+ <title>Urbit • Events</title>
122+ </Head>
76123 <SingleColumn>
77124 <Header search={search} />
78125 <Section narrow>
79126 <div className="measure">
80− <h2 className="pb-16">Urbit Events</h2>
127+ <h1 className="pb-16">Events</h1>
81128 <p className="pb-6">
82129 Events of all kinds: In-person, Remote, and Recorded.
83130 </p>
pages/events/[slug].js+1−1
@@ -66,7 +66,7 @@ export default function Event({
6666 </Section>
6767 <Section narrow className={markdownStyles["markdown"]}>
6868 <article
69− className="flex flex-col items-center pt-12 w-full"
69+ className="pt-12 w-full"
7070 dangerouslySetInnerHTML={{ __html: decode(markdown) }}
7171 ></article>
7272 </Section>
pages/grants.js+6−4
@@ -91,10 +91,11 @@ export default function Grants({
9191 );
9292 });
9393
94− console.log("filteredPosts:", filteredPosts);
95−
9694 return (
9795 <Container>
96+ <Head>
97+ <title>Urbit • Grants</title>
98+ </Head>
9899 <SingleColumn>
99100 <Header search={search} />
100101 {
@@ -102,7 +103,7 @@ export default function Grants({
102103 }
103104 <Section wide>
104105 <div className="measure pb-16">
105− <h2 className="pb-16">Urbit Grants</h2>
106+ <h1 className="pb-16">Grants</h1>
106107 <p className="mb-8">
107108 Urbit is a community project. While anyone can contribute, we help
108109 focus development and reward exceptional contribution through our
@@ -122,7 +123,8 @@ export default function Grants({
122123 </i>
123124 </p>
124125 <p>
125− — Urbit Community Member <pre>~radbur-sivmus</pre>
126+ — Urbit Community Member{" "}
127+ <pre className="ml-6">~radbur-sivmus</pre>
126128 </p>
127129 </div>
128130 </Section>
pages/index.js+4−1
@@ -48,6 +48,9 @@ export default function Home({ posts, events, openGrantsCount, search }) {
4848
4949 return (
5050 <Container>
51+ <Head>
52+ <title>Urbit</title>
53+ </Head>
5154 <SingleColumn>
5255 <Header search={search} />
5356
@@ -94,7 +97,7 @@ export default function Home({ posts, events, openGrantsCount, search }) {
9497 }
9598 <Section narrow>
9699 <div className="flex flex-col md:flex-row md:items-center items-start measure pb-12">
97− <h2 className="m-0 p-0 mr-4 md:mb-0 mb-4">Urbit Grants</h2>
100+ <h2 className="m-0 p-0 mr-4 md:mb-0 mb-4">Grants</h2>
98101 <Link href="/grants">
99102 <a className="bg-green text-white badge-lg">
100103 {openGrantsCount} Open
styles/globals.css+4
@@ -63,6 +63,10 @@ button {
6363 border: none;
6464}
6565
66+.tile-height {
67+ height: 38rem;
68+}
69+
6670.button-sm {
6771 @apply flex px-4 py-1 rounded-lg type-ui;
6872}