Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show dev workshop ad on homepage #107

Merged
merged 3 commits into from
Apr 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
26 changes: 26 additions & 0 deletions components/DevWorkshopAd.js
Original file line number Diff line number Diff line change
@@ -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 (
<Alert color="primary">
<h6>Want to work on the queue?</h6>
<p className="mb-0">
Join us for a development workshop on Tuesday, April 24th at 7PM in
Siebel 2405. We&apos;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!
<a
className="ml-2"
href="https://www.facebook.com/events/352213225287320/"
>
More information
</a>
</p>
</Alert>
)
}
2 changes: 2 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down Expand Up @@ -109,6 +110,7 @@ class Index extends React.Component {
return (
<Layout>
<Container>
<DevWorkshopAd />
<div className="d-flex flex-wrap align-items-center mb-4">
<h1 className="display-4 d-inline-block mb-0 mt-3 mr-auto pr-3">
Open queues
Expand Down