Skip to content

Commit 274d50b

Browse files
KSTO view native
Remove the webview Add logo, button, text Add colors for ksto
1 parent 2b85dc0 commit 274d50b

File tree

3 files changed

+56
-8
lines changed

3 files changed

+56
-8
lines changed
54.2 KB
Loading

views/components/colors.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ export const theLatest = '#00BFFF'
3131
export const olevilleGold = '#F7B600'
3232
export const olevilleBackground = '#F0F0E1'
3333

34+
// MARK: KSTO Colors
35+
export const kstoPrimaryLight = '#c5c5e8'
36+
export const kstoSecondaryLight = '#7789bb'
37+
export const kstoPrimaryDark = '#686ea1'
38+
export const kstoSecondaryDark = '#4c4f71'
39+
export const kstoTextLight = '#dcdde5'
40+
export const kstoTextDark = '#bebad4'
41+
3442
// MARK: System Colors
3543
export const infoBlue = 'rgb(47, 112, 225)'
3644
export const success = 'rgb(83, 215, 106)'

views/streaming/radio.js

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,67 @@ import React from 'react'
88
import {
99
StyleSheet,
1010
View,
11-
WebView,
11+
Text,
12+
Linking,
13+
Platform,
14+
Image,
1215
} from 'react-native'
13-
16+
import Button from 'react-native-button'
17+
import * as c from '../components/colors'
1418
// let kstoDownload = 'itms://itunes.apple.com/us/app/ksto/id953916647'
1519

16-
const url = 'http://pages.stolaf.edu/ksto/listen/'
20+
const url = 'http://elijahverdoorn.com' // For Drew Volz to update
21+
const image = require('../../data/images/streaming/ksto/ksto-logo.png')
1722

1823
export default function KSTOView() {
1924
return (
2025
<View style={styles.container}>
21-
<WebView
22-
source={{uri: url}}
23-
startInLoadingState={true}
24-
style={styles.container}
25-
/>
26+
<Image source={image} style={styles.logo} />
27+
<Text style={styles.kstoText}>St. Olaf College Radio</Text>
28+
<Text style={styles.kstoText}>KSTO 93.1 FM</Text>
29+
<Button
30+
onPress={() => {
31+
if (Platform.OS === 'android') {
32+
Linking.openURL(url).catch(err => console.error('An error occurred', err))
33+
} else {
34+
//Drew does stuff here
35+
}
36+
}}
37+
style={styles.button}
38+
>Listen to KSTO</Button>
39+
<Text style={styles.kstoSubtext}>Look out for changes here soon!</Text>
2640
</View>
2741
)
2842
}
2943

3044
let styles = StyleSheet.create({
3145
container: {
3246
flex: 1,
47+
alignItems: 'center',
48+
marginTop: 15,
49+
},
50+
kstoText: {
51+
marginTop: 5,
52+
color: c.kstoPrimaryDark,
53+
fontSize: 25,
54+
},
55+
kstoSubtext: {
56+
marginTop: 5,
57+
},
58+
logo: {
59+
width: 300,
60+
height: 300,
61+
},
62+
button: {
63+
backgroundColor: c.denim,
64+
width: 200,
65+
color: c.white,
66+
alignSelf: 'center',
67+
height: 30,
68+
paddingTop: 3,
69+
marginBottom: 10,
70+
marginTop: 10,
71+
borderRadius: 6,
72+
overflow: 'hidden',
3373
},
3474
})

0 commit comments

Comments
 (0)