diff --git a/App.js b/App.js
index 55f4ab2e..70a04e4d 100644
--- a/App.js
+++ b/App.js
@@ -1,18 +1,30 @@
import React, { useState, useEffect, useRef } from "react";
-import { View, Text } from "react-native";
-import 'react-native-gesture-handler';
-import { StatusBar } from 'expo-status-bar';
-import { SafeAreaProvider } from 'react-native-safe-area-context';
+import { Image } from "react-native";
+import { StatusBar } from "expo-status-bar";
+import { SafeAreaProvider } from "react-native-safe-area-context";
import Navigation, { navigate } from "./navigation";
-import * as Font from 'expo-font';
-import * as Device from 'expo-device'
-import * as Notifications from 'expo-notifications'
+import * as Font from "expo-font";
+import * as Device from "expo-device"
+import * as Notifications from "expo-notifications"
import { initializeApp } from "firebase/app";
-import { getDatabase, ref, push, set } from 'firebase/database'
-import { getAuth, signInWithCustomToken, signInWithEmailAndPassword } from 'firebase/auth'
-import { APIKEY, MESSAGING_SENDER_ID, APP_ID, MEASUREMENT_ID, FIREBASE_PASSWORD, SERVICE_ACCOUNT_ID } from '@env'
-import { getPostAsync } from './helpers/wpapi'
-import { Strings } from './constants'
+import { getDatabase, ref, push, set } from "firebase/database"
+import { getAuth, signInWithEmailAndPassword } from "firebase/auth"
+import { APIKEY, MESSAGING_SENDER_ID, APP_ID, MEASUREMENT_ID, FIREBASE_PASSWORD, SERVICE_ACCOUNT_ID } from "@env"
+import { getPostAsync } from "./helpers/wpapi"
+import { Strings } from "./constants"
+import * as eva from "@eva-design/eva";
+import { ApplicationProvider, IconRegistry, useTheme } from "@ui-kitten/components";
+import { EvaIconsPack } from "@ui-kitten/eva-icons";
+import { DailyBread as bread } from "./theme"
+import { default as mapping } from "./mapping.json"
+import { NavigationContainer } from "@react-navigation/native";
+import { createStackNavigator } from "@react-navigation/stack";
+import ContentStack from "./navigation/ContentStack";
+import SearchStack from "./navigation/SearchStack";
+import Post from "./screens/Post";
+import Home from "./screens/Home";
+import Section from "./screens/Section";
+import { ThemeContext } from "./theme-context";
Notifications.setNotificationHandler({
handleNotification: async () => ({
@@ -23,8 +35,6 @@ Notifications.setNotificationHandler({
});
const firebaseConfig = {
- // This needs to be updated/redacted for security reasons.
- // Planning to use an environment variable.
apiKey: APIKEY,
authDomain: "daily-mobile-app-notifications.firebaseapp.com",
databaseURL: "https://daily-mobile-app-notifications-default-rtdb.firebaseio.com",
@@ -36,32 +46,68 @@ const firebaseConfig = {
serviceAccountId: SERVICE_ACCOUNT_ID
};
+const cardinalLogo = require("./assets/media/DailyLogoCardinal.png")
+const whiteLogo = require("./assets/media/DailyLogoWhite.png")
+const Stack = createStackNavigator()
export default function App() {
- // const isLoadingComplete = useLoadedAssets();
- // const colorScheme = useColorScheme();
-
const [fontsLoaded, setFontsLoaded] = useState(false)
- const [expoPushToken, setExpoPushToken] = useState('');
+ const [expoPushToken, setExpoPushToken] = useState("");
const [notification, setNotification] = useState(false);
const notificationListener = useRef();
const responseListener = useRef();
+ // const isLoadingComplete = useLoadedAssets();
+ // const colorScheme = useColorScheme();
+ const [theme, setTheme] = useState("light")
+
+ const toggleTheme = () => {
+ const next = theme === "light" ? "dark" : "light"
+ setTheme(next)
+ }
+
+ const headerOptions = {
+ headerTitle: () => (),
+ headerStyle: {
+ backgroundColor: bread[theme]["background-basic-color-1"]
+ },
+ headerTintColor: eva[theme]["color-primary-500"]
+ }
+
+ const detailHeaderOptions = {
+ headerTitle: "",
+ headerTransparent: true,
+ headerTintColor: "white",
+ headerBackTitleVisible: false
+ }
+
+ const sectionHeaderOptions = {
+ headerStyle: {
+ backgroundColor: bread[theme]["background-basic-color-1"]
+ },
+ headerTintColor: bread[theme]["color-primary-500"],
+ headerTitleStyle: {
+ color: eva[theme][theme === "light" ? "color-basic-800" : "color-basic-100"]
+ }
+ }
useEffect(() => {
Font.loadAsync({
// Loads fonts from static resource.
- MinionProDisp: require('./assets/fonts/Minion_Pro/MinionPro-Disp.ttf'),
- MinionProRegular: require('./assets/fonts/Minion_Pro/MinionPro-Regular.ttf'),
- MinionProItDisp: require('./assets/fonts/Minion_Pro/MinionPro-ItDisp.ttf'),
- MinionProBoldDisp: require('./assets/fonts/Minion_Pro/MinionPro-BoldDisp.ttf'),
- MinionProBoldItDisp: require('./assets/fonts/Minion_Pro/MinionPro-BoldItDisp.ttf'),
- MinionProMediumDisp: require('./assets/fonts/Minion_Pro/MinionPro-MediumDisp.ttf'),
- MinionProMediumItDisp: require('./assets/fonts/Minion_Pro/MinionPro-MediumItDisp.ttf'),
- MinionProSemiboldDisp: require('./assets/fonts/Minion_Pro/MinionPro-SemiboldDisp.ttf'),
- MinionProSemiboldItDisp: require('./assets/fonts/Minion_Pro/MinionPro-SemiboldItDisp.ttf'),
- LibreFranklinRegular: require('./assets/fonts/Libre_Franklin/LibreFranklin-Regular.ttf'),
- LibreFranklinBold: require('./assets/fonts/Libre_Franklin/LibreFranklin-Bold.ttf'),
- LibreFranklinItalic: require('./assets/fonts/Libre_Franklin/LibreFranklin-Italic.ttf'),
+ MinionProDisp: require("./assets/fonts/Minion_Pro/MinionPro-Disp.ttf"),
+ MinionProRegular: require("./assets/fonts/Minion_Pro/MinionPro-Regular.ttf"),
+ MinionProItDisp: require("./assets/fonts/Minion_Pro/MinionPro-ItDisp.ttf"),
+ MinionProBoldDisp: require("./assets/fonts/Minion_Pro/MinionPro-BoldDisp.ttf"),
+ MinionProBoldItDisp: require("./assets/fonts/Minion_Pro/MinionPro-BoldItDisp.ttf"),
+ MinionProMediumDisp: require("./assets/fonts/Minion_Pro/MinionPro-MediumDisp.ttf"),
+ MinionProMediumItDisp: require("./assets/fonts/Minion_Pro/MinionPro-MediumItDisp.ttf"),
+ MinionProSemiboldDisp: require("./assets/fonts/Minion_Pro/MinionPro-SemiboldDisp.ttf"),
+ MinionProSemiboldItDisp: require("./assets/fonts/Minion_Pro/MinionPro-SemiboldItDisp.ttf"),
+ LibreFranklinRegular: require("./assets/fonts/Libre_Franklin/LibreFranklin-Regular.ttf"),
+ LibreFranklinBold: require("./assets/fonts/Libre_Franklin/LibreFranklin-Bold.ttf"),
+ LibreFranklinItalic: require("./assets/fonts/Libre_Franklin/LibreFranklin-Italic.ttf"),
}).then(setFontsLoaded(true));
registerForPushNotificationsAsync().then(token => {
setExpoPushToken(token)
@@ -77,7 +123,7 @@ export default function App() {
const tokenRef = ref(db, "ExpoPushTokens/" + submatch, userCredential)
set(tokenRef, Date())
}).catch((error) => {
- console.log("error with signing in: ", error)
+ console.log("Could not sign in: ", error)
})
}
}
@@ -101,41 +147,54 @@ export default function App() {
};
}, []);
- return (
-
-
- )
-
+ return (fontsLoaded &&
+
+
+
+
+
+
+
+
+
+ ({ title: route.params.category.name, ...sectionHeaderOptions })}/>
+
+
+
+
+
+ )
}
async function registerForPushNotificationsAsync() {
-
let token;
if (Device.isDevice) {
const { status: existingStatus } = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
- if (existingStatus !== 'granted') {
+ if (existingStatus !== "granted") {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
}
- if (finalStatus !== 'granted') {
- alert('Failed to get push token for push notification!');
+ if (finalStatus !== "granted") {
+ alert("Failed to get push token for push notification!");
return;
}
token = (await Notifications.getExpoPushTokenAsync()).data;
} else {
- alert('Must use physical device for Push Notifications');
+ alert("Must use physical device for Push Notifications");
}
- if (Platform.OS === 'android') {
- Notifications.setNotificationChannelAsync('default', {
- name: 'default',
+ if (Platform.OS === "android") {
+ Notifications.setNotificationChannelAsync("default", {
+ name: "default",
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
- lightColor: '#FF231F7C',
+ lightColor: "#FF231F7C",
});
}
return token;
-
}
\ No newline at end of file
diff --git a/Model.js b/Model.js
new file mode 100644
index 00000000..5611fd58
--- /dev/null
+++ b/Model.js
@@ -0,0 +1,3 @@
+var WPAPI = require("wpapi")
+var wp = new WPAPI({ endpoint: "https://stanforddaily.com/wp-json" })
+export default wp
\ No newline at end of file
diff --git a/README.md b/README.md
index 1612aaf4..ada53256 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,10 @@
+
+
+
+
Official mobile app of the independent, student-run newspaper of Stanford University. Contributions are welcome!
diff --git a/components/CardRow.js b/components/CardRow.js
deleted file mode 100644
index 1569d86e..00000000
--- a/components/CardRow.js
+++ /dev/null
@@ -1,155 +0,0 @@
-import React, { Component, useRef } from 'react';
-import { View, Dimensions, FlatList, StyleSheet } from 'react-native';
-import { Alignments, Fonts, FontSizes, Margins } from '../constants';
-import "moment-timezone";
-import _ from "lodash";
-
-const { width, height } = Dimensions.get('window');
-
-export default class CardRow extends Component {
-
- constructor(props) {
- super(props)
- this.state = {
- scrollPosition: 0
- }
- }
-
- render() {
- const { data, renderItem, title, onPress } = this.props;
-
- return (
-
- {this.setState({scrollPosition: e.nativeEvent.contentOffset.x})}}
- />
-
- );
- }
-}
-
-const styles = ({
- content: {
- width: '100%',
- paddingVertical: 2,
- backgroundColor: "rgb(0,0,0,0)",
- marginLeft: 0,
- marginRight: 0
- },
- categoryLabel: {
- flexDirection: 'row',
- justifyContent: 'space-between',
- // width: width - (2 * Margins.default)
- },
- dateAndAuthor: {
- flexDirection: Alignments.column,
- justifyContent: Alignments.spaceBetween,
- marginTop: Margins.default,
- marginHorizontal: Margins.articleSides,
- },
-
- author: {
- fontFamily: "MinionProDisp",
- fontSize: 10,
- marginLeft: -2,
- // color: THEME.SECONDARY_LABEL,
- },
-
- date: {
- fontFamily: "MinionProDisp",
- fontSize: 10,
- // color: THEME.SECONDARY_LABEL,
- },
-
- header: {
- fontFamily: "MinionProDisp",
- fontSize: FontSizes.large + 10,
- // color: THEME.LABEL
- },
-
- titleFont: {
- fontFamily: "MinionProDisp",
- fontSize: FontSizes.mediumSmall,
- // color: THEME.LABEL
- },
- titleContainer: {
- marginTop: Margins.defaultSmall,
- marginLeft: Margins.articleSides,
- width: width/2.25 - Margins.articleSides - Margins.defaultLarge
- },
-
- descriptionContainer: {
- opacity: 0.80,
- marginHorizontal: Margins.articleSides
- },
- descriptionFont: {
- fontSize: FontSizes.defaultMediumSmall
- },
-
- image: {
- marginBottom: Margins.default,
- width: width/2.25 - Margins.articleSides - Margins.defaultLarge,
- marginLeft: Margins.articleSides,
- marginRight: 0,
- height: 3/4 * width/2.2
- },
-
- imageContainer: {
-
- },
- searchContainer: {
- // borderBottomColor: COLORS.SECONDARY_LABEL,
- borderBottomWidth: 1,
- // backgroundColor: THEME.BACKGROUND,
- width: '100%',
- flexDirection: Alignments.row,
- maxHeight: 122
- },
- searchContent: {
- flexDirection: Alignments.column,
- width: width - 120,
- marginLeft: Margins.default,
- marginRight: Margins.default,
- },
- searchImage: {
- width: 120,
- height: 120,
- },
- searchDateAndAuthor: {
- flexDirection: Alignments.row,
- justifyContent: Alignments.spaceBetween,
- marginTop: 2,
- },
- searchTitle: {
- fontFamily: "MinionProDisp",
- fontSize: 14,
- marginTop: 2,
- },
- searchDescription: {
- fontFamily: "MinionProDisp",
- fontSize: 12,
- marginTop: 2,
- opacity: 0.80,
- },
- more: {
- // backgroundColor: THEME.BUTTON,
- marginTop: Margins.defaultSmall,
- marginHorizontal: Margins.articleSides,
- justifyContent: 'center',
- borderRadius: 10
- },
- seeAll: {
- paddingHorizontal: 15,
- fontFamily: "MinionProDisp",
- // color: THEME.LABEL
- }
-})
\ No newline at end of file
diff --git a/components/Carousel.js b/components/Carousel.js
new file mode 100644
index 00000000..ec08155a
--- /dev/null
+++ b/components/Carousel.js
@@ -0,0 +1,106 @@
+import React from "react"
+import { Card, Button, Layout, Text, useTheme } from "@ui-kitten/components"
+import { Image, View, StyleSheet } from "react-native"
+import PagerView from "react-native-pager-view"
+import moment from "moment"
+import _ from "lodash"
+import { decode } from "html-entities"
+import { Sections } from "../constants"
+
+// Going to rename to Carousel.
+export default function Carousel(props) {
+ const theme = useTheme()
+ const { navigation, articles } = props
+
+ const Header = (props) => (
+
+
+
+ )
+
+ const Footer = (props) => (
+
+ {"Scoop Scooperstein".toUpperCase()}
+
+
+ )
+
+ const Slide = (props) => (
+
+ )
+
+ const ObliqueSlide = (props) => (
+
+ )
+
+ const largestImageAvailable = (details) => {
+ return _.maxBy(details.media_details.sizes, "width").source_url
+ }
+
+ return (
+
+ {articles.map((item, index) => {
+ return (
+
+ }
+ footer={}
+
+ {...{...props, onPress: () => navigation.navigate("Post", { article: item })}}>
+ {decode(item.title.rendered)}
+
+ {moment(new Date(item.date)).fromNow().toUpperCase()}
+
+
+
+ )})}
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ height: 300,
+ paddingHorizontal: 8,
+ paddingVertical: 4,
+ marginTop: 8
+ },
+ tab: {
+ height: 192,
+ alignItems: "center",
+ justifyContent: "center"
+ },
+ card: {
+ flex: 1,
+ margin: 2
+ },
+ headerTextContainer: {
+ paddingHorizontal: 20,
+ paddingVertical: 10
+ },
+ headerImage: {
+ width: 300,
+ height: 200
+ },
+ footerContainer: {
+ flexDirection: "row",
+ justifyContent: "flex-end",
+ paddingHorizontal: 20,
+ paddingVertical: 20
+ },
+ footerControl: {
+ marginHorizontal: 4
+ },
+ footer: {
+ flexDirection: "row",
+ justifyContent: "space-between",
+ alignItems: "center",
+ paddingHorizontal: 10,
+ paddingVertical: 5
+ }
+})
\ No newline at end of file
diff --git a/components/Cell.js b/components/Cell.js
deleted file mode 100644
index a52a3055..00000000
--- a/components/Cell.js
+++ /dev/null
@@ -1,91 +0,0 @@
-import React from 'react';
-import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native';
-import { Margins, FontSizes } from '../constants';
-import { normalize } from '../helpers/format';
-import { decode } from 'html-entities';
-import Byline from './Byline';
-
-const Cell = ({item, onPress}) => {
- let thumbnailURL
- if (item._embedded["wp:featuredmedia"][0].code) {
- console.log(item._embedded["wp:featuredmedia"][0].data.status);
- } else {
- thumbnailURL = item._embedded["wp:featuredmedia"][0].media_details.sizes.thumbnail.source_url
- }
- return (
-
-
-
-
-
-
- {decode(item.title.rendered)}
- {/* {JSON.stringify(item)} */}
-
- {new Date(item.date).toLocaleString('en-us', { year: 'numeric', month: 'short', day: 'numeric' }).toUpperCase()}
- {/* {data.description} */}
-
-
-
- );
-};
-
-export default Cell;
-
-const styles = StyleSheet.create({
- card: {
- // height: 100,
- marginVertical: 5,
- marginHorizontal: Margins.articleSides,
- flexDirection: 'row',
- borderRadius: 8,
- overflow: 'hidden',
- // shadowColor: '#999',
- // shadowOffset: {width: 0, height: 1},
- // shadowOpacity: 0.8,
- // shadowRadius: 2,
- // elevation: 5,
- },
- cardImgWrapper: {
- flex: 1,
- },
- cardImg: {
- // height: 100,
- width: '100%',
- alignSelf: 'center',
- borderRadius: 8,
- borderBottomRightRadius: 0,
- borderTopRightRadius: 0,
- overflow: 'hidden',
- },
- cardInfo: {
- flex: 2,
- padding: 10,
- borderColor: '#ccc',
- borderWidth: 1,
- borderLeftWidth: 0,
- borderBottomRightRadius: 8,
- borderTopRightRadius: 8,
- backgroundColor: '#fff',
- },
-
- date: {
- fontFamily: "system",
- fontSize: 10,
- fontWeight: "500",
- color: "#4D4F53"
- // color: THEME.SECONDARY_LABEL,
- },
- cardTitle: {
- fontWeight: 'bold',
- fontSize: normalize(FontSizes.mediumSmall),
- },
- cardDetails: {
- fontSize: 12,
- color: '#444',
- },
-});
\ No newline at end of file
diff --git a/components/Diptych.js b/components/Diptych.js
new file mode 100644
index 00000000..c1a99d91
--- /dev/null
+++ b/components/Diptych.js
@@ -0,0 +1,83 @@
+import React from "react"
+import { Card, Layout, Text } from "@ui-kitten/components"
+import { Image, View, StyleSheet } from "react-native"
+import PagerView from "react-native-pager-view"
+import moment from "moment"
+import _ from "lodash"
+import { decode } from "html-entities"
+import { Sections } from "../constants"
+
+export default function Diptych(props) {
+ const newsArticles = props.articles.length % 2 == 0 ? props.articles : props.articles.slice(0, -1)
+
+ const Header = (props) => (
+
+
+
+ )
+
+ const Footer = (props) => (
+
+ {moment(new Date(props.date)).fromNow().toUpperCase()}
+
+ )
+
+ const largestImageAvailable = (details) => {
+ return _.maxBy(details.media_details.sizes, "width").source_url
+ }
+
+ return (
+
+ {_.chunk(newsArticles, 2).map((couplet, index) => (
+
+ {couplet.map((item) => (
+ }
+ footer={
+ ))}
+
+ ))}
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ height: 300,
+ paddingHorizontal: 8,
+ paddingVertical: 4
+ },
+ tab: {
+ height: 192,
+ alignItems: "center",
+ justifyContent: "center"
+ },
+ card: {
+ flex: 1,
+ height: 300,
+ marginHorizontal: 5
+ // margin: 2
+ },
+ headerTextContainer: {
+ paddingHorizontal: 20,
+ paddingVertical: 10
+ },
+ headerImage: {
+ width: 300,
+ height: 200
+ },
+ footerContainer: {
+ flexDirection: "row",
+ justifyContent: "flex-end",
+ paddingHorizontal: 20,
+ paddingVertical: 20
+ },
+ footerControl: {
+ marginHorizontal: 4
+ }
+})
\ No newline at end of file
diff --git a/components/Mark.js b/components/Mark.js
new file mode 100644
index 00000000..9ff12061
--- /dev/null
+++ b/components/Mark.js
@@ -0,0 +1,30 @@
+import React from "react"
+import { Platform, StyleSheet, View, TouchableOpacity } from "react-native"
+import { Text, useTheme } from "@ui-kitten/components"
+import { Button, Icon } from "@ui-kitten/components"
+import { Sections } from "../constants"
+
+export default function Mark({ navigation, alternate, seed, category }) {
+ const arrow = Platform.OS === "ios" ? "arrow-ios-forward-outline" : "chevron-right-outline"
+ const theme = useTheme()
+ return (
+ navigation.navigate("Section", { category: category, seed: seed })}
+ style={[styles.container, { backgroundColor: alternate ? theme["color-primary-100"] : theme["background-color-basic-1"] }]}>
+ {category.name.toUpperCase()}
+
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ display: "flex",
+ padding: 5,
+ width: "100%",
+ height: 42,
+ flexDirection: "row",
+ alignItems: "center",
+ justifyContent: "center"
+ }
+})
\ No newline at end of file
diff --git a/components/Shelf.js b/components/Shelf.js
new file mode 100644
index 00000000..0ebba389
--- /dev/null
+++ b/components/Shelf.js
@@ -0,0 +1,65 @@
+import React from "react"
+import { View, StyleSheet, Image } from "react-native"
+import { Divider, ListItem, Text, useTheme } from "@ui-kitten/components"
+import PagerView from "react-native-pager-view"
+import { decode } from "html-entities"
+import _ from "lodash"
+
+export default function Shelf(props) {
+ var opinionsArticles = props.articles
+ while (opinionsArticles.length % 3 != 0) {
+ opinionsArticles.pop()
+ }
+
+ const Accessory = (props) => (
+
+ )
+
+ const theme = useTheme()
+ const inactiveColor = theme[props.alternate ? "color-primary-200" : "background-color-basic-2"]
+
+ return (
+
+ {_.chunk(opinionsArticles, 3).map((triplet, index) => (
+
+ {triplet.map((item) => (
+
+ {decode(item.title.rendered)}}
+ description={() => Scoop Scooperstein on June 13}
+ accessoryRight={}
+ style={{
+ flex: 1/3,
+ paddingHorizontal: 10,
+ paddingVertical: 10,
+ backgroundColor: theme[props.alternate ? "color-primary-100" : "background-basic-color-1"]
+ }}
+ {...{...props, activeOpacity: 0.8, onPress: () => props.navigation.navigate("Post", { article: item })}}
+ />
+
+
+ ))}
+
+ ))}
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ minHeight: 300,
+ paddingHorizontal: 8,
+ padddingVertical: 4,
+ },
+ image: {
+ flex: 1/3,
+ width: 45,
+ height: 60,
+ borderRadius: 3,
+ marginLeft: 4
+ }
+})
\ No newline at end of file
diff --git a/components/Wildcard.js b/components/Wildcard.js
new file mode 100644
index 00000000..b26efb33
--- /dev/null
+++ b/components/Wildcard.js
@@ -0,0 +1,81 @@
+import React, { useContext, useEffect } from "react"
+import { StyleSheet, View } from "react-native"
+import { Button, Card, Layout, List, Text } from "@ui-kitten/components"
+import { Image } from "react-native"
+import _ from "lodash"
+import { decode } from "html-entities"
+import { ThemeContext } from "../theme-context"
+
+// Going to rename this component to Wildcard.
+export default function Wlidcard(props) {
+
+ const { navigation, articles, random } = props
+ var cultureArticles = articles // _.shuffle(articles[0].concat(articles[1]))
+ useEffect(() => {
+ if (random) {
+ cultureArticles = _.shuffle(articles).slice(0, 4)
+ }
+ }, [])
+ const Header = (props) => (
+
+ {props.title}
+
+
+ )
+
+ const Footer = (props) => (
+
+ {props.byline}
+
+
+ )
+
+ const themeContext = useContext(ThemeContext)
+
+ return (
+
+ {cultureArticles.map((item) => (
+ }
+ footer={}
+ {...{...props, onPress: () => navigation.navigate("Post", { article: item })}}
+ >
+ {decode(item.excerpt.rendered.slice(3, -5))}
+
+ ))}
+ {/*
*/}
+
+ )
+}
+
+const styles = StyleSheet.create({
+ header: {
+ flexDirection: "row",
+ justifyContent: "space-between",
+ paddingHorizontal: 20,
+ paddingVertical: 10
+ },
+ footer: {
+ flexDirection: "row",
+ justifyContent: "space-between",
+ alignItems: "center",
+ paddingHorizontal: 10,
+ paddingVertical: 5
+ },
+ card: {
+ marginVertical: 4
+ },
+ container: {
+ flex: 1,
+ paddingHorizontal: 8,
+ paddingVertical: 4
+ }
+})
\ No newline at end of file
diff --git a/constants/CategorySlugs.js b/constants/CategorySlugs.js
deleted file mode 100644
index b0cd6171..00000000
--- a/constants/CategorySlugs.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export default [
- {name: "Front Page", slug: null},
- {name: "News", slug: "news"},
- {name: "Sports", slug: "sports"},
- {name: "Arts & Life", slug: "arts-life"},
- {name: "Opinions", slug: "opinions"},
- {name: "The Grind", slug: "thegrind"},
- {name: "Humor", slug: "humor"},
- {name: "Data", slug: "@94305"},
- {name: "Podcasts", slug: "podcasts"}
-];
\ No newline at end of file
diff --git a/constants/HomeSections.js b/constants/HomeSections.js
deleted file mode 100644
index 4718e4d2..00000000
--- a/constants/HomeSections.js
+++ /dev/null
@@ -1,11 +0,0 @@
-export default [
- "featured",
- "news",
- "sports",
- "opinions",
- "theGrind",
- "artsAndLife",
- "cartoons",
- "humor",
- "moreFromTheDaily"
-];
\ No newline at end of file
diff --git a/constants/Sections.js b/constants/Sections.js
new file mode 100644
index 00000000..0692adef
--- /dev/null
+++ b/constants/Sections.js
@@ -0,0 +1,95 @@
+export default {
+ FEATURED: {
+ name: "Featured",
+ slug: "featured",
+ id: 1485
+ },
+ NEWS: {
+ name: "News",
+ slug: "news",
+ id: 3,
+ desks: {
+ ACADEMICS: {
+ name: "Academics",
+ slug: "academics-news",
+ id: 4408
+ },
+ BIZTECH: {
+ name: "Business & Technology",
+ slug: "business-and-technology-news",
+ id: 16821
+ },
+ CAMPUS_LIFE: {
+ name: "Campus Life",
+ slug: "campus-life-news",
+ id: 4423
+ },
+ GRADUATE_STUDENTS: {
+ name: "Graduate Students",
+ slug: "graduate-students",
+ id: 75212
+ },
+ UNIVERSITY: {
+ name: "University",
+ slug: "university-news",
+ id: 4424
+ }
+ }
+ },
+ SPORTS: {
+ name: "Sports",
+ slug: "sports",
+ id: 23
+ },
+ OPINIONS: {
+ name: "Opinions",
+ slug: "opinions",
+ id: 24
+ },
+ THE_GRIND: {
+ name: "The Grind",
+ slug: "theGrind",
+ id: 32278
+ },
+ ARTS_LIFE: {
+ name: "Arts & Life",
+ slug: "artsAndLife",
+ id: 25,
+ desks: {
+ CULTURE: {
+ name: "Culture",
+ slug: "culture",
+ },
+ MUSIC: {
+ name: "Music",
+ slug: "music-intermission",
+ },
+ READS: {
+ name: "Reads",
+ slug: "reads",
+ },
+ SCREEN: {
+ name: "Screen",
+ slug: "screen",
+ }
+ }
+ },
+ CARTOONS: {
+ name: "Cartoons",
+ slug: "cartoons",
+ id: 41527
+ },
+ HUMOR: {
+ name: "Humor",
+ slug: "humor",
+ id: 55796
+ },
+ PODCASTS: {
+ name: "Podcasts",
+ slug: "podcasts"
+ },
+ MORE_FROM_DAILY: {
+ name: "More from The Daily",
+ slug: "moreFromTheDaily"
+ }
+}
diff --git a/constants/Spacing.js b/constants/Spacing.js
new file mode 100644
index 00000000..a7a4d158
--- /dev/null
+++ b/constants/Spacing.js
@@ -0,0 +1,7 @@
+export default {
+ extraSmall: 2,
+ small: 4,
+ medium: 8,
+ large: 16,
+ extraLarge: 24,
+}
\ No newline at end of file
diff --git a/constants/index.js b/constants/index.js
index afd9af9c..9d8d8204 100644
--- a/constants/index.js
+++ b/constants/index.js
@@ -1,7 +1,6 @@
export { default as Colors } from './PlatformPalette'
export { default as Strings } from './Strings'
-export { default as HomeSections } from './HomeSections'
-export { default as CategorySlugs } from './CategorySlugs'
+export { default as Sections } from './Sections'
export { default as Fonts } from './Fonts'
export { default as Margins } from './Margins'
export { default as Alignments } from './Alignments'
diff --git a/helpers/format.js b/helpers/format.js
index 9a8b2952..61b9b4fc 100644
--- a/helpers/format.js
+++ b/helpers/format.js
@@ -1,49 +1,31 @@
-import { Dimensions, PixelRatio, TouchableWithoutFeedback } from 'react-native';
-import moment from 'moment';
-import "moment-timezone";
+import { Dimensions } from "react-native";
-const {width, height} = Dimensions.get('window');
+const { width, height } = Dimensions.get("window");
const scale = width/320
+const MONTHS = ["Jan.", "Feb.", "March", "April", "May", "June", "July", "Aug.", "Sept.", "Oct.", "Nov.", "Dec."]
-export const formatDate = post => moment.utc(post.postDateGmt).tz("America/Los_Angeles").toDate().toLocaleDateString();
-export const getThumbnailURL = ({thumbnailInfo}) => thumbnailInfo ? (thumbnailInfo.urls.mediumLarge || thumbnailInfo.urls.full): null;
// export const formatAuthors = ({tsdAuthors}) => (tsdAuthors || []).map(e => e.displayName).join(", ");
export const itemize = (elements) => {
return [elements.slice(0, -1).join(", "), elements.length > 2 ? elements.last() : elements].join(" and ")
}
-export function normalize(size) {
- const newSize = size * scale
- if (Platform.OS === 'ios') {
- return Math.round(PixelRatio.roundToNearestPixel(newSize))
- } else {
- return Math.round(PixelRatio.roundToNearestPixel(newSize)) - 2
- }
-}
export function decodeEntityHTML(message) {
const doc = new DOMParser().parseFromString(message, "text/html");
return doc.documentElement.textContent;
}
-// const inferred = new Intl.RelativeTimeFormat(undefined, { numeric: "auto" }) // undefined means it auto-detects locale
-// const DIVISIONS = [
-// { amount: 60, name: 'seconds' },
-// { amount: 60, name: 'minutes' },
-// { amount: 24, name: 'hours' },
-// { amount: 7, name: 'days' },
-// { amount: 4.34524, name: 'weeks' },
-// { amount: 12, name: 'months' },
-// { amount: Number.POSITIVE_INFINITY, name: 'years' }
-// ]
-
-// export function relativeDate(date) {
-// let duration = (date - new Date()) / 1000
-
-// for (let i = 0; i <= DIVISIONS.length; i++) {
-// const division = DIVISIONS[i]
-// if (Math.abs(duration) < division.amount) {
-// return inferred.format(Math.round(duration), division.name)
-// }
-// duration /= division.amount
-// }
-// }
\ No newline at end of file
+export const formatDate = (instance) => {
+ let formattedMonth = MONTHS[instance.getMonth()]
+ let formattedDay = instance.getDate()
+ let formattedYear = instance.getFullYear()
+ let formattedHours = instance.getHours() % 12
+ if (formattedHours == 0) {
+ formattedHours = 12
+ }
+ let formattedMinutes = instance.getMinutes()
+ if (formattedMinutes < 10) {
+ formattedMinutes = `0${formattedMinutes}`
+ }
+ let formattedMeridian = instance.getUTCHours % 24 < 7 ? "a.m." : "p.m."
+ return `${formattedMonth} ${formattedDay}, ${formattedYear}, ${formattedHours}:${formattedMinutes} ${formattedMeridian}`
+}
diff --git a/helpers/render.js b/helpers/render.js
new file mode 100644
index 00000000..c76f0395
--- /dev/null
+++ b/helpers/render.js
@@ -0,0 +1,10 @@
+import { ListItem } from "@ui-kitten/components";
+import { decode } from "html-entities";
+import Byline from "../components/Byline";
+
+export const renderRow = ({ item, index }) => (
+
+ );
\ No newline at end of file
diff --git a/mapping.json b/mapping.json
new file mode 100644
index 00000000..501832f8
--- /dev/null
+++ b/mapping.json
@@ -0,0 +1,57 @@
+{
+ "strict": {
+ "text-font-family": "System",
+
+ "text-heading-1-font-size": 36,
+ "text-heading-1-font-weight": "800",
+ "text-heading-1-font-family": "$text-font-family",
+
+ "text-heading-2-font-size": 32,
+ "text-heading-2-font-weight": "800",
+ "text-heading-2-font-family": "$text-font-family",
+
+ "text-heading-3-font-size": 30,
+ "text-heading-3-font-weight": "800",
+ "text-heading-3-font-family": "$text-font-family",
+
+ "text-heading-4-font-size": 26,
+ "text-heading-4-font-weight": "600",
+ "text-heading-4-font-family": "MinionProBoldDisp",
+
+ "text-heading-5-font-size": 22,
+ "text-heading-5-font-weight": "800",
+ "text-heading-5-font-family": "$text-font-family",
+
+ "text-heading-6-font-size": 18,
+ "text-heading-6-font-weight": "800",
+ "text-heading-6-font-family": "$text-font-family",
+
+ "text-subtitle-1-font-size": 15,
+ "text-subtitle-1-font-weight": "600",
+ "text-subtitle-1-font-family": "MinionProItDisp",
+
+ "text-subtitle-2-font-size": 13,
+ "text-subtitle-2-font-weight": "600",
+ "text-subtitle-2-font-family": "$text-font-family",
+
+ "text-paragraph-1-font-size": 15,
+ "text-paragraph-1-font-weight": "400",
+ "text-paragraph-1-font-family": "MinionProSemiboldDisp",
+
+ "text-paragraph-2-font-size": 13,
+ "text-paragraph-2-font-weight": "400",
+ "text-paragraph-2-font-family": "MinionProRegular",
+
+ "text-caption-1-font-size": 12,
+ "text-caption-1-font-weight": "400",
+ "text-caption-1-font-family": "serif",
+
+ "text-caption-2-font-size": 12,
+ "text-caption-2-font-weight": "600",
+ "text-caption-2-font-family": "serif",
+
+ "text-label-font-size": 12,
+ "text-label-font-weight": "800",
+ "text-label-font-family": "$text-font-family"
+ }
+}
\ No newline at end of file
diff --git a/navigation/ContentStack.js b/navigation/ContentStack.js
index 6e1f2aa1..e47e4907 100644
--- a/navigation/ContentStack.js
+++ b/navigation/ContentStack.js
@@ -5,7 +5,7 @@ import Home from '../screens/Home';
import Search from '../screens/Search';
import Post from '../screens/Post';
import Author from '../screens/Author';
-import Category from '../screens/Category';
+import Category from '../screens/Section';
const Stack = createNativeStackNavigator();
diff --git a/navigation/index.js b/navigation/index.js
index 32ed9a15..8f3874ef 100644
--- a/navigation/index.js
+++ b/navigation/index.js
@@ -18,21 +18,21 @@ export default function Navigation({ colorScheme }) {
linking={LinkingConfiguration}
theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}
ref={navigationRef}>
-
+
);
}
// A root stack navigator is often used for displaying modals on top of all other content
// Read more here: https://reactnavigation.org/docs/modal
-const RootStack = createNativeStackNavigator();
+const Stack = createNativeStackNavigator();
-function RootNavigator() {
+function NavigationRoot() {
return (
-
-
-
-
+
+
+
+
);
}
diff --git a/package.json b/package.json
index d0aeef59..30aca0b1 100644
--- a/package.json
+++ b/package.json
@@ -9,12 +9,15 @@
"eject": "expo eject"
},
"dependencies": {
+ "@eva-design/eva": "^2.1.1",
"@expo-google-fonts/open-sans": "^0.2.0",
"@expo-google-fonts/pt-serif": "^0.2.0",
- "@native-html/iframe-plugin": "^1.1.2",
- "@react-navigation/native": "^6.0.2",
- "@react-navigation/native-stack": "^6.0.4",
+ "@native-html/iframe-plugin": "^2.6.1",
+ "@react-navigation/native": "^6.0.11",
+ "@react-navigation/native-stack": "^6.7.0",
"@react-navigation/stack": "^6.0.4",
+ "@ui-kitten/components": "^5.1.2",
+ "@ui-kitten/eva-icons": "^5.1.2",
"expo": "^45.0.0",
"expo-constants": "~13.1.1",
"expo-device": "~4.2.0",
@@ -34,13 +37,15 @@
"react-native-gesture-handler": "~2.2.1",
"react-native-image-header-scroll-view": "^1.0.0",
"react-native-lightbox": "^0.8.1",
+ "react-native-pager-view": "^5.4.25",
"react-native-render-html": "^6.3.3",
"react-native-safe-area-context": "4.2.4",
"react-native-screens": "~3.11.1",
"react-native-skeleton-content": "^1.0.24",
"react-native-snap-carousel": "^3.9.1",
+ "react-native-svg": "12.3.0",
"react-native-web": "0.17.7",
- "react-native-webview": "11.18.1",
+ "react-native-webview": "^11.22.7",
"superagent": "^6.1.0",
"unimodules": "^1.0.0",
"wpapi": "^1.2.2"
diff --git a/react-native.config.js b/react-native.config.js
new file mode 100644
index 00000000..14c1bf2e
--- /dev/null
+++ b/react-native.config.js
@@ -0,0 +1,7 @@
+module.exports = {
+ project: {
+ ios: {},
+ android: {},
+ },
+ assets: ['./assets'],
+};
\ No newline at end of file
diff --git a/screens/Category.js b/screens/Category.js
deleted file mode 100644
index caecb529..00000000
--- a/screens/Category.js
+++ /dev/null
@@ -1,56 +0,0 @@
-import React, { useState } from 'react';
-import { View, Text, Button, ActivityIndicator, FlatList, StyleSheet } from 'react-native';
-import Cell from '../components/Cell';
-import { Margins } from '../constants';
-import { getCategoryPageAsync } from '../helpers/wpapi';
-
-export default function Category(props) {
-
- const [isLoading, setIsLoading] = useState(false)
- const [page, setPage] = useState(1)
- const renderItem = ({item}) => {
- return (
- props.navigation.navigate('Post', {item: item})}
- />
- );
- };
-
- const { title, data, id } = props.route.params;
- const [articles, setArticles] = useState(data)
- props.navigation.setOptions({title: title})
-
- const fetchNextPage = () => {
- setIsLoading(true)
- getCategoryPageAsync(id, page + 1).then(result => {
- setArticles(articles => [...articles, ...result])
- setPage(page + 1)
- })
- setIsLoading(false)
- }
-
- return (
-
-
- }
- ListFooterComponentStyle={{ marginBottom: Margins.defaultLarge }}
- // keyExtractor={item => item.id}
- />
-
-
-
- )
-}
-
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: 'white',
- },
-});
\ No newline at end of file
diff --git a/screens/Home.js b/screens/Home.js
index 26206a23..2d1d4d84 100644
--- a/screens/Home.js
+++ b/screens/Home.js
@@ -1,317 +1,70 @@
-import React, { useEffect, useState } from 'react';
-import { View, Text, ScrollView, Dimensions, StyleSheet } from 'react-native';
-import { Strings, CategorySlugs, HomeSections, Heights, Margins, Fonts, Alignments, FontSizes, Sections, PlatformPalette } from '../constants';
-import Separator from '../components/Separator';
-import Carousel, { getInputRangeFromIndexes } from 'react-native-snap-carousel';
-import { getHomeAsync, getCategoryAsync, getHomeMoreAsync } from '../helpers/wpapi';
-import NewsFeedItem from '../components/NewsFeedItem';
-import LightboxGallery from '../components/LightboxGallery';
-import CategoryHeader from '../components/CategoryHeader';
-import CardRow from '../components/CardRow';
-import Card from '../components/Card';
-import _ from 'lodash';
-import { getThumbnailURL, formatDate } from '../helpers/format';
-import Column from '../components/Column';
+import React, { useEffect, useState } from "react";
+import { ScrollView, StyleSheet } from "react-native";
+import { Divider, Layout, useTheme } from "@ui-kitten/components";
+import Carousel from "../components/Carousel";
+import Diptych from "../components/Diptych";
+import Mark from "../components/Mark";
+import Shelf from "../components/Shelf";
+import Wildcard from "../components/Wildcard";
+import Model from "../Model";
+import { Sections } from "../constants";
-const categoryHome = CategorySlugs[0];
-const { width, height } = Dimensions.get('window');
+export default function Home({ navigation }) {
+ const [articles, setArticles] = useState({})
+ const [pageNumber, setPageNumber] = useState(0)
+ const [articlesLoaded, setArticlesLoaded] = useState(false)
-// then(function(data) {
-// // do something with the returned posts
-// console.log(data)
-// return data
-// }).catch(function(err) {
-// // handle error
-// console.log(err)
-// });
-
-export default function Home(props) {
-
- const [category, setCategory] = useState(categoryHome);
- const [articles, setArticles] = useState([]);
- const [pageNumber, setPageNumber] = useState(1);
- const [allArticles, setAllArticles] = useState([]);
-
- const _renderRow = ({item, index}) => {
- return ( props.navigation.navigate(Strings.post, { item: item })}
- onAuthor={ (authorID) => props.navigation.navigate(Strings.author, { authorID: authorID }) }
- />
- );
- };
-
- const _renderImage = ({item}) => {
- return (item._embedded["wp:featuredmedia"][0].media_details &&
-
- )
- };
+ const homeMember = (article, section) => {
+ if (section.id === Sections.FEATURED.id) {
+ return article.categories.includes(Sections.FEATURED.id)
+ }
- const _renderCardRow = ({item}) => {
- return (
- props.navigation.navigate(Strings.post, { item: item })}
- />
- );
- };
+ return article.categories.includes(section.id) && !article.categories.includes(Sections.FEATURED.id)
+ }
- const _renderColumn = ({item, index}) => {
- return (
-
- )
- };
- const categories = {"featured": 1485, "news": 3, "theGrind": 32278, "artsAndLife": 25, "sports": 23, "opinions": 24, "humor": 55796, "cartoons": 41527};
-
useEffect(() => {
- (async () => {
- // let newsResults = await getHomeAsync(3);
- // setNewsArticles(newsResults);
-
- for (const [slug, id] of Object.entries(categories)) {
- let articles = await getHomeAsync(id);
- setAllArticles(allArticles => ({...allArticles, [slug]: slug !== "featured" ? articles.filter(article => !article.categories.includes(1485)) : articles}));
- }
- })();
- }, [pageNumber, category]);
+ Model.posts().perPage(50).get().then(posts => {
+ for (let value of Object.values(Sections)) {
+ setArticles(articles => ({
+ ...articles,
+ [value.slug]: posts.filter(items => homeMember(items, value)),
+ }))
+ }
+ setArticles(articles => ({
+ ...articles,
+ "culture": posts.filter(items => items.categories.includes(Sections.THE_GRIND.id) || items.categories.includes(Sections.ARTS_LIFE.id)),
+ }))
+ }).finally(() => setArticlesLoaded(true))
+ }, [pageNumber]) // Runs once at the beginning, and anytime pageNumber changes thereafter.
- return (
-
-
- {/* {JSON.stringify(allArticles["news"][7].parsely.meta.creator)} | {JSON.stringify(allArticles["news"][7].coauthors)} */}
- {const range = [3, 2, 1, 0, -1];
- const inputRange = getInputRangeFromIndexes(range, index, carouselProps);
- const outputRange = range; return { inputRange, outputRange }}}
- slideInterpolatedStyle={(index, animatedValue, carouselProps) => { return {
- zIndex: carouselProps.data.length - index,
- opacity: animatedValue.interpolate({
- inputRange: [-1, 0, 1],
- outputRange: index == 1 ? [0, 1, 0.7] : [0, 1, 0],
- extrapolate: 'clamp'
- })
- }}}
- />
-
-
- props.navigation.navigate(STRINGS.CATEGORY, { data: allArticles["news"], title: 'News', navigation: props.navigation })}
- />
-
-
- item.length === 3)}
- renderItem={_renderColumn}
- sliderWidth={width}
- itemWidth={0.92*width}
- activeSlideAlignment={'start'}
- inactiveSlideScale={1}
- scrollInterpolator={(index, carouselProps) => {const range = [3, 2, 1, 0, -1];
- const inputRange = getInputRangeFromIndexes(range, index, carouselProps);
- const outputRange = range; return { inputRange, outputRange }}}
- slideInterpolatedStyle={(index, animatedValue, carouselProps) => { return {
- opacity: animatedValue.interpolate({
- inputRange: [-1, 0, 1],
- outputRange: [0, 1, 0.7],
- extrapolate: 'clamp'
- })}}}
- />
-
-
- props.navigation.navigate(STRINGS.CATEGORY, { data: allArticles['sports'], title: 'Sports', navigation: props.navigation })}
- />
-
-
- props.navigation.navigate(STRINGS.CATEGORY, { data: allArticles['artsAndLife'], title: 'Arts and Life', navigation: props.navigation })}
- />
-
-
- props.navigation.navigate(STRINGS.CATEGORY, { data: allArticles['theGrind'], title: 'The Grind', navigation: props.navigation })}
- />
-
-
- item.length === 3)}
- renderItem={_renderColumn}
- sliderWidth={width}
- itemWidth={0.92*width}
- containerCustomStyle={{backgroundColor: "#fef2f2"}}
- activeSlideAlignment={'start'}
- inactiveSlideScale={1}
- scrollInterpolator={(index, carouselProps) => {const range = [3, 2, 1, 0, -1];
- const inputRange = getInputRangeFromIndexes(range, index, carouselProps);
- const outputRange = range; return { inputRange, outputRange }}}
- slideInterpolatedStyle={(index, animatedValue, carouselProps) => { return {
- opacity: animatedValue.interpolate({
- inputRange: [-1, 0, 1],
- outputRange: [0, 1, 0.7],
- extrapolate: 'clamp'
- })}}}
- />
-
-
-
-
- );
+ return (articlesLoaded &&
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {articles[Sections.HUMOR.slug].length >= 3 && (
+
+
+
+
+ )}
+ {/* Infinite scroll/wildcard will go here, with cell similar to the ones in `Wildcard` component. */}
+
+
+ )
}
const styles = StyleSheet.create({
container: {
- flex: 1,
- width,
- height,
- backgroundColor: '#FFFFFF'
- // backgroundColor: PlatformPalette.background
- },
- loadingIndicator: {
- marginTop: Margins.default,
- marginBottom: Margins.default
- },
- sideMenuContainer: {
- flex: 1,
- // backgroundColor: COLORS.WHITE,
- alignItems: Alignments.center,
- // paddingTop: top_padding
- },
- sideBarTitle: {
- height: Heights.appHeader,
- justifyContent: Alignments.center,
- borderBottomWidth: 1,
- alignSelf: 'stretch',
- flexDirection: 'column',
- paddingTop: Margins.NORMAL_HEADER_Margins,
- // borderBottomColor: THEME.SECONDARY_LABEL,
- },
- sideBarTitleText: {
- // color: THEME.LABEL,
- fontFamily: Fonts.PTSerifBold,
- fontSize: FontSizes.smallMedium,
- //textAlign: 'center',
- flex: 1,
- justifyContent: 'center',
- marginLeft: Margins.default
- },
- flatListStyle: {
- flex: 1,
- width: '100%',
- marginTop: 10
- },
- sideMenuItem: {
- width: '100%',
- flexDirection: Alignments.row,
- height: Heights.sideMenuItem,
- alignItems: Alignments.center,
- },
- separator: {
- // borderBottomColor: THEME.SECONDARY_LABEL,
- borderBottomWidth: 1,
- },
- categoriesHeaderContainer: {
- height: 60,
- // backgroundColor: THEME.BACKGROUND,
- alignItems: Alignments.left,
- justifyContent: Alignments.left,
- },
- categoriesText: {
- marginTop: Margins.default,
- marginLeft: Margins.articleSides, //match category side with article edge
- fontFamily: "MinionProDisp",
- fontSize:25,
- flex: 2,
- },
- categoryLabel: {
- flexDirection: 'row',
- justifyContent: 'space-between',
- // width: width - (2 * Margins.default)
- },
- header: {
- fontFamily: "MinionProDisp",
- fontSize: Fonts.large + 10,
- // color: THEME.LABEL
- },
- humor: {
- fontFamily: "MinionProDisp",
- fontSize: FontSizes.large + 10,
- // color: THEME.BACKGROUND
- },
- more: {
- // backgroundColor: THEME.BUTTON,
- marginTop: Margins.small,
- marginHorizontal: Margins.articleSides,
- justifyContent: 'center',
- borderRadius: 10
- },
- cartoonContainer: {
- paddingVertical: 30,
- width: 0.75*width,
- height: 0.75*width
- },
- sliderContentContainer: {
- paddingVertical: 10 // for custom animation
- },
- communityContainer: {
- flex: 1,
- backgroundColor: '#fff',
- alignItems: 'flex-start',
- justifyContent: 'flex-start',
- flexDirection: 'row',
- flexWrap: 'wrap',
- paddingTop: 0,
- width: '100%',
- },
- box: {
- width: '95%',
- height: height/8,
- // backgroundColor: COLORS.CARDINAL,
- margin: Margins.small,
- justifyContent: 'center',
- flexDirection: 'row',
- alignContent: 'center'
- },
- communityTitleText: {
- fontSize: FontSizes.extraLarge,
- fontFamily: "MinionProDisp",
- // color: COLORS.WHITE,
- textAlign: 'center',
+ flex: 1
}
-});
\ No newline at end of file
+})
\ No newline at end of file
diff --git a/screens/Post.js b/screens/Post.js
index 506f9e1d..8fc8505c 100644
--- a/screens/Post.js
+++ b/screens/Post.js
@@ -1,110 +1,103 @@
-import React, { Component } from 'react';
-import { View, Dimensions, Text, StatusBar, TouchableWithoutFeedback, TouchableOpacity, StyleSheet, Image, Platform } from 'react-native';
-import { getThumbnailURL, formatDate, normalize } from '../helpers/format';
-import { getPostByIdAsync } from '../helpers/wpapi';
-import { ImageHeaderScrollView, TriggeringView } from 'react-native-image-header-scroll-view';
-import { Margins, Strings } from '../constants';
-import Content, { defaultSystemFonts } from 'react-native-render-html';
-import { FontSizes } from '../constants';
-import { WebView } from 'react-native-webview';
-import iframe from '@native-html/iframe-plugin';
-import Byline from '../components/Byline';
-import { decode } from 'html-entities';
+import React, { Component } from "react";
+import { View, Dimensions, StatusBar, TouchableWithoutFeedback, TouchableOpacity, StyleSheet, Image, Platform } from "react-native";
+import { Text, useTheme, withStyles } from "@ui-kitten/components";
+import { formatDate } from "../helpers/format";
+import { getPostByIdAsync } from "../helpers/wpapi";
+import { ImageHeaderScrollView, TriggeringView } from "react-native-image-header-scroll-view";
+import { Margins, Strings } from "../constants";
+import Content, { defaultSystemFonts } from "react-native-render-html";
+import { FontSizes } from "../constants";
+import WebView from "react-native-webview";
+import iframe from "@native-html/iframe-plugin";
+import Byline from "../components/Byline";
+import { decode } from "html-entities";
+import { PropsService } from "@ui-kitten/components/devsupport";
+import IframeRenderer, { iframeModel } from "@native-html/iframe-plugin";
+import { Layout } from "@ui-kitten/components";
-const renderers = { iframe }
-const { width, height } = Dimensions.get('window');
-const systemFonts = [...defaultSystemFonts, 'MinionProDisp', 'MinionProBoldDisp', 'MinionProRegular', 'MinionProItDisp'];
+// const renderers = { iframe }
+const { width, height } = Dimensions.get("window");
+const systemFonts = [...defaultSystemFonts, "MinionProDisp", "MinionProBoldDisp", "MinionProRegular", "MinionProItDisp"];
-export default function Post(props) {
-
- // A function that triggers going back to headlines
- const goBack = () => {
- props.navigation.goBack();
- }
-
- const createMarkup = (text) => {
- return text;
- // todo: HTML purify this if needed.
- }
+export default function Post({ route, navigation }) {
+ const { article } = route.params
+ // if no articles, make API call
+ const featuredMedia = article["jetpack_featured_media_url"]
+ const theme = useTheme()
+ const dateInstance = new Date(article.date)
+ const renderers = {
+ iframe: IframeRenderer
+ };
+
+ const customHTMLElementModels = {
+ iframe: iframeModel
+ };
- // console.log(props.route.params)
- // put the margin top for title becauase on phones with the notch it looks off center. Gotta find the right numbers on that an a dynamic implementation
-
- // const inferred = new Intl.DateTimeFormat(undefined, { year: 'numeric', day: 'numeric', month: 'short', hour: 'numeric', minute: 'numeric' })
- const { item } = props.route.params
- const { id, title, subtitle, date, parsely, _embedded, thumbnailInfo, content } = item;
- let thumbnailURL
- let caption
- if (_embedded["wp:featuredmedia"][0].code) {
- console.log(_embedded["wp:featuredmedia"][0].data.status);
- } else {
- thumbnailURL = _embedded["wp:featuredmedia"][0].media_details.sizes.full.source_url
- caption = _embedded["wp:featuredmedia"][0].caption
- }
- return (
-
-
- (
-
-
-
- )}
- >
-
-
-
-
- {/* */}
-
+ const Foreground = () => (
+
+ {decode(article.title.rendered)}
+
+ )
-
-
-
-
-
-
- By
-
-
- {new Date(date).toLocaleString('en-us', { year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric' })}
-
-
- {decode(_embedded["wp:term"][0][0].name)}
-
-
- {/* */}
-
-
- {/* {subtitle && {subtitle.rendered}} */}
- "}} tagsStyles={tagStyles} />
- {/* {content.rendered} */}
-
-
-
+ return (
+
+ {/* Could change this to `Layout` and work with theming that way as well. */}
+ {/* Need to add back the `TriggeringView` so that the image scales when user pulls. */}
+
+
+ {article["wps_subtitle"] !== "" && {article["wps_subtitle"]}}
+ {/* Byline will go here */}
+ {formatDate(dateInstance)}
+
+
- )
+
+ )
}
const styles = StyleSheet.create({
+ body: {
+ fontFamily: "MinionProDisp"
+ },
copy: {
// marginHorizontal: Margins.articleSides,
fontFamily: "LibreFranklinRegular",
fontSize: FontSizes.small,
// color: THEME.LABEL
},
+ hoveringText: {
+ color: "white",
+ paddingHorizontal: 20,
+ marginTop: 20,
+ textShadowColor: "black",
+ textShadowRadius: 1,
+ textShadowOffset: {width: 1, height: 1},
+ textAlign: "center"
+ },
caption: {
// marginHorizontal: Margins.articleSides,
fontFamily: "MinionProItDisp",
- fontSize: FontSizes.small,
- // fontStyle: 'italic'
+ // fontSize: FontSizes.small,
+ // fontStyle: "italic"
// color: THEME.LABEL
},
byline: {
@@ -136,16 +129,3 @@ const styles = StyleSheet.create({
// color: THEME.LABEL
},
})
-
-const tagStyles = {
- body: {
- whiteSpace: 'normal',
- fontSize: FontSizes.smallMedium,
- fontFamily: "MinionProRegular"
- },
- a: {
- color: '#8c1515',
- textDecorationColor: '#8c1515'
- // need to change the underline offset somehow
- }
-}
\ No newline at end of file
diff --git a/screens/Section.js b/screens/Section.js
new file mode 100644
index 00000000..c250d0ca
--- /dev/null
+++ b/screens/Section.js
@@ -0,0 +1,45 @@
+import { List } from "@ui-kitten/components";
+import React, { useEffect, useState } from "react";
+import { View, Text, Button, ActivityIndicator, FlatList, StyleSheet } from "react-native";
+import { ScrollView } from "react-native-gesture-handler";
+import Wlidcard from "../components/Wildcard";
+import { Margins } from "../constants";
+import { getCategoryPageAsync } from "../helpers/wpapi";
+import Model from "../Model"
+import { Layout } from "@ui-kitten/components";
+
+export default function Section({ route, navigation }) {
+ const { category, seed } = route.params
+ const [articlesLoading, setArticlesLoading] = useState(true)
+ // const [articles, setArticles] = useState(seed)
+ const [pageNumber, setPageNumber] = useState(0)
+ useEffect(() => {
+ // Model.posts().categories(category.id).perPage(20).get().then(posts => console.log(posts))
+ }, [pageNumber])
+
+ /*const fetchNextPage = () => {
+ setIsLoading(true)
+ getCategoryPageAsync(id, page + 1).then(result => {
+ setArticles(articles => [...articles, ...result])
+ setPage(page + 1)
+ })
+ setArticlesLoading(false)
+ }*/
+
+ // const [articles, setArticles] = useState(seed)
+
+ return (
+
+
+
+
+ {/* console.log("Time to load next page.")} /> */}
+
+ )
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ }
+})
\ No newline at end of file
diff --git a/theme-context.js b/theme-context.js
new file mode 100644
index 00000000..ea438d10
--- /dev/null
+++ b/theme-context.js
@@ -0,0 +1,6 @@
+import React from "react";
+
+export const ThemeContext = React.createContext({
+ theme: "light",
+ toggleTheme: () => {},
+});
\ No newline at end of file
diff --git a/theme.js b/theme.js
new file mode 100644
index 00000000..6e72c6f6
--- /dev/null
+++ b/theme.js
@@ -0,0 +1,56 @@
+export const DailyBread = {
+ light: {
+ "color-primary-100": "#F9DCCF",
+ "color-primary-200": "#F4B4A1",
+ "color-primary-300": "#DE7D6D",
+ "color-primary-400": "#BE4B45",
+ "color-primary-500": "#94171C",
+ "color-primary-600": "#7F101F",
+ "color-primary-700": "#6A0B20",
+ "color-primary-800": "#55071F",
+ "color-primary-900": "#47041E",
+ "color-success-100": "#CBF9CD",
+ "color-success-200": "#9AF3A6",
+ "color-success-300": "#63DB7F",
+ "color-success-400": "#3AB864",
+ "color-success-500": "#0C8942",
+ "color-success-600": "#087542",
+ "color-success-700": "#066240",
+ "color-success-800": "#034F3B",
+ "color-success-900": "#024137",
+ "color-info-100": "#C8F1F9",
+ "color-info-200": "#93DEF4",
+ "color-info-300": "#5AB9DE",
+ "color-info-400": "#318EBE",
+ "color-info-500": "#025993",
+ "color-info-600": "#01457E",
+ "color-info-700": "#013369",
+ "color-info-800": "#002455",
+ "color-info-900": "#001946",
+ "color-warning-100": "#FDEFCA",
+ "color-warning-200": "#FBDA97",
+ "color-warning-300": "#F5BE62",
+ "color-warning-400": "#ECA13B",
+ "color-warning-500": "#E07700",
+ "color-warning-600": "#C05D00",
+ "color-warning-700": "#A14600",
+ "color-warning-800": "#813200",
+ "color-warning-900": "#6B2400",
+ "color-danger-100": "#FBD5CF",
+ "color-danger-200": "#F7A5A0",
+ "color-danger-300": "#E76D73",
+ "color-danger-400": "#CF475A",
+ "color-danger-500": "#AF163A",
+ "color-danger-600": "#96103C",
+ "color-danger-700": "#7D0B3C",
+ "color-danger-800": "#650738",
+ "color-danger-900": "#530435"
+ },
+
+ dark: {
+ "background-basic-color-1": "#121212",
+ "background-basic-color-2": "#2D2D2F",
+ "background-basic-color-3": "#4D4D4F",
+ "background-basic-color-4": "#6D6D71"
+ }
+};
diff --git a/yarn.lock b/yarn.lock
index 05e1c7f7..6384e6ef 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1575,6 +1575,21 @@
dependencies:
"@types/hammerjs" "^2.0.36"
+"@eva-design/dss@^2.0.0":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/@eva-design/dss/-/dss-2.1.1.tgz#bd8da793e13a0dcac91d852b91ebf05e6fbdc0ee"
+ integrity sha512-Z6rZSodsQHWW1yDuiop1glJU8xKJSdKTPoWWCBsQWXYMNwTAEPgcZV69HNlnerB+T++jwj2jeoBzO24CTc0PmQ==
+
+"@eva-design/eva@^2.1.1":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/@eva-design/eva/-/eva-2.1.1.tgz#ad237ae76d63e7c474b3a0755c697490bbe5a4bc"
+ integrity sha512-WS1ykETXyq0Kxa0aFlPMBeftEtBeTDv9qEUeQ4VvbTETMc7hsZPSkPr2HudtQhFihiM72GFfwAK6GIAlF6GXdQ==
+
+"@eva-design/processor@^2.0.0":
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/@eva-design/processor/-/processor-2.1.1.tgz#33a59efa52ee2d206ac4d912dae801d12f9275a8"
+ integrity sha512-lbxZLm5ARhuk/wxWkaiWhw5XeZ+Xcp1JGCjcZl+S5rUbLppfp4U47jfq861EY27BP1dpQ5PyTVFCbl5eHlRFdg==
+
"@expo-google-fonts/open-sans@^0.2.0":
version "0.2.0"
resolved "https://registry.yarnpkg.com/@expo-google-fonts/open-sans/-/open-sans-0.2.0.tgz#59d94d5994e75afed4a576344533d321250b86a5"
@@ -2309,7 +2324,7 @@
resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.1.tgz#0c74724ba6e9ea6ad25a391eab60a79eaba4c556"
integrity sha512-9FqhNjKQWpQ3fGnSOCovHOm+yhhiorKEqYLAfd525jWavunDJcx8rOW6i6ozAh+FbwcYMkL7b+3j4UR/30MpoQ==
-"@formidable-webview/webshell@^2.3.0":
+"@formidable-webview/webshell@^2.6.0":
version "2.6.0"
resolved "https://registry.yarnpkg.com/@formidable-webview/webshell/-/webshell-2.6.0.tgz#64704c0b513206e71b23118b3c9d096f0d545005"
integrity sha512-FwQQDajg1xs7W3CUiUNJMvdjgLjKLDGzs0XPzoVg0Dunhold1Jg7w5pihUdvVugFlNtkSpXMA+du9QDHE8lmpg==
@@ -2438,15 +2453,21 @@
css-to-react-native "^3.0.0"
csstype "^3.0.8"
-"@native-html/iframe-plugin@^1.1.2":
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/@native-html/iframe-plugin/-/iframe-plugin-1.1.2.tgz#949890cd360a6841ee5b88bd8cc97289f2c25c39"
- integrity sha512-9baVbTE6Fojw8VsuFduHrO6QXFbg2kWV37eipgOlDBT5sCi72gYJMpbaDIYMK7eOHqsehDVflfNnjPYZNmKN9A==
+"@native-html/iframe-plugin@^2.6.1":
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/@native-html/iframe-plugin/-/iframe-plugin-2.6.1.tgz#5b9c36d9d500f82f0bcf654bc005922df4211158"
+ integrity sha512-PM2vFNT44n/UkCm9+OUn+cNSKgiMjaw7c7/2JnnztHDLVMtPIf52K/86miWNpQpxFoy1ouoLVOvfjFRhoPXjag==
dependencies:
- "@formidable-webview/webshell" "^2.3.0"
- "@types/prop-types" "^15.7.3"
+ "@formidable-webview/webshell" "^2.6.0"
+ "@native-html/plugins-core" "1.3.0"
+ "@types/prop-types" "^15.7.4"
prop-types "^15.7.2"
+"@native-html/plugins-core@1.3.0":
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/@native-html/plugins-core/-/plugins-core-1.3.0.tgz#f1f24622097551930d9dab0214c4929d00f7446e"
+ integrity sha512-vce35gqGJKa2oPDZVa2sKjucFFVK+3g8quLayeXiJtj5LzuS8TWGrBFTS5O4ToUtE02AJkCDOLwAguCzK2HWdQ==
+
"@native-html/transient-render-engine@11.2.3":
version "11.2.3"
resolved "https://registry.yarnpkg.com/@native-html/transient-render-engine/-/transient-render-engine-11.2.3.tgz#e4de0e7c8c023224a2dc27f3bd2b30d3984d94a4"
@@ -2735,12 +2756,12 @@
resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-2.0.0.tgz#4c40b74655c83982c8cf47530ee7dc13d957b6aa"
integrity sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==
-"@react-navigation/core@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.0.1.tgz#4424ee1f83e2e305ef80d27c2778fb82fba852a0"
- integrity sha512-mVdvBDYdz8uzLQHokmVdX/xC4rS7NIkD1FN/yaGdovVzYApAhM+UGd3w1zskjyCSyXaVHHOwV59ZGVew+84xfQ==
+"@react-navigation/core@^6.2.2":
+ version "6.2.2"
+ resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.2.2.tgz#29ca539e22581616aad82b7451d47c5efe936f31"
+ integrity sha512-gEJ1gRqt1EIqRrnJIpSQ0wWJRue9maAQNKYrlQ0a/LSKErF3g6w+sD2wW4Bbb1yj88pGhKeuI4wdB9MVK766Pg==
dependencies:
- "@react-navigation/routers" "^6.0.1"
+ "@react-navigation/routers" "^6.1.1"
escape-string-regexp "^4.0.0"
nanoid "^3.1.23"
query-string "^7.0.0"
@@ -2751,27 +2772,33 @@
resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.0.3.tgz#23052dc9c9766614c629a400fc96a600176ab1a3"
integrity sha512-hDf55C65kD7X09r4p9Z74xuCLe2damL+i7v0YLM3AFD0TEkDiGwRczhsoZFm8gg/TIJpLqa+CjqX2gvrdQyQ+A==
-"@react-navigation/native-stack@^6.0.4":
- version "6.0.4"
- resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.0.4.tgz#e6ce0f27062156d11db542b6f0b89946dca12101"
- integrity sha512-9H3S+F24kZKIMBNBB4nfEAZ23wNbhpwNbkSF7msduvc0PxO/L9fut2S4xprxBSjxdFqTxSit0Ry2x8X471MdWg==
+"@react-navigation/elements@^1.3.4":
+ version "1.3.4"
+ resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.4.tgz#abb48136508c1e60862dc14a101ce02ff685a337"
+ integrity sha512-O0jICpjn3jskVo4yiWzZozmj7DZy1ZBbn3O7dbenuUjZSj/cscjwaapmZZFGcI/IMmjmx8UTKsybhCFEIbGf3g==
+
+"@react-navigation/native-stack@^6.7.0":
+ version "6.7.0"
+ resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.7.0.tgz#57e6390e3e4e46b3a7f580810c3d384b4676b7e5"
+ integrity sha512-03CuSwbBvP9+iXgjrTRRw+aog+KZXbhPzqCWVExzIWNOzf5/PJEcdtlm9KDrx2aHHDtDA6LRLKQA4UIlJOmNzA==
dependencies:
- "@react-navigation/elements" "^1.0.3"
+ "@react-navigation/elements" "^1.3.4"
warn-once "^0.1.0"
-"@react-navigation/native@^6.0.2":
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.0.2.tgz#6bdb3cfafb6a9cfb603c1555dd61faafca35b7c2"
- integrity sha512-HDqEwgvQ4Cu16vz8jQ55lfyNK9CGbECI1wM9cPOcUa+gkOQEDZ/95VFfFjGGflXZs3ybPvGXlMC4ZAyh1CcO6w==
+"@react-navigation/native@^6.0.11":
+ version "6.0.11"
+ resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.0.11.tgz#d221a5f6a5222187a09fc968d07d67d83ce70708"
+ integrity sha512-z0YTB7Czdb9SNjxfzcFNB3Vym0qmUcxpiYGOOXX8PH0s+xlIs/w+2RVp6YAvAC48A30o7MMCYqy5OeR6lrtWHg==
dependencies:
- "@react-navigation/core" "^6.0.1"
+ "@react-navigation/core" "^6.2.2"
escape-string-regexp "^4.0.0"
+ fast-deep-equal "^3.1.3"
nanoid "^3.1.23"
-"@react-navigation/routers@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-6.0.1.tgz#ae50f07c776c18bd9fdc87f17e9f3afc3fd59d19"
- integrity sha512-5ctB49rmtTRQuTSBVgqMsEzBUjPP2ByUzBjNivA7jmvk+PDCl4oZsiR8KAm/twhxe215GYThfi2vUWXKAg6EEQ==
+"@react-navigation/routers@^6.1.1":
+ version "6.1.1"
+ resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-6.1.1.tgz#902ec3fedcf540af36cd9f013779c5134af58e73"
+ integrity sha512-mWWj2yh4na/OBaE7bWrft4kdAtxnG8MlV6ph3Bi6tHqgcnxENX+dnQY6y0qg/6E7cmMlaJg5nAC5y4Enr5ir8A==
dependencies:
nanoid "^3.1.23"
@@ -2855,10 +2882,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.30.tgz#2c6e8512acac70815e8176aa30c38025067880ef"
integrity sha512-oNBIZjIqyHYP8VCNAV9uEytXVeXG2oR0w9lgAXro20eugRQfY002qr3CUl6BAe+Yf/z3CRjPdz27Pu6WWtuSRw==
-"@types/prop-types@^15.7.3":
- version "15.7.4"
- resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.4.tgz#fcf7205c25dff795ee79af1e30da2c9790808f11"
- integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==
+"@types/prop-types@^15.7.4":
+ version "15.7.5"
+ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
+ integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==
"@types/ramda@^0.27.40":
version "0.27.44"
@@ -2898,6 +2925,24 @@
dependencies:
"@types/yargs-parser" "*"
+"@ui-kitten/components@^5.1.2":
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/@ui-kitten/components/-/components-5.1.2.tgz#18b6aba8ed67b0b893f0ec3f40daf5e698676811"
+ integrity sha512-J1Gd53+2qngktLSKot9aT+LGhUt05uGE3ouEiY6FsxUZdexlzcQVhp5rRasExUSAYNcN5J7/XSNEPNB9qX0v1g==
+ dependencies:
+ "@eva-design/dss" "^2.0.0"
+ "@eva-design/processor" "^2.0.0"
+ fecha "3.0.3"
+ hoist-non-react-statics "^3.2.1"
+ lodash.merge "^4.6.1"
+
+"@ui-kitten/eva-icons@^5.1.2":
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/@ui-kitten/eva-icons/-/eva-icons-5.1.2.tgz#f128c4baf95d84a13067f02f0bdcb8df61178a9f"
+ integrity sha512-cUU6P469TgZ/vF9BrpBXFyTHttfXu/pHZiITfGw96BbaPn5GtBFSnorRtaOyqU4k2+pyzOA7rohqlbRY3jgAdA==
+ dependencies:
+ react-native-eva-icons "^1.3.1"
+
"@urql/core@2.3.6":
version "2.3.6"
resolved "https://registry.yarnpkg.com/@urql/core/-/core-2.3.6.tgz#ee0a6f8fde02251e9560c5f17dce5cd90f948552"
@@ -3368,6 +3413,11 @@ body-parser@1.19.0:
raw-body "2.4.0"
type-is "~1.6.17"
+boolbase@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
+ integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==
+
bplist-creator@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c"
@@ -3980,6 +4030,17 @@ css-in-js-utils@^2.0.0:
hyphenate-style-name "^1.0.2"
isobject "^3.0.1"
+css-select@^4.2.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b"
+ integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==
+ dependencies:
+ boolbase "^1.0.0"
+ css-what "^6.0.1"
+ domhandler "^4.3.1"
+ domutils "^2.8.0"
+ nth-check "^2.0.1"
+
css-to-react-native@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-3.0.0.tgz#62dbe678072a824a689bcfee011fc96e02a7d756"
@@ -3989,6 +4050,19 @@ css-to-react-native@^3.0.0:
css-color-keywords "^1.0.0"
postcss-value-parser "^4.0.2"
+css-tree@^1.0.0-alpha.39:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.1.3.tgz#eb4870fb6fd7707327ec95c2ff2ab09b5e8db91d"
+ integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==
+ dependencies:
+ mdn-data "2.0.14"
+ source-map "^0.6.1"
+
+css-what@^6.0.1:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4"
+ integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==
+
csstype@^3.0.8:
version "3.0.8"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.8.tgz#d2266a792729fb227cd216fb572f43728e1ad340"
@@ -4184,6 +4258,13 @@ domhandler@^4.2.2:
dependencies:
domelementtype "^2.2.0"
+domhandler@^4.3.1:
+ version "4.3.1"
+ resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c"
+ integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==
+ dependencies:
+ domelementtype "^2.2.0"
+
domutils@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135"
@@ -4629,6 +4710,11 @@ extglob@^2.0.4:
snapdragon "^0.8.1"
to-regex "^3.0.1"
+fast-deep-equal@^3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
+ integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
+
fast-glob@^3.2.5:
version "3.2.7"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1"
@@ -4715,6 +4801,11 @@ fbjs@^3.0.0:
setimmediate "^1.0.5"
ua-parser-js "^0.7.18"
+fecha@3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/fecha/-/fecha-3.0.3.tgz#fabbd416497649a42c24d34bfa726b579203a1e2"
+ integrity sha512-6LQK/1jud/FZnfEEZJ7y81vw7ge81DNd/XEsX0hgMUjhS+QMljkb1C0czBaP7dMNRVrd5mw/J2J7qI2Nw+TWZw==
+
fetch-retry@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/fetch-retry/-/fetch-retry-4.1.1.tgz#fafe0bb22b54f4d0a9c788dff6dd7f8673ca63f3"
@@ -5195,7 +5286,7 @@ hermes-profile-transformer@^0.0.6:
dependencies:
source-map "^0.7.3"
-hoist-non-react-statics@^3.3.0:
+hoist-non-react-statics@^3.2.1, hoist-non-react-statics@^3.3.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
@@ -6067,6 +6158,11 @@ lodash.debounce@^4.0.8:
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
+lodash.merge@^4.6.1:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
+
lodash.throttle@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
@@ -6177,6 +6273,11 @@ md5hex@^1.0.0:
resolved "https://registry.yarnpkg.com/md5hex/-/md5hex-1.0.0.tgz#ed74b477a2ee9369f75efee2f08d5915e52a42e8"
integrity sha1-7XS0d6Luk2n3Xv7i8I1ZFeUqQug=
+mdn-data@2.0.14:
+ version "2.0.14"
+ resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.14.tgz#7113fc4281917d63ce29b43446f701e68c25ba50"
+ integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==
+
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -6827,6 +6928,13 @@ npm-run-path@^2.0.0:
dependencies:
path-key "^2.0.0"
+nth-check@^2.0.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d"
+ integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==
+ dependencies:
+ boolbase "^1.0.0"
+
nullthrows@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1"
@@ -7438,6 +7546,11 @@ react-native-dotenv@^3.3.1:
dependencies:
dotenv "^10.0.0"
+react-native-eva-icons@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/react-native-eva-icons/-/react-native-eva-icons-1.3.1.tgz#1e6e019b0fd3cb1669db50bd6bbdaa6d89327593"
+ integrity sha512-emd/aYXuOacuDVTx0SJoLi+xsOdCNdljQB3PTNCM9AQ3m/smG0X1TN0+ihelPO7MqoHzaH0h6lbANtwxGUy8Fw==
+
react-native-gesture-handler@~2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.2.1.tgz#672258aa5a40c92a97c736bdde0a8bd6c8c6c692"
@@ -7466,6 +7579,11 @@ react-native-lightbox@^0.8.1:
dependencies:
prop-types "^15.7.2"
+react-native-pager-view@^5.4.25:
+ version "5.4.25"
+ resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-5.4.25.tgz#cd639d5387a7f3d5581b55a33c5faa1cbc200f97"
+ integrity sha512-3drrYwaLat2fYszymZe3nHMPASJ4aJMaxiejfA1V5SK3OygYmdtmV2u5prX7TnjueJzGSyyaCYEr2JlrRt4YPg==
+
react-native-reanimated@~2.2.0:
version "2.2.4"
resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.2.4.tgz#36c5d15028b0bd7d479fba5199117ac870c7a532"
@@ -7530,6 +7648,14 @@ react-native-snap-carousel@^3.9.1:
prop-types "^15.6.1"
react-addons-shallow-compare "15.6.2"
+react-native-svg@12.3.0:
+ version "12.3.0"
+ resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-12.3.0.tgz#40f657c5d1ee366df23f3ec8dae76fd276b86248"
+ integrity sha512-ESG1g1j7/WLD7X3XRFTQHVv0r6DpbHNNcdusngAODIxG88wpTWUZkhcM3A2HJTb+BbXTFDamHv7FwtRKWQ/ALg==
+ dependencies:
+ css-select "^4.2.1"
+ css-tree "^1.0.0-alpha.39"
+
react-native-web@0.17.7:
version "0.17.7"
resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.17.7.tgz#038899dbc94467a0ca0be214b88a30e0c117b176"
@@ -7543,10 +7669,10 @@ react-native-web@0.17.7:
normalize-css-color "^1.0.2"
prop-types "^15.6.0"
-react-native-webview@11.18.1:
- version "11.18.1"
- resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.18.1.tgz#0a1893abd391c8f0e7d4c5874bfa737ca6311225"
- integrity sha512-1VoVmkbsHJ44WA+frMhNfua64t0u2jq80h25sUWrKJRiYrO0XIsKBnJcqrzuOH1ZAT/zDHTqBB5OU+bxEHLJmQ==
+react-native-webview@^11.22.7:
+ version "11.22.7"
+ resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.22.7.tgz#bf0d1755473af6e1af8486e862668fc7530149b4"
+ integrity sha512-IYMElB4fFS6S8LbhivAQfAlW95HorqCK4T3mFKmWsV24iPVTfYoaiA1TNzkRnjw2mMgXDk/QnMeH9IbjBVs1Ag==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
@@ -8216,7 +8342,7 @@ source-map@^0.5.0, source-map@^0.5.6:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
-source-map@^0.6.0, source-map@~0.6.1:
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
|