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)) diff --git a/components/DevWorkshopAd.js b/components/DevWorkshopAd.js new file mode 100644 index 00000000..5843a81b --- /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 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! + + 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