diff --git a/vds-app/App/assets/logo.png b/vds-app/App/assets/logo.png
new file mode 100644
index 0000000..0f19421
Binary files /dev/null and b/vds-app/App/assets/logo.png differ
diff --git a/vds-app/App/components/Button.js b/vds-app/App/components/Button.js
index dfaf86c..5fe22d6 100644
--- a/vds-app/App/components/Button.js
+++ b/vds-app/App/components/Button.js
@@ -18,6 +18,11 @@ const styles = StyleSheet.create({
fontSize: 20,
textAlign: "center"
},
+ subtitle: {
+ color: colors.white,
+ fontSize: 15,
+ textAlign: "center"
+ },
buttonContainer: {
flexDirection: "row",
flexWrap: "wrap",
@@ -26,11 +31,26 @@ const styles = StyleSheet.create({
}
})
-export const Button = ({ text, onPress = () => {} }) => (
-
- {text}
-
-)
+export const Button = ({ text, subtitle = null, isBig = false, onPress = () => {} }) => {
+
+ const buttonBig = isBig ? {fontSize: 25} : {}
+
+ if(subtitle) {
+ return (
+
+ {text}
+ {subtitle}
+
+ )
+ } else {
+ return (
+
+ {text}
+
+ )
+ }
+}
+
export const ButtonContainer = ({ children }) => (
{children}
diff --git a/vds-app/App/components/Variables.js b/vds-app/App/components/Variables.js
index 8045012..e182241 100644
--- a/vds-app/App/components/Variables.js
+++ b/vds-app/App/components/Variables.js
@@ -2,7 +2,7 @@ export const colors = {
white: "#fff",
white_alpha: "rgba(255, 255, 255, 0.3)",
black: "#000",
- purple: "#780062",
+ purple: "#8c0072",
purple_light: "#a30085",
blue: "#36b1f0",
dark_blue: "#15a7f0",
@@ -17,7 +17,9 @@ export const colors = {
export const texts = {
quizzes: "Seleziona un quiz",
- exam: "Simulazione esame (30 domande in 30min)",
+ section_quizzes: "Quiz per argomento",
+ exam: "Simulazione esame",
+ exam_simulation: "30 domande in 30min",
corrects: "Corrette",
wrongs: "Sbagliate",
percentage: "Percentuale",
diff --git a/vds-app/App/index.js b/vds-app/App/index.js
index 9208565..1de72d9 100644
--- a/vds-app/App/index.js
+++ b/vds-app/App/index.js
@@ -1,21 +1,32 @@
import { createStackNavigator, createAppContainer } from "react-navigation"
+import Splash from "./screens/Splash"
import QuizIndex from "./screens/QuizIndex"
import Quiz from "./screens/Quiz"
import Exam from "./screens/Exam"
import { colors, texts} from "./components/Variables"
const MainStack = createStackNavigator({
+ Splash: {
+ screen: Splash,
+ navigationOptions: ({ navigation }) => ({
+ header: null,
+ backgroundColor: colors.yellow,
+ headerStyle: {
+ backgroundColor: colors.yellow
+ }
+ })
+ },
QuizIndex: {
screen: QuizIndex,
- navigationOptions: {
+ navigationOptions: ({ navigation }) => ({
headerTitle: texts.quizzes,
headerTintColor: colors.white,
backgroundColor: colors.dark_blue,
headerStyle: {
- backgroundColor: colors.purple
+ backgroundColor: colors.dark_blue
}
- }
+ })
},
Quiz: {
screen: Quiz,
diff --git a/vds-app/App/screens/QuizIndex.js b/vds-app/App/screens/QuizIndex.js
index 47eb378..373f3d2 100644
--- a/vds-app/App/screens/QuizIndex.js
+++ b/vds-app/App/screens/QuizIndex.js
@@ -1,5 +1,5 @@
import React from "react"
-import { ScrollView, StatusBar } from "react-native"
+import { ScrollView, StatusBar, } from "react-native"
import testQuestions from "../data/test"
import aerodynamicsQuestions from "../data/aerodynamics"
@@ -12,82 +12,77 @@ import meteorologyQuestions from "../data/meteorology"
import physiopathologyQuestions from "../data/physiopathology"
import pilotingTechniquesQuestions from "../data/pilotingTechniques"
+import { Button, ButtonContainer } from "../components/Button"
import { RowItem } from "../components/RowItem"
import { colors, texts} from "../components/Variables"
import { examQuestions } from "../components/ExamQuestions"
export default ({ navigation }) => (
-
+
-
+
navigation.navigate("Quiz", {
title: texts.aerodynamics,
questions: aerodynamicsQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.first_aid,
questions: firstAidQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.flight_safety,
questions: flightSafetyQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.instruments,
questions: instrumentsQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.legislation,
questions: legislationQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.materials,
questions: materialsQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.meteorology,
questions: meteorologyQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.physiopathology,
questions: physiopathologyQuestions,
color: colors.blue
})}/>
-
+
navigation.navigate("Quiz", {
title: texts.piloting_techniques,
questions: pilotingTechniquesQuestions,
color: colors.blue
})}/>
-
- navigation.navigate("Exam", {
- title: texts.exam,
- questions: examQuestions,
- color: colors.blue
- })}/>
)
diff --git a/vds-app/App/screens/Splash.js b/vds-app/App/screens/Splash.js
new file mode 100644
index 0000000..b2eb034
--- /dev/null
+++ b/vds-app/App/screens/Splash.js
@@ -0,0 +1,101 @@
+import React from "react"
+import { View, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image } from "react-native"
+
+import { Button, ButtonContainer } from "../components/Button"
+import { colors, texts } from "../components/Variables"
+import { examQuestions } from "../components/ExamQuestions"
+
+const screen = Dimensions.get("window")
+const logo = require("../assets/logo.png")
+
+const styles = StyleSheet.create({
+ container: {
+ backgroundColor: colors.blue,
+ flex: 1,
+ paddingHorizontal: 20
+ },
+ title: {
+ color: colors.white,
+ fontSize: 25,
+ textAlign: "center",
+ fontWeight: "600",
+ paddingVertical: 20
+ },
+ text: {
+ color: colors.white,
+ fontSize: 20,
+ textAlign: "center",
+ fontWeight: "400",
+ paddingVertical: 20,
+ marginTop: 20,
+ },
+ safearea: {
+ flex: 1,
+ marginTop: 10,
+ justifyContent: "space-between"
+ },
+ logoContainer: {
+ marginTop: 50,
+ alignItems: "center",
+ justifyContent: "center",
+ width: "100%",
+ height: 150
+ },
+ logo: {
+ width: 150
+ }
+})
+
+class Splash extends React.Component {
+
+ state = {
+ results: false
+ }
+
+
+ render() {
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+}
+
+export default Splash
diff --git a/vds-app/assets/splash.png b/vds-app/assets/splash.png
index 3fe0cc5..7f43094 100644
Binary files a/vds-app/assets/splash.png and b/vds-app/assets/splash.png differ
diff --git a/vds-app/assets/splash.svg b/vds-app/assets/splash.svg
index 4fe6e11..cf6939d 100644
--- a/vds-app/assets/splash.svg
+++ b/vds-app/assets/splash.svg
@@ -8,92 +8,111 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- inkscape:export-ydpi="120"
- inkscape:export-xdpi="120"
- inkscape:export-filename="/docs/Dslak/vds_quiz/vds-app/assets/splash.png"
- height="2436"
- width="1242"
- inkscape:version="1.0beta1 (unknown)"
- sodipodi:docname="splash.svg"
- xml:space="preserve"
- viewBox="0 0 1242 2436"
- y="0px"
- x="0px"
+ version="1.1"
id="Ebene_1"
- version="1.1">
+ rdf:about="">
image/svg+xml
+
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+
+
+
+
+
+ inkscape:collect="always"
+ id="linearGradient862">
+ style="stop-color:#56168b;stop-opacity:1;"
+ offset="0"
+ id="stop858" />
+
+ style="stop-color:#7e20c9;stop-opacity:0"
+ offset="1"
+ id="stop860" />
+
+
+ inkscape:collect="always"
+ id="linearGradient1177">
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop1173" />
+
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop1175" />
+
+
+ inkscape:collect="always"
+ id="linearGradient1113">
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop1109" />
+
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop1111" />
+
+
+ id="SVGID_1_"
+ x="0"
+ y="0" />
+
+
+ xlink:href="#SVGID_1_"
+ x="0"
+ y="0"
+ width="100%"
+ height="100%" />
+
+
@@ -106,189 +125,259 @@
-
+ gradientTransform="translate(0,158.1)" />
+
-
+
+
+ id="linearGradient1183"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.83762215,0,0,0.92541661,-275.43157,-172.04418)"
+ x1="132.76462"
+ y1="122.54591"
+ x2="122.02882"
+ y2="19.294325" />
+
+
+
+ id="linearGradient1214"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4791905,0,0,1.4791905,27.41968,25.871548)"
+ x1="6.22612"
+ y1="-85.32769"
+ x2="77.917458"
+ y2="77.732155" />
+
+ maskUnits="userSpaceOnUse"
+ id="mask1236">
+ r="125"
+ cy="125"
+ cx="125"
+ id="circle1238"
+ style="fill:#ffffff;fill-opacity:1;stroke-width:1.02044" />
+
+
+ maskUnits="userSpaceOnUse"
+ id="mask1243">
+ r="125"
+ cy="125"
+ cx="125"
+ id="circle1245"
+ style="fill:#ffffff;fill-opacity:1;stroke-width:1.02044" />
+
+
+ id="linearGradient866"
+ gradientUnits="userSpaceOnUse"
+ x1="0"
+ y1="125"
+ x2="266.32431"
+ y2="147.05267" />
+
+
+ inkscape:document-rotation="0"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="1"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1366"
+ inkscape:window-height="719"
+ id="namedview43"
+ showgrid="false"
+ inkscape:zoom="0.24748737"
+ inkscape:cx="-279.02525"
+ inkscape:cy="556.22762"
+ inkscape:window-x="0"
+ inkscape:window-y="22"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Ebene_1"
+ inkscape:snap-global="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+
+
+ inkscape:label="root"
+ transform="translate(318.96439,1070.5177)" />
+
+ inkscape:export-ydpi="120"
+ inkscape:export-xdpi="120"
+ inkscape:export-filename="/docs/Dslak/vds_quiz/vds-app/App/assets/logo.png"
+ id="g1025"
+ transform="translate(-24.887482)">
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ QUIZ
- QUIZ
+
+ VDS
+ y="1304.1462"
+ style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:'URW Gothic L';-inkscape-font-specification:'URW Gothic L Semi-Bold';fill:#71e000;fill-opacity:1;stroke-width:3.77609">VDS
+
+
+
+
+
+
+
+
+ v1.1.0 | by Dslak
-by DSLAK