From fa58bbfe9e00f877be2b428a1c5bfcf66070aafe Mon Sep 17 00:00:00 2001 From: Nathan Walters Date: Thu, 19 Apr 2018 14:43:05 -0500 Subject: [PATCH 1/3] Add ad for dev workshop --- components/DevWorkshopAd.js | 26 ++++++++++++++++++++++++++ pages/index.js | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 components/DevWorkshopAd.js diff --git a/components/DevWorkshopAd.js b/components/DevWorkshopAd.js new file mode 100644 index 00000000..90bc805c --- /dev/null +++ b/components/DevWorkshopAd.js @@ -0,0 +1,26 @@ +import React from 'react' +import { Alert } from 'reactstrap' +import moment from 'moment' + +export default () => { + // Hide ad once the event starts + if (moment().isAfter('2018-04-24 19:00:00.000-05')) return null + + return ( + +
Want to work on the queue?
+

+ Join us for a development workshop on Thursday, April 24th at 7PM in + Siebel 2405. We'll teach you how to run a version of the queue on + your machine, introduce you to the architecture, go over how to + contribute, and more! + + More information + +

+
+ ) +} diff --git a/pages/index.js b/pages/index.js index a376e74e..ce0e35f2 100644 --- a/pages/index.js +++ b/pages/index.js @@ -27,6 +27,7 @@ import NewCourse from '../components/NewCourse' import NewQueue from '../components/NewQueue' import ShowForAdmin from '../components/ShowForAdmin' import QueueCardListContainer from '../containers/QueueCardListContainer' +import DevWorkshopAd from '../components/DevWorkshopAd' class Index extends React.Component { static async getInitialProps({ store, isServer }) { @@ -109,6 +110,7 @@ class Index extends React.Component { return ( +

Open queues From 1eb2e118ae025e03a4ada1ff16b2840f7e0679d4 Mon Sep 17 00:00:00 2001 From: Nathan Walters Date: Thu, 19 Apr 2018 14:46:00 -0500 Subject: [PATCH 2/3] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9e0e5a..ad6742dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ with the current date and the next changes should go under a **[Next]** header. ## [Next] +* Show dev workshop ad on homepage. ([@nwalters512](https://github.com/nwalters512) in [#107](https://github.com/illinois/queue/pull/107)) + ## 18 April 2018 * Fix course shortcode link to work in browsers besides Chrome. ([@nwalters512](https://github.com/nwalters512) in [#101](https://github.com/illinois/queue/pull/101)) From 78b9c1ea65ed63c7e5535c068ab6288aa305dd53 Mon Sep 17 00:00:00 2001 From: Nathan Walters Date: Thu, 19 Apr 2018 14:52:52 -0500 Subject: [PATCH 3/3] Fix date --- components/DevWorkshopAd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/DevWorkshopAd.js b/components/DevWorkshopAd.js index 90bc805c..5843a81b 100644 --- a/components/DevWorkshopAd.js +++ b/components/DevWorkshopAd.js @@ -10,7 +10,7 @@ export default () => {
Want to work on the queue?

- Join us for a development workshop on Thursday, April 24th at 7PM in + Join us for a development workshop on Tuesday, April 24th at 7PM in Siebel 2405. We'll teach you how to run a version of the queue on your machine, introduce you to the architecture, go over how to contribute, and more!