on master help sign in
separate iana timezone, more polish
commit9433e2e27fdb69bd6880a63317aa6439d78f2011 authorGavin Atkinson <gvnatknsn@protonmail.com> dateWed 18 Aug 2021, 21:20 (5 years ago) parent688adac
52 files changed+194−85
components/EventPreview.js+41−34 components/Snippets.js+16−16 content/events/2017-08-11-after-hours-bootstrapping-urbit-from-the-ethereum-blockchain.md+1 content/events/2017-09-22-after-hours-fun-with-arvo-the-urbit-os.md+1 content/events/2017-10-26-after-hours-designing-robust-human-systems.md+1 content/events/2017-11-16-after-hours-visiting-contributors.md+1 content/events/2018-01-26-urbit-irl-20181.md+1 content/events/2018-02-23-urbit-irl-20182.md+1 content/events/2018-03-11-20183-hoon-school.md+1 content/events/2018-03-23-urbit-irl-20183.md+1 content/events/2018-04-08-20184-hoon-school.md+1 content/events/2018-05-25-urbit-irl-20185.md+1 content/events/2018-08-03-after-hours-decentralized-web-summit.md+1 content/events/2018-08-17-urbit-irl-20188.md+1 content/events/2018-09-21-urbit-irl-20189.md+1 content/events/2018-10-10-urbit-zcash-blockchain-week.md+1 content/events/2018-12-20-after-hours-its-just-a-party-man.md+1 content/events/2019-03-01-after-hours-ask-galen-anything.md+1 content/events/2019-03-08-urbit-irl-austin-tx.md+1 content/events/2019-04-19-urbit-irl-20194.md+1 content/events/2019-05-17-urbit-irl-20195.md+1 content/events/2019-06-21-urbit-irl-20196.md+1 content/events/2019-07-19-urbit-irl-20197.md+1 content/events/2019-08-29-urbit-austin-20198.md+1 content/events/2019-10-04-urbit-irl-201910.md+1 content/events/2019-11-15-urbit-irl-201911.md+1 content/events/2019-12-13-urbit-irl-201912.md+1 content/events/2020-01-24-urbit-irl-20201.md+1 content/events/2020-02-28-urbit-irl-20202.md+1 content/events/2020-04-03-urbit-os1-launch-party.md+1 content/events/2020-10-09-urbit-hosting-launch-event.md+1 content/events/2020-11-05-developer-call-graph-store.md+1 content/events/2020-11-19-developer-call-bittorrent-tracking-on-urbit.md+1 content/events/2020-12-10-developer-call-injecting-external-services-into-urbit.md+1 content/events/2021-02-04-developer-call-architectural-idea-maze.md+1 content/events/2021-03-04-developer-call-scaling-azimuth.md+1 content/events/2021-03-18-developer-call-pressure-and-protolith.md+1 content/events/2021-04-01-developer-call-javascript-apps-on-urbit.md+1 content/events/2021-04-15-developer-call-software-distribution.md+1 content/events/2021-04-27-bitcoin-launch.md+1 content/events/2021-04-29-developer-call-real-time-communications-on-urbit.md+1 content/events/2021-05-13-developer-call-versioned-networking.md+1 content/events/2021-05-27-town-hall.md+3−2 content/events/2021-07-01-developer-call-runtime-future.md+1 content/events/2021-07-15-developer-call-yakshaving.md+3−2 content/events/2021-09-02-21q3-dc-meetup.md+3−2 lib/lib.js+9−4 pages/events.js+1 pages/events/[slug].js+56−22 pages/index.js+12−1 scripts/event_date_upgrade.js+4−2 styles/globals.css+5
components/EventPreview.js+41−34
@@ -6,6 +6,7 @@ import {
66 generateRealtimeDate,
77 formatDate,
88 formatTime,
9+ formatTimeZone,
910} from "../lib/lib";
1011
1112export default function EventPreview({ event, className, big }) {
@@ -13,12 +14,13 @@ export default function EventPreview({ event, className, big }) {
1314 const grayText = event?.dark ? "text-midWhite" : "text-wall-400";
1415 const blackText = event?.dark ? "text-white" : "text-wall-600";
1516
16− const starts = generateDisplayDate(event.date);
17− const ends = generateDisplayDate(event.ends);
17+ const starts = generateDisplayDate(event.date, event.timezone);
18+ const ends = generateDisplayDate(event.ends, event.timezone);
19+
20+ const inFuture = generateRealtimeDate(starts) > DateTime.now();
1821
19− const hasEnded = generateRealtimeDate(event.ends) > DateTime.now();
2022 const happeningNow =
21− generateRealtimeDate(event.date) > DateTime.now() && !hasEnded;
23+ generateRealtimeDate(event.date) > DateTime.now() && !inFuture;
2224
2325 return (
2426 <div className={`cursor-pointer aspect-w-5 aspect-h-4 ${className}`}>
@@ -43,46 +45,51 @@ export default function EventPreview({ event, className, big }) {
4345 {typeof event.ends !== "undefined"
4446 ? ` to ${formatTime(ends)}`
4547 : null}
48+ {" " + formatTimeZone(starts)}
4649 </p>
4750 </div>
4851
49− <div className="absolute p-4 left-0 bottom-0 w-full">
52+ <div className="absolute p-6 left-0 bottom-0 w-full pr-32">
5053 <ShowOrHide condition={event.hosts}>
51− <p className={`type-sub-bold ${blackText}`}>
52− {event.hosts
53− ? event.hosts.length > 1
54− ? "Hosts"
55− : "Host"
56− : null}
54+ <p className={blackText + " type-sub"}>
55+ <b>{"Hosted by "}</b>
56+ <ReadableList>
57+ {event.hosts?.map((host, index) => {
58+ return (
59+ <Person
60+ key={`${host.name}-${host.patp}`}
61+ nameClassNames={blackText}
62+ patpClassNames={blackText}
63+ name={host.name}
64+ patp={host.patp}
65+ />
66+ );
67+ })}
68+ </ReadableList>
5769 </p>
5870 </ShowOrHide>
59− <ShowOrHide condition={event.hosts}>
60− <ReadableList>
61− {event.hosts?.map((host, index) => (
62− <Person person={host} />
63− ))}
64− </ReadableList>
65− </ShowOrHide>
6671 <ShowOrHide condition={event.guests}>
67− <p className={`type-sub-bold pt-2 ${blackText}`}>
68− {event.guests
69− ? event.guests.length > 1
70− ? "With guests"
71− : "With guest"
72− : null}
72+ <p className={blackText + " type-sub"}>
73+ <b>
74+ {event.guests?.length > 1 ? "With guests " : "With guest "}
75+ </b>
76+ <ReadableList>
77+ {event.guests?.map((guest, index) => (
78+ <Person
79+ key={`${guest.name}-${guest.patp}`}
80+ nameClassNames={blackText}
81+ patpClassNames={blackText}
82+ name={guest.name}
83+ patp={guest.patp}
84+ />
85+ ))}
86+ </ReadableList>
7387 </p>
7488 </ShowOrHide>
75− <ShowOrHide condition={event.guests}>
76− <ReadableList>
77− {event.guests?.map((guest, index) => (
78− <Person person={guest} />
79− ))}
80− </ReadableList>
81− </ShowOrHide>
8289 </div>
8390
84− {hasEnded && event.registration_url ? (
85− <div className="absolute right-0 bottom-0 p-4">
91+ {inFuture && event.registration_url ? (
92+ <div className="absolute right-0 bottom-0 p-6">
8693 <a
8794 className="button-sm bg-green-400 text-white"
8895 href={event.registration_url}
@@ -93,7 +100,7 @@ export default function EventPreview({ event, className, big }) {
93100 </a>
94101 </div>
95102 ) : event.youtube ? (
96− <div className="absolute right-0 bottom-0 p-4">
103+ <div className="absolute right-0 bottom-0 p-6">
97104 <a
98105 className="button-sm bg-wall-600 text-white"
99106 href={`https://www.youtube.com/watch?v=${event.youtube}`}
components/Snippets.js+16−16
@@ -1,30 +1,30 @@
11export function Name({ children, className }) {
2− return (
3− <b className={`type-sub font-normal ${className || ""}`}>{children}</b>
4− );
2+ return <b className={`font-normal ${className || ""}`}>{children}</b>;
53}
64
75export function Patp({ children, className }) {
8− return (
9− <code className={`type-sub opacity-50 font-mono ${className || ""}`}>
10− {children}
11− </code>
12− );
6+ return <code className={`font-mono ${className || ""}`}>{children}</code>;
137}
148
159// Used to render a human name alongside their @p
16−export function Person({ person, nameClassNames, patpClassNames, className }) {
10+export function Person({
11+ name,
12+ patp,
13+ nameClassNames,
14+ patpClassNames,
15+ className,
16+}) {
1717 return (
1818 <>
19− {person.patp && person.name ? (
19+ {patp && name ? (
2020 <>
21− <Name className={nameClassNames}>{person.name}</Name>{" "}
22− <Patp className={patpClassNames}>{person.patp}</Patp>
21+ <Name className={nameClassNames}>{name}</Name>{" "}
22+ <Patp className={patpClassNames + " opacity-60"}>{patp}</Patp>
2323 </>
24− ) : person.patp ? (
25− <Patp className={patpClassNames}>{person.patp}</Patp>
26− ) : person.name ? (
27− <Name className={nameClassNames}>{person.name}</Name>
24+ ) : patp ? (
25+ <Patp className={patpClassNames}>{patp}</Patp>
26+ ) : name ? (
27+ <Name className={nameClassNames}>{name}</Name>
2828 ) : null}
2929 </>
3030 );
content/events/2017-08-11-after-hours-bootstrapping-urbit-from-the-ethereum-blockchain.md+1
@@ -8,6 +8,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/242295411/"
88description = "This time we'll be opening up the office, opening up a few cold ones, and talking about Urbit + Ethereum."
99date = "2017-08-12T04:00:00.000-07:00"
1010guests = ""
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Urbit"
content/events/2017-09-22-after-hours-fun-with-arvo-the-urbit-os.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/243213975/"
77description = "Same as usual: cold drinks in the backyard with the hoons.  Come meet other people crazy enough to want to replace the internet."
88date = "2017-09-23T04:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2017-10-26-after-hours-designing-robust-human-systems.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/244316080/"
77description = "The office will be open and the beer will be cold.  Come hang out and talk about all things Urbit and Urbit related.  Cryptoeconomics, protocols, architecture, Japanese poetry, ancient aqueducts.  You get the idea."
88date = "2017-10-27T04:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2017-11-16-after-hours-visiting-contributors.md+1
@@ -6,6 +6,7 @@ image = ""
66registration_url = "https://www.meetup.com/urbit-sf/events/245090392/"
77description = "We've moved! Come check out our new digs, have a beer and hear about what people have been working on."
88date = "2017-11-17T04:00:00.000-08:00"
9+timezone = "America/Los_Angeles"
910
1011[[hosts]]
1112name = "Urbit"
content/events/2018-01-26-urbit-irl-20181.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/246972285/"
77description = "Happy New Year!"
88date = "2018-01-27T04:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-02-23-urbit-irl-20182.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/247797527/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have something to drink."
88date = "2018-02-24T04:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-03-11-20183-hoon-school.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/248416276/"
77description = "Come, bring your laptop, and we'll get you started building things in Urbit's language — Hoon."
88date = "2018-03-12T04:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-03-23-urbit-irl-20183.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/248852261/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer."
88date = "2018-03-24T04:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-04-08-20184-hoon-school.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/249019207/"
77description = "Come, bring your laptop, and we'll get you started building things in Urbit's language — Hoon."
88date = "2018-04-08T21:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-05-25-urbit-irl-20185.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/250889557/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
88date = "2018-05-26T04:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-08-03-after-hours-decentralized-web-summit.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/253423219/"
77description = "We’re hosting a last minute happy hour for our friends in town for the Decentralized Web Summit. All are welcome to join us tomorrow, Friday, August 3 at the Orbit Room from 5-7PM."
88date = "2018-08-04T01:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-08-17-urbit-irl-20188.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/253292678/"
77description = "UPDATE: Hey Everyone! Due to a conflict, we are rescheduling our gathering to the following Friday, August 17."
88date = "2018-08-18T04:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-09-21-urbit-irl-20189.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/254602025/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
88date = "2018-09-22T04:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-10-10-urbit-zcash-blockchain-week.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/255001807/"
77description = "We're all full and looking forward to seeing you tonight. After you check-in at the front door please come up to floor 2, room 222."
88date = "2018-10-11T03:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2018-12-20-after-hours-its-just-a-party-man.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/256732938/"
77description = "We had a busy and productive 2018. This time around, we're just going to play music and relax."
88date = "2018-12-21T03:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-03-01-after-hours-ask-galen-anything.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/259144802/"
77description = "We thought we'd try something new this month. Come hang out and ask Galen questions about Azimuth, Arvo, or any part of Urbit."
88date = "2019-03-02T03:30:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-03-08-urbit-irl-austin-tx.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/259307805/"
77description = "We're coming to Austin, TX! It turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a drink on us. Feel free to bring friends and come early for Urbit shirts."
88date = "2019-03-09T01:00:00.000-08:00"
99guests = ""
10+timezone = "America/Chicago"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-04-19-urbit-irl-20194.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/260326318/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
88date = "2019-04-20T03:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-05-17-urbit-irl-20195.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/261110620/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer, or wine."
88date = "2019-05-18T03:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-06-21-urbit-irl-20196.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/262079477/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have some beer and pizza."
88date = "2019-06-22T03:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-07-19-urbit-irl-20197.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/262858100/"
77description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and chat with old and new friends over a beer."
88date = "2019-07-20T03:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-08-29-urbit-austin-20198.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/263655974/"
77description = "Thanks to our friends over at Garage for offering to host another meetup in Austin, Texas."
88date = "2019-08-30T02:00:00.000-07:00"
99guests = ""
10+timezone = "America/Chicago"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-10-04-urbit-irl-201910.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/265165676/"
77description = "Lately, Urbit has been having dangerous amounts of fun online. So we got thinking, 'Wouldn't it be smart to try having fun offline as well?' Thus, we invented something totally new: an offline chatroom."
88date = "2019-10-05T03:00:00.000-07:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-11-15-urbit-irl-201911.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/266146513/"
77description = "Lately, Urbit has been having dangerous amounts of fun online. So we got thinking, 'Wouldn't it be smart to try having fun offline as well?' Thus, we invented something totally new: an offline chatroom."
88date = "2019-11-16T03:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2019-12-13-urbit-irl-201912.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/266904108/"
77description = "Come celebrate, friends! Urbit has had quite the decade, transforming from an intercepted interstellar transmission to a functional operating system, which also functions."
88date = "2019-12-14T03:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2020-01-24-urbit-irl-20201.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/267753862/"
77description = "Neo-Urbit arrives from the future."
88date = "2020-01-25T03:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2020-02-28-urbit-irl-20202.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/268519069/"
77description = "Urbit is a wilderness right now. A vast continent of possibility. We're gonna head out there and hack around. Join us."
88date = "2020-02-29T03:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit"
content/events/2020-04-03-urbit-os1-launch-party.md+1
@@ -8,6 +8,7 @@ youtube = "71ViyftPkGk"
88description = "Join us as we launch Urbit OS1!"
99date = "2020-04-04T03:00:00.000-07:00"
1010guests = ""
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Urbit"
content/events/2020-10-09-urbit-hosting-launch-event.md+1
@@ -8,6 +8,7 @@ youtube = "w3qKe_WZr50"
88description = ""
99date = "2020-10-10T01:00:00.000-07:00"
1010guests = ""
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Urbit"
content/events/2020-11-05-developer-call-graph-store.md+1
@@ -8,6 +8,7 @@ youtube = "E4DFuAZQ32Y"
88description = ""
99date = "2020-11-05T17:00:00.000-08:00"
1010guests = ""
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Lane R."
content/events/2020-11-19-developer-call-bittorrent-tracking-on-urbit.md+1
@@ -8,6 +8,7 @@ youtube = "cvx2UV6TJ5I"
88description = "Developer calls are focused on the technologies that underpin Urbit, from the top of the stack to the very bottom. They’re an opportunity for the people developing and contributing to Urbit to share their knowledge and expertise, including things that typically don’t make it into the docs, such as how and why Urbit works the way it does."
99date = "2020-11-19T17:00:00.000-08:00"
1010guests = ""
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Lane R."
content/events/2020-12-10-developer-call-injecting-external-services-into-urbit.md+1
@@ -8,6 +8,7 @@ youtube = "LaWNHMmxQag"
88description = ""
99date = "2020-12-10T17:00:00.000-08:00"
1010guests = ""
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Lane R."
content/events/2021-02-04-developer-call-architectural-idea-maze.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/275992798/"
77description = ""
88date = "2021-02-04T17:00:00.000-08:00"
99guests = ""
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Lane R."
content/events/2021-03-04-developer-call-scaling-azimuth.md+1
@@ -8,6 +8,7 @@ youtube = "CKuHXrdkIw0"
88description = ""
99date = "2021-03-04T17:00:00.000-08:00"
1010guests = ""
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Urbit"
content/events/2021-03-18-developer-call-pressure-and-protolith.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/276898246/"
77description = "Matilde Park, Landscape team lead, talks about the distinctions between the Landscape product and basic Urbit development, and the significance of building Landscape for Tlon."
88youtube = "XjIDZQUZZtE"
99date = "2021-03-18T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Josh Lehman"
content/events/2021-04-01-developer-call-javascript-apps-on-urbit.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/277261928/"
77description = "In this talk, Tyler Brown Cifu Shuster (~radbur-sivmus) explains how to use Javascript tools to develop a client for Urbit."
88youtube = "avLSSdb2VLM"
99date = "2021-04-01T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Mike Osborne"
content/events/2021-04-15-developer-call-software-distribution.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/277474491/"
77description = "Some exciting work has been going on behind the scenes to provide the foundation for 3rd party software distribution."
88youtube = "XwICC6Its1E"
99date = "2021-04-15T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Josh Lehman"
content/events/2021-04-27-bitcoin-launch.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/276741426/"
77youtube = "_aRnfacZPto"
88description = "Bitcoin is coming to Urbit! With the upcoming release of the Bitcoin Wallet, you will be able to pay Urbit ships directly with BTC."
99date = "2021-04-27T20:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Urbit Foundation"
content/events/2021-04-29-developer-call-real-time-communications-on-urbit.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/277674273/"
77description = "Video chat on Urbit? It's nearly here with WebRTC."
88youtube = "XFct6JZHPC0"
99date = "2021-04-29T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Josh Lehman"
content/events/2021-05-13-developer-call-versioned-networking.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/278052029/"
77description = "Versioned Networking for Application Developers"
88youtube = "BhQ1vk4jGsk"
99date = "2021-05-14T00:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Josh Lehman"
content/events/2021-05-27-town-hall.md+3−2
@@ -1,13 +1,14 @@
11+++
22title = "Town Hall"
3−ends = "2021-05-27T23:30:00.000-07:00"
3+ends = "2021-05-27T23:30"
44location = "Online Event"
55image = "https://media.urbit.org/site/events/URBIT-TOWN-HALL.png"
66registration_url = "https://www.meetup.com/urbit-sf/events/278188361/"
77description = "A virtual mini-conference for the Urbit community featuring a special keynote talk from our friend Justin Murphy."
88youtube = "8YSwt0vDPj0"
9−date = "2021-05-27T20:00:00.000-07:00"
9+date = "2021-05-27T20:00"
1010dark = true
11+timezone = "America/Los_Angeles"
1112
1213[[hosts]]
1314name = "Josh Lehman"
content/events/2021-07-01-developer-call-runtime-future.md+1
@@ -7,6 +7,7 @@ registration_url = "https://www.meetup.com/urbit-sf/events/279137337/"
77description = "The current and future thinking about the Urbit runtime"
88youtube = "z0grAh_yhE8"
99date = "2021-07-01T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Ted Blackman"
content/events/2021-07-15-developer-call-yakshaving.md+3−2
@@ -1,12 +1,13 @@
11+++
22title = "Developer Call: Urbit Yakshaving"
3−ends = "2021-07-15T18:00:00.000-07:00"
3+ends = "2021-07-15T18:00"
44location = "Online Event"
55image = ""
66registration_url = "https://www.meetup.com/urbit-sf/events/279349114/"
77description = "A look at ~littel-wolfer's Hoon development setup"
88youtube = "AG6IPaXbiiY"
9−date = "2021-07-15T17:00:00.000-07:00"
9+date = "2021-07-15T17:00"
10+timezone = "America/Los_Angeles"
1011
1112[[hosts]]
1213name = "Josh Lehman"
content/events/2021-09-02-21q3-dc-meetup.md+3−2
@@ -1,11 +1,12 @@
11+++
22title = "Urbit DC Meetup Q3 2021"
3−ends = "2021-09-02T17:30:00.000-04:00"
3+ends = ""
44location = "Room 1213, 1730 Rhode Island Ave NW, Washington, DC"
55image = ""
66registration_url = "https://www.meetup.com/DC-Urbit-Meetup-Group/events/279885879/"
77description = "Urbit Meetup in DC"
8−date = "2021-09-02T14:30:00.000-04:00"
8+date = "2021-09-02T17:30:00"
9+timezone = "America/New_York"
910
1011[[hosts]]
1112patp = "~tillys-fasryp"
lib/lib.js+9−4
@@ -142,9 +142,9 @@ export function capitalize(str) {
142142}
143143
144144// Takes an ISO 8601 date string
145−// Returns a time relative to the timezone in the iso8601 string
146−export function generateDisplayDate(iso8601) {
147− return DateTime.fromISO(iso8601, { setZone: true });
145+// Returns a time relative to the IANA timezone and iso8601 date
146+export function generateDisplayDate(iso8601, zone) {
147+ return DateTime.fromISO(iso8601, { zone });
148148}
149149
150150// Takes an ISO 8601 date string
@@ -160,7 +160,12 @@ export function formatDateAndTime(dateTimeObject) {
160160
161161// Formats a DateTime object to something like "5:00 PM"
162162export function formatTime(dateTimeObject) {
163− return dateTimeObject.toLocaleString(DateTime.TIME_SIMPLE);
163+ const dt = dateTimeObject.toLocaleString(DateTime.TIME_SIMPLE);
164+ return dt.replace(/:00/g, "");
165+}
166+
167+export function formatTimeZone(dateTimeObject) {
168+ return dateTimeObject.offsetNameShort;
164169}
165170
166171// Formats a DateTime object to something like "Jul 15, 2021"
pages/events.js+1
@@ -36,6 +36,7 @@ export default function Events({ posts, search }) {
3636 const starts = generateRealtimeDate(post.date);
3737 return starts > now;
3838 });
39+
3940 const happeningNow = posts.filter((post) => {
4041 const starts = generateRealtimeDate(post.date);
4142 const ends = generateRealtimeDate(post.ends);
pages/events/[slug].js+56−22
@@ -1,4 +1,5 @@
11import { useRouter } from "next/router";
2+import { DateTime } from "luxon";
23import {
34 getPostBySlug,
45 getAllPosts,
@@ -7,6 +8,7 @@ import {
78 formatDate,
89 formatTime,
910 generateDisplayDate,
11+ generateRealtimeDate,
1012} from "../../lib/lib";
1113import Head from "next/head";
1214import Meta from "../../components/Meta";
@@ -28,8 +30,12 @@ export default function Event({
2830 markdown,
2931 search,
3032}) {
31− const starts = generateDisplayDate(event.date);
32− const ends = generateDisplayDate(event.ends);
33+ const starts = generateDisplayDate(event.date, event.timezone);
34+ const ends = generateDisplayDate(event.ends, event.timezone);
35+
36+ const hasEnded = generateRealtimeDate(event.ends) > DateTime.now();
37+ const happeningNow =
38+ generateRealtimeDate(event.date) > DateTime.now() && !hasEnded;
3339
3440 return (
3541 <Container>
@@ -42,32 +48,57 @@ export default function Event({
4248 <Section narrow short>
4349 <h1>{event.title}</h1>
4450 <h3 className="mt-6">{event.description}</h3>
45− <p className="text-wall-400 mt-6">{formatDate(starts)}</p>
46− <p className="text-wall-400">
51+ <p className="text-wall-600 mt-6">{formatDate(starts)}</p>
52+ <p className="text-wall-600">
4753 {formatTime(starts)}
48− <ShowOrHide
49− condition={typeof event.ends !== "undefined"}
50− >{` to ${formatTime(ends)}`}</ShowOrHide>
51− </p>
52− <h4>{`Host${event.hosts.length > 1 ? "s" : ""}`}</h4>
53− <p>
54− <ReadableList>
55− {event.hosts.map((host) => (
56− <Person person={host} />
57− ))}
58− </ReadableList>
54+ <ShowOrHide condition={typeof event.ends !== "undefined"}>
55+ {` to ${formatTime(ends)}`}
56+ {" " + starts.toFormat("ZZZZ")}
57+ </ShowOrHide>
5958 </p>
60− {event.guests ? (
61− <>
62− <h4>{`With Guest${event.hosts.length > 1 ? "s" : ""}`}</h4>
59+ <div className="mt-6">
60+ <ShowOrHide condition={event.hosts}>
6361 <p>
62+ {"Hosted by "}
6463 <ReadableList>
65− {event.guests.map((guest) => (
66− <Person person={guest} />
64+ {event.hosts?.map((host, index) => {
65+ return (
66+ <Person
67+ key={`${host.name}-${host.patp}`}
68+ name={host.name}
69+ patp={host.patp}
70+ />
71+ );
72+ })}
73+ </ReadableList>
74+ </p>
75+ </ShowOrHide>
76+ <ShowOrHide condition={event.guests}>
77+ <p>
78+ {event.guests?.length > 1 ? "With guest " : "With guest "}
79+ <ReadableList>
80+ {event.guests?.map((guest, index) => (
81+ <Person
82+ key={`${guest.name}-${guest.patp}`}
83+ name={guest.name}
84+ patp={guest.patp}
85+ />
6786 ))}
6887 </ReadableList>
6988 </p>
70− </>
89+ </ShowOrHide>
90+ </div>
91+ {hasEnded && event.registration_url ? (
92+ <div className="table mt-6">
93+ <a
94+ className="button-sm bg-green-400 text-white"
95+ href={event.registration_url}
96+ onClick={(e) => e.stopPropagation()}
97+ target="_blank"
98+ >
99+ RSVP
100+ </a>
101+ </div>
71102 ) : null}
72103 </Section>
73104 <Section short wide>
@@ -79,7 +110,7 @@ export default function Event({
79110 src={`https://www.youtube.com/embed/${event.youtube}`}
80111 frameBorder="0"
81112 allow="encrypted-media"
82− allowfullscreen
113+ allowFullScreen
83114 ></iframe>
84115 ) : null}
85116 </Section>
@@ -132,6 +163,7 @@ export async function getStaticProps({ params }) {
132163 "hosts",
133164 "guests",
134165 "dark",
166+ "timezone",
135167 ],
136168 "events"
137169 ) || null;
@@ -152,6 +184,7 @@ export async function getStaticProps({ params }) {
152184 "hosts",
153185 "guests",
154186 "dark",
187+ "timezone",
155188 ],
156189 "events"
157190 ) || null;
@@ -172,6 +205,7 @@ export async function getStaticProps({ params }) {
172205 "guests",
173206 "content",
174207 "dark",
208+ "timezone",
175209 ],
176210 "events"
177211 );
pages/index.js+12−1
@@ -252,7 +252,18 @@ export async function getStaticProps() {
252252 );
253253
254254 const events = getAllPosts(
255− ["title", "slug", "date", "guests", "hosts", "registration_url", "ends"],
255+ [
256+ "title",
257+ "slug",
258+ "date",
259+ "guests",
260+ "hosts",
261+ "registration_url",
262+ "ends",
263+ "timezone",
264+ "youtube",
265+ "image",
266+ ],
256267 "events"
257268 );
258269
scripts/event_date_upgrade.js+4−2
@@ -35,8 +35,10 @@ fs.readdirSync(dir, { withFileTypes: true })
3535 // hours: 12,
3636 // });
3737
38− fileContents.data.guests = fileContents.data.contributors;
39− delete fileContents.data.contributors;
38+ // fileContents.data.guests = fileContents.data.contributors;
39+ // delete fileContents.data.contributors;
40+
41+ fileContents.data.timezone = "America/Los_Angeles";
4042
4143 const data = matter.stringify(
4244 fileContents.content,
styles/globals.css+5
@@ -18,6 +18,11 @@ a {
1818 cursor: pointer;
1919}
2020
21+b,
22+strong {
23+ @apply font-semibold;
24+}
25+
2126p a {
2227 @apply text-green-400 font-semibold;
2328}