Skip to content

Commit

Permalink
Add Christchurch Branding
Browse files Browse the repository at this point in the history
  • Loading branch information
consindo committed Sep 17, 2019
1 parent 2f45679 commit b0925a4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
Binary file added dist/icons/normal/metro-canterbury.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/photos/nz-chc.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dist/photos/nz-wlg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions js/views/pages/Settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let styles

const renderLinks = items =>
items.map((item, key) => (
<View key={key} style={styles.creditRow}>
<View key={item[0]} style={styles.creditRow}>
<Text accessibilityRole="link" href={item[0]} style={styles.link}>
{item[1]}
</Text>
Expand Down Expand Up @@ -101,11 +101,14 @@ const Settings = () => {
['https://jono.nz', 'Jono Cooper', 'Engineering'],
['http://mattdavidson.kiwi', 'Matt Davidson', 'Engineering'],
['http://www.generationzero.org/', 'Generation Zero', 'Artwork'],
])}
{renderLinks([
['https://at.govt.nz', 'Auckland Transport', 'API Usage'],
['https://www.openstreetmap.org/', 'OpenStreetMap', 'Map Data'],
['https://www.openmaptiles.com/', 'OpenMapTiles', 'Map Data'],
[
'https://www.flickr.com/photos/vdmakwana/35888025371/',
'Vishal Makwana',
'Christchurch Imagery - Cropped',
],
])}
<Text style={[paragraphStyles.p, styles.love]}>
Made with 💚 in Aotearoa, NZ
Expand Down
19 changes: 16 additions & 3 deletions js/views/root/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ class RootContent extends React.Component {
}

render() {
const { desktopLayout, stations } = this.state
const { desktopLayout, stations, currentCity } = this.state
let twitterAcc
if (this.state.currentCity.prefix === 'nz-akl') {
if (currentCity.prefix === 'nz-akl') {
twitterAcc = (
<Sidebar
type="url"
Expand All @@ -77,7 +77,19 @@ class RootContent extends React.Component {
description={t('serviceAlerts.twitter', { account: 'AklTransport' })}
/>
)
} else if (this.state.currentCity.prefix === 'nz-wlg') {
} else if (currentCity.prefix === 'nz-chc') {
twitterAcc = (
<Sidebar
type="url"
url="https://twitter.com/MetroCanterbury"
icon="metro-canterbury.png"
name="Metro"
description={t('serviceAlerts.twitter', {
account: 'MetroCanterbury',
})}
/>
)
} else if (currentCity.prefix === 'nz-wlg') {
twitterAcc = (
<Sidebar
type="url"
Expand All @@ -88,6 +100,7 @@ class RootContent extends React.Component {
/>
)
}

const secondTwo = [
<Sidebar
key="city"
Expand Down

0 comments on commit b0925a4

Please sign in to comment.