-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from AudacityMusic/new-navbar-home
Revamp navbar and Home screen
- Loading branch information
Showing
14 changed files
with
250 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,58 @@ | ||
import "@expo/metro-runtime"; | ||
import { StyleSheet } from "react-native"; | ||
import { StatusBar } from "expo-status-bar"; | ||
import { NavigationContainer } from "@react-navigation/native"; | ||
import { createNativeStackNavigator } from "@react-navigation/native-stack"; | ||
|
||
import colors from "./src/constants/colors"; | ||
import HomeScreen from "./src/screens/HomeScreen"; | ||
import SignInScreen from "./src/screens/SignInScreen"; | ||
import AccountScreen from "./src/screens/AccountScreen"; | ||
// import SignInScreen from "./src/screens/SignInScreen"; | ||
import DonateScreen from "./src/screens/DonateScreen"; | ||
import WebsitesScreen from "./src/screens/WebsitesScreen"; | ||
import VolunteerFormScreen from "./src/screens/VolunteerFormScreen"; | ||
|
||
import VolunteerOpportunityScreen from "./src/screens/VolunteerOpportunityScreen"; | ||
import OtherInfoScreen from "./src/screens/OtherInfoScreen"; | ||
import HomeHeader from "./src/components/HomeHeader"; | ||
|
||
const Stack = createNativeStackNavigator(); | ||
|
||
export default function App() { | ||
return ( | ||
// <NavigationContainer> | ||
// <Stack.Navigator initialRouteName="Other Info"> | ||
// <Stack.Screen name="Home" component={HomeScreen} /> | ||
// <Stack.Screen name="Donate" component={DonateScreen} /> | ||
// <Stack.Screen name="Websites" component={WebsitesScreen} /> | ||
// <Stack.Screen name="Other Info" component={OtherInfoScreen} /> | ||
// </Stack.Navigator> | ||
// </NavigationContainer> | ||
// <SignInScreen></SignInScreen> | ||
<OtherInfoScreen></OtherInfoScreen> | ||
<NavigationContainer> | ||
<StatusBar style="light" /> | ||
<Stack.Navigator | ||
initialRouteName="Home" | ||
screenOptions={{ | ||
headerStyle: { | ||
backgroundColor: colors.primary, | ||
}, | ||
headerTintColor: colors.white, | ||
}} | ||
> | ||
<Stack.Screen | ||
name="Home" | ||
component={HomeScreen} | ||
options={{ | ||
header: (props) => <HomeHeader {...props} />, | ||
}} | ||
/> | ||
<Stack.Screen name="Account" component={AccountScreen} /> | ||
<Stack.Screen name="Donate" component={DonateScreen} /> | ||
<Stack.Screen name="Websites" component={WebsitesScreen} /> | ||
<Stack.Screen name="Other Info" component={OtherInfoScreen} /> | ||
<Stack.Screen | ||
name="Volunteer Opportunity" | ||
component={VolunteerOpportunityScreen} | ||
options={{ | ||
title: null, | ||
headerStyle: { | ||
backgroundColor: colors.black, | ||
}, | ||
}} | ||
/> | ||
<Stack.Screen name="Volunteer Form" component={VolunteerFormScreen} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { StyleSheet, Text } from "react-native"; | ||
|
||
export default function Heading({ children }) { | ||
return <Text style={styles.heading}>{children}</Text>; | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
heading: { | ||
fontSize: 18, | ||
fontWeight: "bold", | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Image, Text, StyleSheet, Pressable, View } from "react-native"; | ||
import { LinearGradient } from "expo-linear-gradient"; | ||
import colors from "../constants/colors"; | ||
|
||
export default function HomeHeader({ navigation }) { | ||
return ( | ||
<LinearGradient | ||
colors={[colors.primaryLight, colors.primaryDark]} | ||
style={styles.container} | ||
> | ||
<View style={styles.subcontainer}> | ||
<Text style={styles.headerText}>Audacity Music Club</Text> | ||
<Pressable onPress={() => navigation.navigate("Account")}> | ||
<Image | ||
style={styles.profile} | ||
source={require("../assets/placeholder-profile.png")} | ||
/> | ||
</Pressable> | ||
</View> | ||
</LinearGradient> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
height: 120, | ||
paddingHorizontal: 20, | ||
paddingBottom: 10, | ||
justifyContent: "flex-end", | ||
}, | ||
subcontainer: { | ||
flexDirection: "row", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
}, | ||
headerText: { | ||
color: colors.white, | ||
fontSize: 20, | ||
}, | ||
profile: { | ||
width: 40, | ||
height: 40, | ||
borderRadius: 100, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { StyleSheet, Text } from "react-native"; | ||
|
||
export default function Websites() { | ||
return <Text>TODO</Text>; | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
// TODO | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export default { | ||
primary: "#006000", | ||
primaryLight: "#008000", | ||
primaryDark: "#004000", | ||
secondary: "#353535", | ||
danger: "#E12504", | ||
black: "#000", | ||
white: "#fff", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
import { StyleSheet, Text, View } from "react-native"; | ||
import LogOutButton from "../components/Logout.js"; | ||
import { View } from "react-native"; | ||
|
||
import LogOutButton from "../components/LogOutButton.js"; | ||
import Profile from "../components/Profile.js"; | ||
|
||
export default function AccountScreen() { | ||
return ( | ||
<View> | ||
<Text>{"\n\n\n\n\n\n\n"}</Text> | ||
<Profile></Profile> | ||
<LogOutButton></LogOutButton> | ||
<Profile /> | ||
<LogOutButton /> | ||
</View> | ||
); | ||
} |
Oops, something went wrong.