on master help sign in
separate iana timezone, more polish
9433e2eGavin Atkinson
components/EventPreview.js+41−34
@@ -6,6 +6,7 @@ import {
6 generateRealtimeDate,
6 generateRealtimeDate,
7 formatDate,
7 formatDate,
8 formatTime,
8 formatTime,
9+ formatTimeZone,
9} from "../lib/lib";
10} from "../lib/lib";
10
11
11export default function EventPreview({ event, className, big }) {
12export default function EventPreview({ event, className, big }) {
@@ -13,12 +14,13 @@ export default function EventPreview({ event, className, big }) {
13 const grayText = event?.dark ? "text-midWhite" : "text-wall-400";
14 const grayText = event?.dark ? "text-midWhite" : "text-wall-400";
14 const blackText = event?.dark ? "text-white" : "text-wall-600";
15 const blackText = event?.dark ? "text-white" : "text-wall-600";
15
16
16− const starts = generateDisplayDate(event.date);
17+ const starts = generateDisplayDate(event.date, event.timezone);
17− const ends = generateDisplayDate(event.ends);
18+ const ends = generateDisplayDate(event.ends, event.timezone);
19+
20+ const inFuture = generateRealtimeDate(starts) > DateTime.now();
18
21
19− const hasEnded = generateRealtimeDate(event.ends) > DateTime.now();
20 const happeningNow =
22 const happeningNow =
21− generateRealtimeDate(event.date) > DateTime.now() && !hasEnded;
23+ generateRealtimeDate(event.date) > DateTime.now() && !inFuture;
22
24
23 return (
25 return (
24 <div className={`cursor-pointer aspect-w-5 aspect-h-4 ${className}`}>
26 <div className={`cursor-pointer aspect-w-5 aspect-h-4 ${className}`}>
@@ -43,46 +45,51 @@ export default function EventPreview({ event, className, big }) {
43 {typeof event.ends !== "undefined"
45 {typeof event.ends !== "undefined"
44 ? ` to ${formatTime(ends)}`
46 ? ` to ${formatTime(ends)}`
45 : null}
47 : null}
48+ {" " + formatTimeZone(starts)}
46 </p>
49 </p>
47 </div>
50 </div>
48
51
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">
50 <ShowOrHide condition={event.hosts}>
53 <ShowOrHide condition={event.hosts}>
51− <p className={`type-sub-bold ${blackText}`}>
54+ <p className={blackText + " type-sub"}>
52− {event.hosts
55+ <b>{"Hosted by "}</b>
56+ <ReadableList>
53− ? event.hosts.length > 1
57+ {event.hosts?.map((host, index) => {
54− ? "Hosts"
58+ return (
55− : "Host"
59+ <Person
56− : null}
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>
57 </p>
69 </p>
58 </ShowOrHide>
70 </ShowOrHide>
59− <ShowOrHide condition={event.hosts}>
60− <ReadableList>
61− {event.hosts?.map((host, index) => (
62− <Person person={host} />
63− ))}
64− </ReadableList>
65− </ShowOrHide>
66 <ShowOrHide condition={event.guests}>
71 <ShowOrHide condition={event.guests}>
67− <p className={`type-sub-bold pt-2 ${blackText}`}>
72+ <p className={blackText + " type-sub"}>
73+ <b>
68− {event.guests
74+ {event.guests?.length > 1 ? "With guests " : "With guest "}
69− ? event.guests.length > 1
75+ </b>
70− ? "With guests"
76+ <ReadableList>
71− : "With guest"
77+ {event.guests?.map((guest, index) => (
72− : null}
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>
73 </p>
87 </p>
74 </ShowOrHide>
88 </ShowOrHide>
75− <ShowOrHide condition={event.guests}>
76− <ReadableList>
77− {event.guests?.map((guest, index) => (
78− <Person person={guest} />
79− ))}
80− </ReadableList>
81− </ShowOrHide>
82 </div>
89 </div>
83
90
84− {hasEnded && event.registration_url ? (
91+ {inFuture && event.registration_url ? (
85− <div className="absolute right-0 bottom-0 p-4">
92+ <div className="absolute right-0 bottom-0 p-6">
86 <a
93 <a
87 className="button-sm bg-green-400 text-white"
94 className="button-sm bg-green-400 text-white"
88 href={event.registration_url}
95 href={event.registration_url}
@@ -93,7 +100,7 @@ export default function EventPreview({ event, className, big }) {
93 </a>
100 </a>
94 </div>
101 </div>
95 ) : event.youtube ? (
102 ) : event.youtube ? (
96− <div className="absolute right-0 bottom-0 p-4">
103+ <div className="absolute right-0 bottom-0 p-6">
97 <a
104 <a
98 className="button-sm bg-wall-600 text-white"
105 className="button-sm bg-wall-600 text-white"
99 href={`https://www.youtube.com/watch?v=${event.youtube}`}
106 href={`https://www.youtube.com/watch?v=${event.youtube}`}
components/Snippets.js+16−16
@@ -1,30 +1,30 @@
1export function Name({ children, className }) {
1export function Name({ children, className }) {
2− return (
3− <b className={`type-sub font-normal ${className || ""}`}>{children}</b>
2+ return <b className={`font-normal ${className || ""}`}>{children}</b>;
4− );
5}
3}
6
4
7export function Patp({ children, className }) {
5export function Patp({ children, className }) {
8− return (
9− <code className={`type-sub opacity-50 font-mono ${className || ""}`}>
6+ return <code className={`font-mono ${className || ""}`}>{children}</code>;
10− {children}
11− </code>
12− );
13}
7}
14
8
15// Used to render a human name alongside their @p
9// 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+}) {
17 return (
17 return (
18 <>
18 <>
19− {person.patp && person.name ? (
19+ {patp && name ? (
20 <>
20 <>
21− <Name className={nameClassNames}>{person.name}</Name>{" "}
21+ <Name className={nameClassNames}>{name}</Name>{" "}
22− <Patp className={patpClassNames}>{person.patp}</Patp>
22+ <Patp className={patpClassNames + " opacity-60"}>{patp}</Patp>
23 </>
23 </>
24− ) : person.patp ? (
24+ ) : patp ? (
25− <Patp className={patpClassNames}>{person.patp}</Patp>
25+ <Patp className={patpClassNames}>{patp}</Patp>
26− ) : person.name ? (
26+ ) : name ? (
27− <Name className={nameClassNames}>{person.name}</Name>
27+ <Name className={nameClassNames}>{name}</Name>
28 ) : null}
28 ) : null}
29 </>
29 </>
30 );
30 );
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/"
8description = "This time we'll be opening up the office, opening up a few cold ones, and talking about Urbit + Ethereum."
8description = "This time we'll be opening up the office, opening up a few cold ones, and talking about Urbit + Ethereum."
9date = "2017-08-12T04:00:00.000-07:00"
9date = "2017-08-12T04:00:00.000-07:00"
10guests = ""
10guests = ""
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Urbit"
14name = "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/"
7description = "Same as usual: cold drinks in the backyard with the hoons.  Come meet other people crazy enough to want to replace the internet."
7description = "Same as usual: cold drinks in the backyard with the hoons.  Come meet other people crazy enough to want to replace the internet."
8date = "2017-09-23T04:00:00.000-07:00"
8date = "2017-09-23T04:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "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."
7description = "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."
8date = "2017-10-27T04:00:00.000-07:00"
8date = "2017-10-27T04:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "Urbit"
content/events/2017-11-16-after-hours-visiting-contributors.md+1
@@ -6,6 +6,7 @@ image = ""
6registration_url = "https://www.meetup.com/urbit-sf/events/245090392/"
6registration_url = "https://www.meetup.com/urbit-sf/events/245090392/"
7description = "We've moved! Come check out our new digs, have a beer and hear about what people have been working on."
7description = "We've moved! Come check out our new digs, have a beer and hear about what people have been working on."
8date = "2017-11-17T04:00:00.000-08:00"
8date = "2017-11-17T04:00:00.000-08:00"
9+timezone = "America/Los_Angeles"
9
10
10[[hosts]]
11[[hosts]]
11name = "Urbit"
12name = "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/"
7description = "Happy New Year!"
7description = "Happy New Year!"
8date = "2018-01-27T04:00:00.000-08:00"
8date = "2018-01-27T04:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have something to drink."
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have something to drink."
8date = "2018-02-24T04:00:00.000-08:00"
8date = "2018-02-24T04:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Come, bring your laptop, and we'll get you started building things in Urbit's language — Hoon."
7description = "Come, bring your laptop, and we'll get you started building things in Urbit's language — Hoon."
8date = "2018-03-12T04:00:00.000-07:00"
8date = "2018-03-12T04:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer."
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer."
8date = "2018-03-24T04:00:00.000-07:00"
8date = "2018-03-24T04:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Come, bring your laptop, and we'll get you started building things in Urbit's language — Hoon."
7description = "Come, bring your laptop, and we'll get you started building things in Urbit's language — Hoon."
8date = "2018-04-08T21:00:00.000-07:00"
8date = "2018-04-08T21:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
8date = "2018-05-26T04:00:00.000-07:00"
8date = "2018-05-26T04:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "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."
7description = "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."
8date = "2018-08-04T01:00:00.000-07:00"
8date = "2018-08-04T01:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "UPDATE: Hey Everyone! Due to a conflict, we are rescheduling our gathering to the following Friday, August 17."
7description = "UPDATE: Hey Everyone! Due to a conflict, we are rescheduling our gathering to the following Friday, August 17."
8date = "2018-08-18T04:00:00.000-07:00"
8date = "2018-08-18T04:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
8date = "2018-09-22T04:00:00.000-07:00"
8date = "2018-09-22T04:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "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."
7description = "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."
8date = "2018-10-11T03:00:00.000-07:00"
8date = "2018-10-11T03:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "We had a busy and productive 2018. This time around, we're just going to play music and relax."
7description = "We had a busy and productive 2018. This time around, we're just going to play music and relax."
8date = "2018-12-21T03:00:00.000-08:00"
8date = "2018-12-21T03:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "We thought we'd try something new this month. Come hang out and ask Galen questions about Azimuth, Arvo, or any part of Urbit."
7description = "We thought we'd try something new this month. Come hang out and ask Galen questions about Azimuth, Arvo, or any part of Urbit."
8date = "2019-03-02T03:30:00.000-08:00"
8date = "2019-03-02T03:30:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "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."
7description = "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."
8date = "2019-03-09T01:00:00.000-08:00"
8date = "2019-03-09T01:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Chicago"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer (or wine)."
8date = "2019-04-20T03:00:00.000-07:00"
8date = "2019-04-20T03:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer, or wine."
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have a beer, or wine."
8date = "2019-05-18T03:00:00.000-07:00"
8date = "2019-05-18T03:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have some beer and pizza."
7description = "Turns out that just getting Urbit fans in one room is pretty fun — so come hang out and have some beer and pizza."
8date = "2019-06-22T03:00:00.000-07:00"
8date = "2019-06-22T03:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "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."
7description = "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."
8date = "2019-07-20T03:00:00.000-07:00"
8date = "2019-07-20T03:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Thanks to our friends over at Garage for offering to host another meetup in Austin, Texas."
7description = "Thanks to our friends over at Garage for offering to host another meetup in Austin, Texas."
8date = "2019-08-30T02:00:00.000-07:00"
8date = "2019-08-30T02:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Chicago"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "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."
7description = "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."
8date = "2019-10-05T03:00:00.000-07:00"
8date = "2019-10-05T03:00:00.000-07:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "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."
7description = "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."
8date = "2019-11-16T03:00:00.000-08:00"
8date = "2019-11-16T03:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Come celebrate, friends! Urbit has had quite the decade, transforming from an intercepted interstellar transmission to a functional operating system, which also functions."
7description = "Come celebrate, friends! Urbit has had quite the decade, transforming from an intercepted interstellar transmission to a functional operating system, which also functions."
8date = "2019-12-14T03:00:00.000-08:00"
8date = "2019-12-14T03:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Neo-Urbit arrives from the future."
7description = "Neo-Urbit arrives from the future."
8date = "2020-01-25T03:00:00.000-08:00"
8date = "2020-01-25T03:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "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/"
7description = "Urbit is a wilderness right now. A vast continent of possibility. We're gonna head out there and hack around. Join us."
7description = "Urbit is a wilderness right now. A vast continent of possibility. We're gonna head out there and hack around. Join us."
8date = "2020-02-29T03:00:00.000-08:00"
8date = "2020-02-29T03:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit"
13name = "Urbit"
content/events/2020-04-03-urbit-os1-launch-party.md+1
@@ -8,6 +8,7 @@ youtube = "71ViyftPkGk"
8description = "Join us as we launch Urbit OS1!"
8description = "Join us as we launch Urbit OS1!"
9date = "2020-04-04T03:00:00.000-07:00"
9date = "2020-04-04T03:00:00.000-07:00"
10guests = ""
10guests = ""
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Urbit"
14name = "Urbit"
content/events/2020-10-09-urbit-hosting-launch-event.md+1
@@ -8,6 +8,7 @@ youtube = "w3qKe_WZr50"
8description = ""
8description = ""
9date = "2020-10-10T01:00:00.000-07:00"
9date = "2020-10-10T01:00:00.000-07:00"
10guests = ""
10guests = ""
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Urbit"
14name = "Urbit"
content/events/2020-11-05-developer-call-graph-store.md+1
@@ -8,6 +8,7 @@ youtube = "E4DFuAZQ32Y"
8description = ""
8description = ""
9date = "2020-11-05T17:00:00.000-08:00"
9date = "2020-11-05T17:00:00.000-08:00"
10guests = ""
10guests = ""
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Lane R."
14name = "Lane R."
content/events/2020-11-19-developer-call-bittorrent-tracking-on-urbit.md+1
@@ -8,6 +8,7 @@ youtube = "cvx2UV6TJ5I"
8description = "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."
8description = "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."
9date = "2020-11-19T17:00:00.000-08:00"
9date = "2020-11-19T17:00:00.000-08:00"
10guests = ""
10guests = ""
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Lane R."
14name = "Lane R."
content/events/2020-12-10-developer-call-injecting-external-services-into-urbit.md+1
@@ -8,6 +8,7 @@ youtube = "LaWNHMmxQag"
8description = ""
8description = ""
9date = "2020-12-10T17:00:00.000-08:00"
9date = "2020-12-10T17:00:00.000-08:00"
10guests = ""
10guests = ""
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Lane R."
14name = "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/"
7description = ""
7description = ""
8date = "2021-02-04T17:00:00.000-08:00"
8date = "2021-02-04T17:00:00.000-08:00"
9guests = ""
9guests = ""
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Lane R."
13name = "Lane R."
content/events/2021-03-04-developer-call-scaling-azimuth.md+1
@@ -8,6 +8,7 @@ youtube = "CKuHXrdkIw0"
8description = ""
8description = ""
9date = "2021-03-04T17:00:00.000-08:00"
9date = "2021-03-04T17:00:00.000-08:00"
10guests = ""
10guests = ""
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Urbit"
14name = "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/"
7description = "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."
7description = "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."
8youtube = "XjIDZQUZZtE"
8youtube = "XjIDZQUZZtE"
9date = "2021-03-18T17:00:00.000-07:00"
9date = "2021-03-18T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Josh Lehman"
13name = "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/"
7description = "In this talk, Tyler Brown Cifu Shuster (~radbur-sivmus) explains how to use Javascript tools to develop a client for Urbit."
7description = "In this talk, Tyler Brown Cifu Shuster (~radbur-sivmus) explains how to use Javascript tools to develop a client for Urbit."
8youtube = "avLSSdb2VLM"
8youtube = "avLSSdb2VLM"
9date = "2021-04-01T17:00:00.000-07:00"
9date = "2021-04-01T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Mike Osborne"
13name = "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/"
7description = "Some exciting work has been going on behind the scenes to provide the foundation for 3rd party software distribution."
7description = "Some exciting work has been going on behind the scenes to provide the foundation for 3rd party software distribution."
8youtube = "XwICC6Its1E"
8youtube = "XwICC6Its1E"
9date = "2021-04-15T17:00:00.000-07:00"
9date = "2021-04-15T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Josh Lehman"
13name = "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/"
7youtube = "_aRnfacZPto"
7youtube = "_aRnfacZPto"
8description = "Bitcoin is coming to Urbit! With the upcoming release of the Bitcoin Wallet, you will be able to pay Urbit ships directly with BTC."
8description = "Bitcoin is coming to Urbit! With the upcoming release of the Bitcoin Wallet, you will be able to pay Urbit ships directly with BTC."
9date = "2021-04-27T20:00:00.000-07:00"
9date = "2021-04-27T20:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Urbit Foundation"
13name = "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/"
7description = "Video chat on Urbit? It's nearly here with WebRTC."
7description = "Video chat on Urbit? It's nearly here with WebRTC."
8youtube = "XFct6JZHPC0"
8youtube = "XFct6JZHPC0"
9date = "2021-04-29T17:00:00.000-07:00"
9date = "2021-04-29T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Josh Lehman"
13name = "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/"
7description = "Versioned Networking for Application Developers"
7description = "Versioned Networking for Application Developers"
8youtube = "BhQ1vk4jGsk"
8youtube = "BhQ1vk4jGsk"
9date = "2021-05-14T00:00:00.000-07:00"
9date = "2021-05-14T00:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Josh Lehman"
13name = "Josh Lehman"
content/events/2021-05-27-town-hall.md+3−2
@@ -1,13 +1,14 @@
1+++
1+++
2title = "Town Hall"
2title = "Town Hall"
3−ends = "2021-05-27T23:30:00.000-07:00"
3+ends = "2021-05-27T23:30"
4location = "Online Event"
4location = "Online Event"
5image = "https://media.urbit.org/site/events/URBIT-TOWN-HALL.png"
5image = "https://media.urbit.org/site/events/URBIT-TOWN-HALL.png"
6registration_url = "https://www.meetup.com/urbit-sf/events/278188361/"
6registration_url = "https://www.meetup.com/urbit-sf/events/278188361/"
7description = "A virtual mini-conference for the Urbit community featuring a special keynote talk from our friend Justin Murphy."
7description = "A virtual mini-conference for the Urbit community featuring a special keynote talk from our friend Justin Murphy."
8youtube = "8YSwt0vDPj0"
8youtube = "8YSwt0vDPj0"
9−date = "2021-05-27T20:00:00.000-07:00"
9+date = "2021-05-27T20:00"
10dark = true
10dark = true
11+timezone = "America/Los_Angeles"
11
12
12[[hosts]]
13[[hosts]]
13name = "Josh Lehman"
14name = "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/"
7description = "The current and future thinking about the Urbit runtime"
7description = "The current and future thinking about the Urbit runtime"
8youtube = "z0grAh_yhE8"
8youtube = "z0grAh_yhE8"
9date = "2021-07-01T17:00:00.000-07:00"
9date = "2021-07-01T17:00:00.000-07:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Ted Blackman"
13name = "Ted Blackman"
content/events/2021-07-15-developer-call-yakshaving.md+3−2
@@ -1,12 +1,13 @@
1+++
1+++
2title = "Developer Call: Urbit Yakshaving"
2title = "Developer Call: Urbit Yakshaving"
3−ends = "2021-07-15T18:00:00.000-07:00"
3+ends = "2021-07-15T18:00"
4location = "Online Event"
4location = "Online Event"
5image = ""
5image = ""
6registration_url = "https://www.meetup.com/urbit-sf/events/279349114/"
6registration_url = "https://www.meetup.com/urbit-sf/events/279349114/"
7description = "A look at ~littel-wolfer's Hoon development setup"
7description = "A look at ~littel-wolfer's Hoon development setup"
8youtube = "AG6IPaXbiiY"
8youtube = "AG6IPaXbiiY"
9−date = "2021-07-15T17:00:00.000-07:00"
9+date = "2021-07-15T17:00"
10+timezone = "America/Los_Angeles"
10
11
11[[hosts]]
12[[hosts]]
12name = "Josh Lehman"
13name = "Josh Lehman"
content/events/2021-09-02-21q3-dc-meetup.md+3−2
@@ -1,11 +1,12 @@
1+++
1+++
2title = "Urbit DC Meetup Q3 2021"
2title = "Urbit DC Meetup Q3 2021"
3−ends = "2021-09-02T17:30:00.000-04:00"
3+ends = ""
4location = "Room 1213, 1730 Rhode Island Ave NW, Washington, DC"
4location = "Room 1213, 1730 Rhode Island Ave NW, Washington, DC"
5image = ""
5image = ""
6registration_url = "https://www.meetup.com/DC-Urbit-Meetup-Group/events/279885879/"
6registration_url = "https://www.meetup.com/DC-Urbit-Meetup-Group/events/279885879/"
7description = "Urbit Meetup in DC"
7description = "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"
9
10
10[[hosts]]
11[[hosts]]
11patp = "~tillys-fasryp"
12patp = "~tillys-fasryp"
lib/lib.js+9−4
@@ -142,9 +142,9 @@ export function capitalize(str) {
142}
142}
143
143
144// Takes an ISO 8601 date string
144// Takes an ISO 8601 date string
145−// Returns a time relative to the timezone in the iso8601 string
145+// Returns a time relative to the IANA timezone and iso8601 date
146−export function generateDisplayDate(iso8601) {
146+export function generateDisplayDate(iso8601, zone) {
147− return DateTime.fromISO(iso8601, { setZone: true });
147+ return DateTime.fromISO(iso8601, { zone });
148}
148}
149
149
150// Takes an ISO 8601 date string
150// Takes an ISO 8601 date string
@@ -160,7 +160,12 @@ export function formatDateAndTime(dateTimeObject) {
160
160
161// Formats a DateTime object to something like "5:00 PM"
161// Formats a DateTime object to something like "5:00 PM"
162export function formatTime(dateTimeObject) {
162export 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;
164}
169}
165
170
166// Formats a DateTime object to something like "Jul 15, 2021"
171// Formats a DateTime object to something like "Jul 15, 2021"
pages/events.js+1
@@ -36,6 +36,7 @@ export default function Events({ posts, search }) {
36 const starts = generateRealtimeDate(post.date);
36 const starts = generateRealtimeDate(post.date);
37 return starts > now;
37 return starts > now;
38 });
38 });
39+
39 const happeningNow = posts.filter((post) => {
40 const happeningNow = posts.filter((post) => {
40 const starts = generateRealtimeDate(post.date);
41 const starts = generateRealtimeDate(post.date);
41 const ends = generateRealtimeDate(post.ends);
42 const ends = generateRealtimeDate(post.ends);
pages/events/[slug].js+56−22
@@ -1,4 +1,5 @@
1import { useRouter } from "next/router";
1import { useRouter } from "next/router";
2+import { DateTime } from "luxon";
2import {
3import {
3 getPostBySlug,
4 getPostBySlug,
4 getAllPosts,
5 getAllPosts,
@@ -7,6 +8,7 @@ import {
7 formatDate,
8 formatDate,
8 formatTime,
9 formatTime,
9 generateDisplayDate,
10 generateDisplayDate,
11+ generateRealtimeDate,
10} from "../../lib/lib";
12} from "../../lib/lib";
11import Head from "next/head";
13import Head from "next/head";
12import Meta from "../../components/Meta";
14import Meta from "../../components/Meta";
@@ -28,8 +30,12 @@ export default function Event({
28 markdown,
30 markdown,
29 search,
31 search,
30}) {
32}) {
31− const starts = generateDisplayDate(event.date);
33+ const starts = generateDisplayDate(event.date, event.timezone);
32− const ends = generateDisplayDate(event.ends);
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;
33
39
34 return (
40 return (
35 <Container>
41 <Container>
@@ -42,32 +48,57 @@ export default function Event({
42 <Section narrow short>
48 <Section narrow short>
43 <h1>{event.title}</h1>
49 <h1>{event.title}</h1>
44 <h3 className="mt-6">{event.description}</h3>
50 <h3 className="mt-6">{event.description}</h3>
45− <p className="text-wall-400 mt-6">{formatDate(starts)}</p>
51+ <p className="text-wall-600 mt-6">{formatDate(starts)}</p>
46− <p className="text-wall-400">
52+ <p className="text-wall-600">
47 {formatTime(starts)}
53 {formatTime(starts)}
48− <ShowOrHide
49− condition={typeof event.ends !== "undefined"}
54+ <ShowOrHide condition={typeof event.ends !== "undefined"}>
50− >{` to ${formatTime(ends)}`}</ShowOrHide>
55+ {` to ${formatTime(ends)}`}
51− </p>
56+ {" " + starts.toFormat("ZZZZ")}
52− <h4>{`Host${event.hosts.length > 1 ? "s" : ""}`}</h4>
57+ </ShowOrHide>
53− <p>
54− <ReadableList>
55− {event.hosts.map((host) => (
56− <Person person={host} />
57− ))}
58− </ReadableList>
59 </p>
58 </p>
60− {event.guests ? (
59+ <div className="mt-6">
61− <>
60+ <ShowOrHide condition={event.hosts}>
62− <h4>{`With Guest${event.hosts.length > 1 ? "s" : ""}`}</h4>
63 <p>
61 <p>
62+ {"Hosted by "}
64 <ReadableList>
63 <ReadableList>
65− {event.guests.map((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) => (
66− <Person person={guest} />
81+ <Person
82+ key={`${guest.name}-${guest.patp}`}
83+ name={guest.name}
84+ patp={guest.patp}
85+ />
67 ))}
86 ))}
68 </ReadableList>
87 </ReadableList>
69 </p>
88 </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>
71 ) : null}
102 ) : null}
72 </Section>
103 </Section>
73 <Section short wide>
104 <Section short wide>
@@ -79,7 +110,7 @@ export default function Event({
79 src={`https://www.youtube.com/embed/${event.youtube}`}
110 src={`https://www.youtube.com/embed/${event.youtube}`}
80 frameBorder="0"
111 frameBorder="0"
81 allow="encrypted-media"
112 allow="encrypted-media"
82− allowfullscreen
113+ allowFullScreen
83 ></iframe>
114 ></iframe>
84 ) : null}
115 ) : null}
85 </Section>
116 </Section>
@@ -132,6 +163,7 @@ export async function getStaticProps({ params }) {
132 "hosts",
163 "hosts",
133 "guests",
164 "guests",
134 "dark",
165 "dark",
166+ "timezone",
135 ],
167 ],
136 "events"
168 "events"
137 ) || null;
169 ) || null;
@@ -152,6 +184,7 @@ export async function getStaticProps({ params }) {
152 "hosts",
184 "hosts",
153 "guests",
185 "guests",
154 "dark",
186 "dark",
187+ "timezone",
155 ],
188 ],
156 "events"
189 "events"
157 ) || null;
190 ) || null;
@@ -172,6 +205,7 @@ export async function getStaticProps({ params }) {
172 "guests",
205 "guests",
173 "content",
206 "content",
174 "dark",
207 "dark",
208+ "timezone",
175 ],
209 ],
176 "events"
210 "events"
177 );
211 );
pages/index.js+12−1
@@ -252,7 +252,18 @@ export async function getStaticProps() {
252 );
252 );
253
253
254 const events = getAllPosts(
254 const events = getAllPosts(
255+ [
256+ "title",
257+ "slug",
258+ "date",
259+ "guests",
260+ "hosts",
255− ["title", "slug", "date", "guests", "hosts", "registration_url", "ends"],
261+ "registration_url",
262+ "ends",
263+ "timezone",
264+ "youtube",
265+ "image",
266+ ],
256 "events"
267 "events"
257 );
268 );
258
269
scripts/event_date_upgrade.js+4−2
@@ -35,8 +35,10 @@ fs.readdirSync(dir, { withFileTypes: true })
35 // hours: 12,
35 // hours: 12,
36 // });
36 // });
37
37
38− fileContents.data.guests = fileContents.data.contributors;
38+ // fileContents.data.guests = fileContents.data.contributors;
39− delete fileContents.data.contributors;
39+ // delete fileContents.data.contributors;
40+
41+ fileContents.data.timezone = "America/Los_Angeles";
40
42
41 const data = matter.stringify(
43 const data = matter.stringify(
42 fileContents.content,
44 fileContents.content,
styles/globals.css+5
@@ -18,6 +18,11 @@ a {
18 cursor: pointer;
18 cursor: pointer;
19}
19}
20
20
21+b,
22+strong {
23+ @apply font-semibold;
24+}
25+
21p a {
26p a {
22 @apply text-green-400 font-semibold;
27 @apply text-green-400 font-semibold;
23}
28}