Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completed the styling for the job resource page and fixed the issue w… #22

Merged
merged 1 commit into from
Mar 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
"react-native-autoheight-webview": "^1.5.8",
"react-native-gesture-handler": "~1.8.0",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.9",
"react-native-screens": "~2.15.2",
"react-native-svg": "12.1.0",
"react-native-web": "~0.13.12",
"react-native-webview": "11.0.0",
"react-native-webview": "^11.3.2",
"react-redux": "^7.2.2",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.3.0"
Expand Down
7 changes: 7 additions & 0 deletions src/components/JobPost.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const stylesLight = StyleSheet.create({
width: 128,
height: 128,
borderRadius: 20,
marginHorizontal: "30%",
borderColor: "#aa88c6",
borderWidth: 1,
marginHorizontal: "30%",
},
});

Expand All @@ -42,6 +46,9 @@ const stylesDark = StyleSheet.create({
width: 128,
height: 128,
borderRadius: 20,
borderColor: "#7a559a",
borderWidth: 1,
marginHorizontal: "30%",
},
});

Expand Down
208 changes: 176 additions & 32 deletions src/screens/JobDescription.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import * as WebBrowser from "expo-web-browser";
import { StatsBar } from "react-native";
import { WebView } from "react-native-webview";
import AutoHeightWebView from "react-native-autoheight-webview";
import { useLight } from "../contexts/HandleLightsOut";

const noImage = require("../images/logos/no-image-logo.png");

import {
Dimensions,
StyleSheet,
StatusBar,
SafeAreaView,
Expand All @@ -32,21 +32,67 @@ const stylesLight = StyleSheet.create({
borderRadius: 10,
width: 360,
backgroundColor: "#ffd085",
},

text: {
color: "#000000",
},
companyLogo: {
companyLogo: {
width: 128,
height: 128,
borderRadius:20,
borderRadius: 20,
marginHorizontal: "30%",
borderColor: "#aa88c6",
borderWidth: 1,
marginHorizontal: "30%",
},
jobTitle: {
color: "#240046",
fontSize: 34,
fontWeight: "bold",
marginHorizontal: "1%",
marginBottom: "2%",
textAlign: "center",
},
jobCompany: {
color: "#7a559a",
fontSize: 28,
marginHorizontal: "1%",
textAlign: "center",
marginBottom: "2%",
},
jobItems: {
color: "#121212",
fontSize: 18,
display: "flex",
justifyContent: "center",
},
jobItemText: {
color: "#121212",
fontSize: 16,
fontWeight: "bold",
justifyContent: "center",
textAlign: "center",
marginBottom: "2%",
},
descriptionView: {
flex: 1,
marginTop: "1%",
width: "100%",
fontSize: 1000,
justifyContent: "center",
},
applyButton: {
backgroundColor: "#240046",
borderRadius: 10,
width: "70%",
height: "7%",
justifyContent: "center",
marginHorizontal: "15%",
marginTop: "2%",
marginBottom: "-4%",
},
applyButtonText: {
color: "#ffd085",
fontSize: 25,
fontWeight: "bold",
justifyContent: "center",
textAlign: "center",
},
});

Expand All @@ -65,22 +111,68 @@ const stylesDark = StyleSheet.create({
borderRadius: 10,
width: 360,
backgroundColor: "#e5e5e5",
},
text: {
color: "#e5e5e5",
},
companyLogo: {
companyLogo: {
width: 128,
height: 128,
borderRadius:20,
borderRadius: 20,
borderColor: "#7a559a",
borderWidth: 1,
marginHorizontal: "30%",
},
jobTitle: {
color: "#240046",
fontSize: 34,
fontWeight: "bold",
marginHorizontal: "1%",
marginBottom: "2%",
textAlign: "center",
},
jobCompany: {
color: "#7a559a",
fontSize: 28,
marginHorizontal: "1%",
marginBottom: "2%",
textAlign: "center",
},
jobItems: {
color: "#121212",
fontSize: 20,
display: "flex",
justifyContent: "center",
},
jobItemText: {
color: "#121212",
fontSize: 16,
fontWeight: "bold",
justifyContent: "center",
textAlign: "center",
marginBottom: "2%",
},
descriptionView: {
flex: 1,
marginTop: "1%",
width: "100%",
fontSize: 1000,
fontSize: 100,
justifyContent: "center",
},
applyButton: {
backgroundColor: "#ffd085",
borderRadius: 10,
width: "70%",
height: "7%",
justifyContent: "center",
marginHorizontal: "15%",
marginTop: "2%",
marginBottom: "-4%",
},
applyButtonText: {
color: "#240046",
fontSize: 25,
fontWeight: "bold",
justifyContent: "center",
textAlign: "center",
},

});

export default function JobDescription({ route: { params } }) {
Expand All @@ -94,29 +186,81 @@ export default function JobDescription({ route: { params } }) {
const lightDarkStatusColor = lightState ? "light-content" : "default";

return (
<SafeAreaView style={lightState ? stylesDark.container : stylesLight.container}>
<SafeAreaView
style={lightState ? stylesDark.container : stylesLight.container}
>
<StatusBar barStyle={lightDarkStatusColor} />

<View>
<Image source={companyLogo} style={lightState ? stylesDark.companyLogo : stylesLight.companyLogo} />
<Text style={lightState ? stylesDark.text : stylesLight.text}>{params.title}</Text>
<Text style={lightState ? stylesDark.text : stylesLight.text}>{params.company}</Text>
<View
style={
lightState
? stylesDark.jobDescriptionParent
: stylesLight.jobDescriptionParent
}
>
<Image
source={companyLogo}
style={lightState ? stylesDark.companyLogo : stylesLight.companyLogo}
/>
<Text style={lightState ? stylesDark.jobTitle : stylesLight.jobTitle}>
{params.title}
</Text>
<Text
style={lightState ? stylesDark.jobCompany : stylesLight.jobCompany}
>
{params.company}
</Text>

<View>
<Text style={lightState ? stylesDark.text : stylesLight.text}>Category: {params.catergory}</Text>
<Text style={lightState ? stylesDark.text : stylesLight.text}>Hiring: {params.requirements}</Text>
<Text style={lightState ? stylesDark.text : stylesLight.text}>Job Hours: {params.hours}</Text>
<View style={lightState ? stylesDark.jobItems : stylesLight.jobItems}>
<Text
style={
lightState ? stylesDark.jobItemText : stylesLight.jobItemText
}
>
Category: {params.catergory}
</Text>
<Text
style={
lightState ? stylesDark.jobItemText : stylesLight.jobItemText
}
>
Hiring: {params.requirements}
</Text>
<Text
style={
lightState ? stylesDark.jobItemText : stylesLight.jobItemText
}
>
Job Hours: {params.hours}
</Text>
</View>


<WebView
<AutoHeightWebView
originWhitelist={["*"]}
source={{ html: `${params.description}` }}
style={lightState ? stylesDark.descriptionView : stylesLight.descriptionView}
textZoom={100}
style={
lightState
? stylesDark.descriptionView
: stylesLight.descriptionView
}
customStyle={`* {font-size: 20px; font-family: 'Roboto';}`}
scalesPageToFit={true}
viewportContent={"width=device-width, user-scalable=no"}
showsVerticalScrollIndicator={true}
/>
<TouchableOpacity onPress={openLink}>
<Text style={lightState ? stylesDark.text : stylesLight.text}>Apply</Text>

<TouchableOpacity
onPress={openLink}
style={lightState ? stylesDark.applyButton : stylesLight.applyButton}
>
<Text
style={
lightState
? stylesDark.applyButtonText
: stylesLight.applyButtonText
}
>
Apply
</Text>
</TouchableOpacity>
</View>
</SafeAreaView>
Expand Down
15 changes: 11 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10764,6 +10764,13 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339"
integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==

react-native-autoheight-webview@^1.5.8:
version "1.5.8"
resolved "https://registry.yarnpkg.com/react-native-autoheight-webview/-/react-native-autoheight-webview-1.5.8.tgz#afcbe65dfefcce4e2088c9aff9fee23dcd18aadf"
integrity sha512-6+LY0a47AsnfnGgqMP2JzNVgX0/sGnkgq7UV39OKgUf2Im/glFjUOggYm8EiyzmA93gb9tYVB1mRTORElWAiGQ==
dependencies:
prop-types "^15.7.2"

react-native-gesture-handler@~1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.8.0.tgz#18f61f51da50320f938957b0ee79bc58f47449dc"
Expand Down Expand Up @@ -10829,10 +10836,10 @@ react-native-web@~0.13.12:
prop-types "^15.6.0"
react-timer-mixin "^0.13.4"

react-native-webview@11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.0.0.tgz#d667cbcc772e963fe88a4156290d25fe47ed43b0"
integrity sha512-gzID5ebCFVNkxreuabClymo6QkJbXCLEtiIUY9QAhxY58HsDUp8x0YzDVEROYyEJ4ghL71koAOeQRDNAgNnh1w==
react-native-webview@^11.3.2:
version "11.3.2"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-11.3.2.tgz#17155a69caf1910233ae3d606dce6caf57b0169c"
integrity sha512-j+0eUKYY3MCO7DRhZaIPY6+0q+Yo1Iyhz5f7cde+i5vR71CcJ/60DhZPw5SSqXZnZiVX0Myz1D46u8dtfRmQFg==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
Expand Down