diff --git a/gatsby-config.js b/gatsby-config.js index 2b68c6b..365b360 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -12,6 +12,10 @@ module.exports = { name: `Home`, url: `/`, }, + { + name: 'Schedule', + url: 'https://cfp.campjs.org/campjs-xi/schedule/', + }, { name: `Code of Conduct`, url: `/code-of-conduct`, diff --git a/src/pages/DayName.js b/src/pages/DayName.js new file mode 100644 index 0000000..a9c0157 --- /dev/null +++ b/src/pages/DayName.js @@ -0,0 +1,4 @@ +import * as React from "react"; + +const dayFormatter = new Intl.DateTimeFormat("en-AU", { weekday: "long" }); +export const DayName = ({ date }) => <>{dayFormatter.format(date)}; diff --git a/src/pages/Presenters.js b/src/pages/Presenters.js new file mode 100644 index 0000000..a68e87d --- /dev/null +++ b/src/pages/Presenters.js @@ -0,0 +1,7 @@ +import * as React from "react"; + +const formatter = new Intl.ListFormat("en", { + style: "long", + type: "conjunction" +}); +export const Presenters = ({ persons }) => (<>{formatter.format(persons.map((p) => p.public_name))}); diff --git a/src/pages/schedule.js b/src/pages/schedule.js new file mode 100644 index 0000000..c9e4b5a --- /dev/null +++ b/src/pages/schedule.js @@ -0,0 +1,65 @@ +import * as React from "react"; +import Layout from "../components/layout"; +import Heading from "../components/heading"; + +import schedule from "../../schedule.json"; +import { DayName } from "./DayName"; +import { Presenters } from "./Presenters"; + +const paragraphStyles = { + marginBottom: 48 +}; +const middleParagraphStyles = { + marginBottom: 24 +}; + +const Talk = ({ title, abstract, room, persons, start, duration, url }) => ( +
+
+
{start}
+
...
+
{duration}
+
+
+

{title}

+

+ +

+

{room}

+
+
+); + +const days = schedule.schedule.conference.days.map((day) => { + return ( +
+

+ {} +

+ + {Object.entries(day.rooms).map(([name, room]) => ( + <>{room.map(Talk)} + ))} +
+ ); +}); + +const Page = ({ location }) => { + return ( + + 🏕 Schedule + + {days} + + ); +}; + +export default Page;