Skip to content

Commit a33310f

Browse files
authored
Stack@Illinois! (#256)
* Rebrand to Stack@Illinois * Auto-kill the joke at midnight * Meme page title
1 parent f25ee3e commit a33310f

File tree

4 files changed

+40
-3
lines changed

4 files changed

+40
-3
lines changed

src/components/Header.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
Button,
1313
} from 'reactstrap'
1414
import { connect } from 'react-redux'
15+
import moment from 'moment'
1516

1617
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
1718
import { faUser } from '@fortawesome/free-solid-svg-icons'
@@ -52,12 +53,23 @@ class Header extends React.Component {
5253
// on the login page. If that's the case, disable the link to the homepage
5354
// so they can't cycle repeatedly back and forth between that and the
5455
// login page
56+
let brandText
57+
if (moment().isAfter('2019-04-02T00:00:00-0500')) {
58+
brandText = 'Queue@Illinois'
59+
} else {
60+
brandText = (
61+
<>
62+
<span style={{ textDecoration: 'line-through' }}>Queue</span>
63+
Stack@Illinois
64+
</>
65+
)
66+
}
5567
const brandLink = user ? (
5668
<Link route="index" passHref>
57-
<NavbarBrand>Queue@Illinois</NavbarBrand>
69+
<NavbarBrand>{brandText}</NavbarBrand>
5870
</Link>
5971
) : (
60-
<NavbarBrand tag="span">Queue@Illinois</NavbarBrand>
72+
<NavbarBrand tag="span">{brandText}</NavbarBrand>
6173
)
6274

6375
return (
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react'
2+
import { Alert } from 'reactstrap'
3+
import moment from 'moment'
4+
5+
const StackRebrandingAlert = () => {
6+
// Hide alert after April Fool's day
7+
if (moment().isAfter('2019-04-02 00:00:00.000-05')) return null
8+
9+
return (
10+
<Alert color="primary" fade={false}>
11+
<span className="mr-3">We&apos;re rebranding to Stack@Illinois!</span>
12+
<strong>
13+
<a href="https://queue.illinois.edu/blog/stack">
14+
Read&nbsp;more&nbsp;→
15+
</a>
16+
</strong>
17+
</Alert>
18+
)
19+
}
20+
21+
export default StackRebrandingAlert

src/pages/_document.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from 'react'
33
import Document, { Head, Main, NextScript } from 'next/document'
44
import flush from 'styled-jsx/server'
55
import { dom } from '@fortawesome/fontawesome-svg-core'
6+
import moment from 'moment'
67

78
import { baseUrl, isDev, isNow } from '../util'
89

@@ -27,6 +28,7 @@ export default class MyDocument extends Document {
2728
}
2829
const faviconPath = `${baseUrl}/static/favicon.ico`
2930
const manifestPath = `${baseUrl}/static/manifest.json`
31+
const isAprilFools = moment().isBefore('2019-04-02 00:00:00.000-05')
3032
return (
3133
<html lang="en">
3234
<Head>
@@ -46,7 +48,7 @@ export default class MyDocument extends Document {
4648
crossOrigin="use-credentials"
4749
href={manifestPath}
4850
/>
49-
<title>Queue@Illinois</title>
51+
<title>{isAprilFools ? 'Stack@Illinois' : 'Queue@Illinois'}</title>
5052
<style>{dom.css()}</style>
5153
<link rel="icon" href={faviconPath} type="image/png" />
5254
<script dangerouslySetInnerHTML={script} />

src/pages/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import NewQueue from '../components/NewQueue'
2020
import ShowForAdmin from '../components/ShowForAdmin'
2121
import DevWorkshopAd from '../components/DevWorkshopAd'
2222
import QueueCardListContainer from '../containers/QueueCardListContainer'
23+
import StackRebrandingAlert from '../components/StackRebrandingAlert'
2324

2425
class Index extends React.Component {
2526
static async getInitialProps({ store, isServer }) {
@@ -113,6 +114,7 @@ class Index extends React.Component {
113114
<Fragment>
114115
<Container>
115116
<DevWorkshopAd />
117+
<StackRebrandingAlert />
116118
<div className="d-flex flex-wrap align-items-center mb-4">
117119
<h1 className="display-4 d-inline-block mb-0 mt-3 mr-auto pr-3">
118120
Open queues

0 commit comments

Comments
 (0)