Commit 49bae6b6 authored by Lihinikaduwa D.N.R.  's avatar Lihinikaduwa D.N.R.

changed Read Category

parent 89274bdb
File deleted
import re import re
import MySQLdb # import MySQLdb
import mysql import mysql
from flask import Flask, redirect, url_for, render_template, request, jsonify, make_response from flask import Flask, redirect, url_for, render_template, request, jsonify, make_response
import random import random
...@@ -22,31 +22,31 @@ app = Flask(__name__) ...@@ -22,31 +22,31 @@ app = Flask(__name__)
def home(): def home():
return render_template('home.html') return render_template('home.html')
@app.route('/register', methods =['POST']) # @app.route('/register', methods =['POST'])
def register(): # def register():
msg = '' # msg = ''
if request.method == 'POST' and 'username' in request.form and 'password' in request.form and 'email' in request.form: # if request.method == 'POST' and 'username' in request.form and 'password' in request.form and 'email' in request.form:
username = request.form['username'] # username = request.form['username']
password = request.form['password'] # password = request.form['password']
email = request.form['email'] # email = request.form['email']
cursor = mysql.connection.cursor(MySQLdb.cursors.DictCursor) # cursor = mysql.connection.cursor(MySQLdb.cursors.DictCursor)
cursor.execute('SELECT * FROM user WHERE name = % s', (username,)) # cursor.execute('SELECT * FROM user WHERE name = % s', (username,))
account = cursor.fetchone() # account = cursor.fetchone()
if account: # if account:
msg = 'Account already exists !' # msg = 'Account already exists !'
elif not re.match(r'[^@]+@[^@]+\.[^@]+', email): # elif not re.match(r'[^@]+@[^@]+\.[^@]+', email):
msg = 'Invalid email address !' # msg = 'Invalid email address !'
elif not re.match(r'[A-Za-z0-9]+', username): # elif not re.match(r'[A-Za-z0-9]+', username):
msg = 'Username must contain only characters and numbers !' # msg = 'Username must contain only characters and numbers !'
elif not username or not password or not email: # elif not username or not password or not email:
msg = 'Please fill out the form !' # msg = 'Please fill out the form !'
else: # else:
cursor.execute('INSERT INTO accounts VALUES (NULL, % s, % s, % s)', (username, password, email,)) # cursor.execute('INSERT INTO accounts VALUES (NULL, % s, % s, % s)', (username, password, email,))
mysql.connection.commit() # mysql.connection.commit()
msg = 'You have successfully registered !' # msg = 'You have successfully registered !'
elif request.method == 'POST': # elif request.method == 'POST':
msg = 'Please fill out the form !' # msg = 'Please fill out the form !'
return msg # return msg
# Color Function Route (IT18218640) # Color Function Route (IT18218640)
...@@ -165,6 +165,6 @@ def login(): ...@@ -165,6 +165,6 @@ def login():
return make_response(body) return make_response(body)
if __name__ == "__main__": if __name__ == "__main__":
app.run(host='192.168.8.102') app.run(host='192.168.1.101')
# app.run(host='192.168.8.100,port='5000', debug=True) # app.run(host='192.168.8.102')
# app.run(debug=True) # app.run(debug=True)
\ No newline at end of file
...@@ -12,7 +12,7 @@ def create_con(): ...@@ -12,7 +12,7 @@ def create_con():
database="helply", database="helply",
host="127.0.0.1", host="127.0.0.1",
user="root", user="root",
password="rp19970520" password="12345678"
) )
return db return db
......
const ImagePaths = {
roundOne: require('../image/round1.jpeg'),
roundTwo: require('../image/round2.png'),
summery: require('../image/ReadHeaderImg4.webp'),
robot1: require('../image/robot1.png'),
robot2: require('../image/activity-2-rob.png'),
};
export default ImagePaths;
...@@ -33,7 +33,7 @@ export default function ColorActivity(props) { ...@@ -33,7 +33,7 @@ export default function ColorActivity(props) {
<View style={[{flexDirection: 'row'}]}> <View style={[{flexDirection: 'row'}]}>
<View style={styles.cardImage}> <View style={styles.cardImage}>
<Image <Image
source={require('../assets/read/backboard3.jpeg')} source={require('../assets/read/image/backboard3.jpeg')}
style={{width: 100, height: 100, borderRadius: 20}}></Image> style={{width: 100, height: 100, borderRadius: 20}}></Image>
</View> </View>
......
import React, {useEffect} from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity,
ImageBackground,
TouchableNativeFeedback,
Platform,
} from 'react-native';
const ReadCategory = props => {
const {title, image, id, color, onSelectGame, path} = props;
return (
<View style={styles.gameItem}>
<TouchableOpacity onPress={onSelectGame}>
<View>
{/* <View style={{...styles.gameItemRow, ...styles.gameItemHeader}}> */}
<ImageBackground style={styles.bgImage} source={image}>
<View style={styles.titleContainer}>
<Text style={styles.title} numberOfLines={1}>
{title}
</Text>
</View>
</ImageBackground>
{/* </View> */}
</View>
</TouchableOpacity>
</View>
);
};
const styles = StyleSheet.create({
gameItem: {
height: 300,
width: '100%',
backgroundColor: '#ccc',
marginVertical: 10,
borderRadius: 10,
overflow: 'hidden',
},
gameItemHeader: {
height: '90%',
},
gameItemRow: {
flexDirection: 'row',
backgroundColor: 'green',
},
gameItemDetails: {
height: '10%',
paddingHorizontal: 10,
justifyContent: 'space-between',
alignItems: 'center',
},
bgImage: {
height: '100%',
width: '100%',
justifyContent: 'flex-end',
},
title: {
color: 'white',
fontFamily: 'open-sans-bold',
fontSize: 20,
textAlign: 'center',
},
titleContainer: {
padding: 10,
backgroundColor: 'rgba(0,0,0,0.7)',
},
});
export default ReadCategory;
import React from 'react'; import React from 'react';
import {NavigationContainer} from '@react-navigation/native'; import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack'; import {createNativeStackNavigator} from '@react-navigation/native-stack';
import Colors from '../constants/Colors' import Colors from '../constants/Colors';
import Home from '../screen/home'; import Home from '../screen/home';
import Start from '../screen/Start'; import Start from '../screen/Start';
...@@ -11,13 +11,12 @@ import Splash from '../screen/splash/Splash'; ...@@ -11,13 +11,12 @@ import Splash from '../screen/splash/Splash';
import Color from '../screen/Color'; import Color from '../screen/Color';
import Blue from '../screen/activity/Blue'; import Blue from '../screen/activity/Blue';
import Read from '../screen/Read'; import Read from '../screen/Read';
import ReadActivity from '../screen/activity/readActivity'; import ReadActivity from '../screen/reading/ReadActivity';
import ReadActivity2 from '../screen/activity/readActivity2' import ColorResult from '../screen/result/ColorResult';
import ColorResult from '../screen/result/ColorResult';; import PrimaryType from '../screen/activity/PrimaryType';
import PrimaryType from '../screen/activity/PrimaryType' import SecondaryType from '../screen/activity/SecondaryType';
import SecondaryType from '../screen/activity/SecondaryType'
import GameList from '../screen/memory/GameList'; import GameList from '../screen/memory/GameList';
import StartGameScreen from '../screen/memory/StartGameScreen' import StartGameScreen from '../screen/memory/StartGameScreen';
import GameScreenOne from '../screen/memory/elementry/GameScreenOne'; import GameScreenOne from '../screen/memory/elementry/GameScreenOne';
import GameScreenOneAll from '../screen/memory/elementry/GameScreenOneAll'; import GameScreenOneAll from '../screen/memory/elementry/GameScreenOneAll';
import GameScreenTwo from '../screen/memory/elementry/GameScreenTwo'; import GameScreenTwo from '../screen/memory/elementry/GameScreenTwo';
...@@ -25,11 +24,11 @@ import GameScreenTwoAll from '../screen/memory/elementry/GameScreenTwoAll'; ...@@ -25,11 +24,11 @@ import GameScreenTwoAll from '../screen/memory/elementry/GameScreenTwoAll';
import GameScreenThree from '../screen/memory/elementry/GameScreenThree'; import GameScreenThree from '../screen/memory/elementry/GameScreenThree';
import GameScreenThreeAll from '../screen/memory/elementry/GameScreenThreeAll'; import GameScreenThreeAll from '../screen/memory/elementry/GameScreenThreeAll';
import GameScreenFour from '../screen/memory/elementry/GameScreenFour'; import GameScreenFour from '../screen/memory/elementry/GameScreenFour';
import GameScreenFourAll from '../screen/memory/elementry/GameScreenFourAll' import GameScreenFourAll from '../screen/memory/elementry/GameScreenFourAll';
import GameScreenFive from '../screen/memory/elementry/GameScreenFive'; import GameScreenFive from '../screen/memory/elementry/GameScreenFive';
import GameScreenFiveAll from '../screen/memory/elementry/GameScreenFiveAll' import GameScreenFiveAll from '../screen/memory/elementry/GameScreenFiveAll';
import GameScreenSix from '../screen/memory/elementry/GameScreenSix'; import GameScreenSix from '../screen/memory/elementry/GameScreenSix';
import GameScreenSixAll from '../screen/memory/elementry/GameScreenSixAll' import GameScreenSixAll from '../screen/memory/elementry/GameScreenSixAll';
import GameOverScreen from '../screen/memory/GameOverScreen'; import GameOverScreen from '../screen/memory/GameOverScreen';
const Stack = createNativeStackNavigator(); const Stack = createNativeStackNavigator();
...@@ -74,7 +73,11 @@ const AppRouter = () => { ...@@ -74,7 +73,11 @@ const AppRouter = () => {
component={Blue} component={Blue}
/> />
<Stack.Screen <Stack.Screen
options={{headerShown: false}} options={{
title: 'Read Activity',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.secondary},
}}
name="Read" name="Read"
component={Read} component={Read}
/> />
...@@ -83,11 +86,6 @@ const AppRouter = () => { ...@@ -83,11 +86,6 @@ const AppRouter = () => {
name="ReadActivity" name="ReadActivity"
component={ReadActivity} component={ReadActivity}
/> />
<Stack.Screen
options={{headerShown: false}}
name="ReadActivity2"
component={ReadActivity2}
/>
<Stack.Screen <Stack.Screen
options={{headerShown: false}} options={{headerShown: false}}
name="ColorResult" name="ColorResult"
...@@ -99,7 +97,7 @@ const AppRouter = () => { ...@@ -99,7 +97,7 @@ const AppRouter = () => {
options={{ options={{
title: 'Memory Games', title: 'Memory Games',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: { backgroundColor: Colors.primary }, headerStyle: {backgroundColor: Colors.primary},
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -109,7 +107,7 @@ const AppRouter = () => { ...@@ -109,7 +107,7 @@ const AppRouter = () => {
headerShown: true, headerShown: true,
title: 'Game Start', title: 'Game Start',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: { backgroundColor: Colors.primary }, headerStyle: {backgroundColor: Colors.primary},
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -175,12 +173,12 @@ const AppRouter = () => { ...@@ -175,12 +173,12 @@ const AppRouter = () => {
<Stack.Screen <Stack.Screen
name="GameOverScreen" name="GameOverScreen"
component={GameOverScreen} component={GameOverScreen}
options={{ options={{
headerShown: true , headerShown: true,
title: 'Game Over', title: 'Game Over',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: { backgroundColor: Colors.primary }, headerStyle: {backgroundColor: Colors.primary},
}} }}
/> />
<Stack.Screen <Stack.Screen
options={{headerShown: false}} options={{headerShown: false}}
......
...@@ -15,9 +15,12 @@ import { ...@@ -15,9 +15,12 @@ import {
Animated, Animated,
Easing, Easing,
NativeModules, NativeModules,
TouchableOpacity,
} from 'react-native'; } from 'react-native';
import ImageButton from '../component/ImageButton'; import ImageButton from '../component/ImageButton';
import ButtonView from '../component/buttonView'; import ButtonView from '../component/buttonView';
import ReadCategory from '../component/reading/ReadCategory';
import ImagePaths from '../assets/read/data/ReadData';
const webUrel = 'http://127.0.0.1:5000/reading'; const webUrel = 'http://127.0.0.1:5000/reading';
...@@ -52,35 +55,55 @@ export default function Read() { ...@@ -52,35 +55,55 @@ export default function Read() {
return ( return (
<SafeAreaView> <SafeAreaView>
<ScrollView> <ScrollView>
<View> {/* <View style={styles.screenHeader}>
<View> <ImageBackground
<ImageBackground source={require('../assets/read/image/ReadHeaderImg3.jpeg')}
source={require('../assets/read/background3.jpeg')} style={styles.image}>
style={styles.image}> <Text style={styles.title}>Read Activity</Text>
<Text style={styles.title}>Read Activity</Text> </ImageBackground>
</ImageBackground> </View> */}
</View> <TouchableOpacity style={styles.screen}>
</View> <ReadCategory
id={1}
{/* {activity.map((data, index) => { title={'First Round'}
return <ButtonView title={data.round} color="#00008B" />; image={ImagePaths.roundOne}
})} */} onSelectGame={() => {
navigation.navigate('ReadActivity');
<ButtonView }}
title="First Round" />
color="#00008B" <ReadCategory
path="ReadActivity"></ButtonView> id={1}
<ButtonView title={'Second Round'}
title="Second Round" image={ImagePaths.roundTwo}
color="#00008B" onSelectGame={() => {
path="ReadActivity2"></ButtonView> navigation.navigate('ReadActivity');
{/* <ButtonView title="Third Round" color="#00008B"></ButtonView> */} }}
/>
<ReadCategory
id={1}
title={'Result & Summery'}
image={ImagePaths.summery}
onSelectGame={() => {
navigation.navigate('ReadActivity');
}}
/>
</TouchableOpacity>
</ScrollView> </ScrollView>
</SafeAreaView> </SafeAreaView>
); );
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
screenHeader: {
height:200
},
screen: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
padding: 20,
backgroundColor: '#ffff',
},
imageContainer: { imageContainer: {
flexDirection: 'row', flexDirection: 'row',
marginTop: 70, marginTop: 70,
......
import {useNavigation} from '@react-navigation/native';
import Orientation from 'react-native-orientation-locker';
import React, {useEffect, useState} from 'react';
import {
Text,
TouchableOpacity,
StyleSheet,
View,
Dimensions,
SafeAreaView,
ImageBackground,
Button,
Image,
} from 'react-native';
export default function ReadActivity() {
const navigation = useNavigation();
React.useEffect(() => {
const unsubscribe = navigation.addListener('focus', () => {
// The screen is focused
// Call any action
Orientation.unlockAllOrientations();
Orientation.lockToLandscape();
});
return unsubscribe;
}, [navigation]);
return (
<SafeAreaView>
<View style={{flexDirection: 'column'}}>
<ImageBackground
style={styles.image}
source={require('../../assets/read/background2.jpeg')}>
<View>
<View style={styles.textBody}>
<Text style={styles.text}>Pronounce this Word!</Text>
</View>
<Image
style={styles.robo}
source={require('../../assets/read/activity-2-rob.png')}></Image>
</View>
<View>
<Image
style={styles.blackboard}
source={require('../../assets/read/reading.png')}></Image>
</View>
<View style={{flexDirection: 'row', marginLeft: 580, marginTop: -30}}>
<Button style={styles.button} title="Start" />
</View>
</ImageBackground>
</View>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
body: {
flex: 1,
},
image: {
width: '100%',
height: '100%',
},
box: {
width: 180,
height: 180,
// borderColor: "#000000",
backgroundColor: 'blue',
marginTop: -370,
marginLeft: 455,
borderRadius: 100,
},
aa: {
marginTop: -120,
},
blackboard: {
marginTop: -320,
marginLeft: 240,
width: '50%',
height: 300,
},
robo: {
marginTop: -70,
marginLeft: -5,
width: 150,
height: 200,
},
textBody: {
marginTop: 150,
marginLeft: 95,
backgroundColor: '#00008B',
width: 150,
borderRadius: 50,
padding: 5,
},
text: {
fontSize: 25,
justifyContent: 'center',
alignItems: 'center',
color: 'white',
textAlign: 'center',
fontWeight: 'bold',
},
button: {
padding: 10,
marginRight: 50,
color: '#000000',
},
});
import { useNavigation } from "@react-navigation/native"; import {useNavigation} from '@react-navigation/native';
import Orientation from 'react-native-orientation-locker'; import Orientation from 'react-native-orientation-locker';
import React, { useState } from "react"; import React, {useState} from 'react';
import { SafeAreaView, ScrollView, View, StyleSheet, ImageBackground, Text, TextInput, TouchableOpacity, Image } from "react-native"; import {
SafeAreaView,
import client from "../client/Client"; ScrollView,
View,
const isValidObjectField = (obj) => { StyleSheet,
return Object.values(obj).every(value => value.trim()); ImageBackground,
} Text,
TextInput,
TouchableOpacity,
Image,
} from 'react-native';
import client from '../client/Client';
const isValidObjectField = obj => {
return Object.values(obj).every(value => value.trim());
};
const updateError = (error, stateUpdater) => { const updateError = (error, stateUpdater) => {
stateUpdater(error); stateUpdater(error);
setTimeout( () => { setTimeout(() => {
stateUpdater('') stateUpdater('');
}, 2500); }, 2500);
} };
const isValidEmail = (value) => { const isValidEmail = value => {
const regex = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/; const regex = /^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/;
return regex.test(value); return regex.test(value);
} };
const Login = () => { const Login = () => {
const navigation = useNavigation();
const navigation = useNavigation(); React.useEffect(() => {
const unsubscribe = navigation.addListener('focus', () => {
React.useEffect(() => { Orientation.unlockAllOrientations();
const unsubscribe = navigation.addListener("focus", () => { Orientation.lockToPortrait();
Orientation.unlockAllOrientations();
Orientation.lockToPortrait();
});
return unsubscribe;
}, [navigation]);
const [userInfo, setUserInfo] = useState({
email: '',
password: '',
}); });
return unsubscribe;
}, [navigation]);
const { email, password } = userInfo; const [userInfo, setUserInfo] = useState({
email: '',
const handleOnChangeText = (value, fieldName) => { password: '',
});
setUserInfo({ ...userInfo, [fieldName]: value });
// console.log(value, fieldName);
};
const [ error, setError ] = useState(''); const {email, password} = userInfo;
const isValidForm = () => { const handleOnChangeText = (value, fieldName) => {
setUserInfo({...userInfo, [fieldName]: value});
if (!isValidObjectField(userInfo)) { // console.log(value, fieldName);
return updateError('Required all fields!', setError); };
}
if (!isValidEmail(email)){ const [error, setError] = useState('');
return updateError('Invalid email !', setError);
}
if (!password.trim() || password.length < 8){ const isValidForm = () => {
return updateError('Password is less than 8 characters !', setError); if (!isValidObjectField(userInfo)) {
} return updateError('Required all fields!', setError);
return true;
} }
const submitForm = () => { if (!isValidEmail(email)) {
if (isValidForm()){ return updateError('Invalid email !', setError);
loginFun(userInfo)
}
} }
const loginFun = () => { if (!password.trim() || password.length < 8) {
return updateError('Password is less than 8 characters !', setError);
var formData = JSON.stringify(userInfo);
client.post('login', formData, {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
})
.then((response) => {
console.log(response.data);
if(response.data.status == 404){
return updateError('Please register our system', setError);
}
if(response.data.status == 200){
return navigation.navigate("Start");
}
})
.catch((err) => {
console.log(err);
});
} }
return( return true;
<SafeAreaView> };
<ScrollView>
<View style={styles.continer}> const submitForm = () => {
<ImageBackground style={styles.backgroundImage} source={require('../../assets/login/login_background.png')} resizeMode="cover"> // if (isValidForm()){
<View>
<Image style={styles.logo} source={require('../../assets/login/logo1.png')} resizeMode="contain"></Image> loginFun(userInfo);
</View>
<View elevation={5} style={styles.main_container}> // }
<Text style={styles.main_title}>Sign In</Text> };
{error ? (<Text style={{color: 'red', fontSize: 18, textAlign: 'center'}}>{error}</Text>) : null} const loginFun = () => {
// var formData = JSON.stringify(userInfo);
<View style={styles.form_input}>
<TextInput id="email" value={email} autoCapitalize="none" onChangeText={value => handleOnChangeText(value, 'email')} style={styles.text_input} placeholder="Enter Email"></TextInput> // client.post('login', formData, {
</View> // headers: {
// Accept: 'application/json',
<View style={styles.form_input}> // 'Content-Type': 'application/json',
<TextInput id="password" value={password} autoCapitalize="none" secureTextEntry onChangeText={value => handleOnChangeText(value, 'password')} style={styles.text_input} placeholder="Enter Password"></TextInput>
</View> // },
// })
<View style={styles.form_input}> // .then((response) => {
<TouchableOpacity onPress={ submitForm } style={styles.btn}>
<Text style={styles.btn_text}> // console.log(response.data);
Sign In
</Text> // if(response.data.status == 404){
</TouchableOpacity>
</View> // return updateError('Please register our system', setError);
{/* onPress={submitForm} */}
<View style={styles.text_if}> // }
<TouchableOpacity onPress={()=> { navigation.navigate("Register")}}> // if(response.data.status == 200){
<Text style={styles.btn_text2}>
If you don't have account? Sign Up // return navigation.navigate("Start");
</Text>
</TouchableOpacity> // }
</View>
</View> // })
</ImageBackground> // .catch((err) => {
</View> // console.log(err);
</ScrollView> // });
</SafeAreaView> navigation.navigate('Start');
) };
}
return (
<SafeAreaView>
<ScrollView>
<View style={styles.continer}>
<ImageBackground
style={styles.backgroundImage}
source={require('../../assets/login/login_background.png')}
resizeMode="cover">
<View>
<Image
style={styles.logo}
source={require('../../assets/login/logo1.png')}
resizeMode="contain"></Image>
</View>
<View elevation={5} style={styles.main_container}>
<Text style={styles.main_title}>Sign In</Text>
{error ? (
<Text style={{color: 'red', fontSize: 18, textAlign: 'center'}}>
{error}
</Text>
) : null}
<View style={styles.form_input}>
<TextInput
id="email"
value={email}
autoCapitalize="none"
onChangeText={value => handleOnChangeText(value, 'email')}
style={styles.text_input}
placeholder="Enter Email"></TextInput>
</View>
<View style={styles.form_input}>
<TextInput
id="password"
value={password}
autoCapitalize="none"
secureTextEntry
onChangeText={value => handleOnChangeText(value, 'password')}
style={styles.text_input}
placeholder="Enter Password"></TextInput>
</View>
<View style={styles.form_input}>
<TouchableOpacity onPress={submitForm} style={styles.btn}>
<Text style={styles.btn_text}>Sign In</Text>
</TouchableOpacity>
</View>
{/* onPress={submitForm} */}
<View style={styles.text_if}>
<TouchableOpacity
onPress={() => {
navigation.navigate('Register');
}}>
<Text style={styles.btn_text2}>
If you don't have account? Sign Up
</Text>
</TouchableOpacity>
</View>
</View>
</ImageBackground>
</View>
</ScrollView>
</SafeAreaView>
);
};
const styles = StyleSheet.create({ const styles = StyleSheet.create({
continer: {
continer:{ flex: 1,
flex:1 },
}, backgroundImage: {
backgroundImage:{ width: '100%',
width: '100%', height: 900,
height: 900 },
}, logo: {
logo:{ marginTop: 100,
marginTop: 100, marginLeft: 50,
marginLeft: 50, width: '80%',
width: '80%', height: '40%',
height: '40%' },
}, main_container: {
main_container:{ marginTop: -170,
marginTop: -170, marginLeft: 30,
marginLeft: 30, width: 350,
width: 350, height: 450,
height: 450, backgroundColor: '#ffffff',
backgroundColor: "#ffffff", borderColor: '#000000',
borderColor: '#000000', borderRadius: 50,
borderRadius: 50, shadowColor: '#000000',
shadowColor: "#000000", shadowOpacity: 0.8,
shadowOpacity: 0.8, shadowRadius: 2,
shadowRadius: 2, shadowOffset: {
shadowOffset: { height: 1,
height: 1, width: 1,
width: 1
},
}, },
main_title:{ },
textAlign: 'center', main_title: {
fontSize: 40, textAlign: 'center',
color: '#000000' fontSize: 40,
}, color: '#000000',
form_input:{ },
marginTop: 20, form_input: {
padding: 20, marginTop: 20,
},text_input:{ padding: 20,
padding: 15, },
fontSize: 16, text_input: {
borderWidth: 1, padding: 15,
borderRadius: 50, fontSize: 16,
backgroundColor: '#EDEDED', borderWidth: 1,
color:'#000000' borderRadius: 50,
backgroundColor: '#EDEDED',
},btn:{ color: '#000000',
padding: 15, },
borderRadius: 50, btn: {
backgroundColor: '#1DCE92', padding: 15,
width: 150, borderRadius: 50,
textAlign: 'center', backgroundColor: '#1DCE92',
alignItems: 'center', width: 150,
marginLeft: 80 textAlign: 'center',
}, alignItems: 'center',
btn_text:{ marginLeft: 80,
fontSize: 20, },
fontWeight: 'bold', btn_text: {
color:'#000000', fontSize: 20,
},btn_text2:{ fontWeight: 'bold',
fontSize: 20, color: '#000000',
fontWeight: 'bold', },
color:'#000000', btn_text2: {
marginTop:-10 fontSize: 20,
}, fontWeight: 'bold',
text_if:{ color: '#000000',
fontSize: 20, marginTop: -10,
fontWeight: 'bold', },
color:'#000000', text_if: {
textAlign: 'center', fontSize: 20,
alignItems: 'center', fontWeight: 'bold',
marginTop: 10 color: '#000000',
} textAlign: 'center',
alignItems: 'center',
}) marginTop: 10,
},
export default Login; });
\ No newline at end of file
export default Login;
import axios from 'axios'; import axios from 'axios';
export default axios.create({ baseURL: 'http://192.168.8.102:5000/',timeout: 15000, }); // export default axios.create({ baseURL: 'http://192.168.8.102:5000/', timeout: 15000, });
\ No newline at end of file export default axios.create({
baseURL: 'http://192.168.1.101:5000/',
timeout: 15000,
});
...@@ -31,7 +31,7 @@ export default function Home({ navigation }){ ...@@ -31,7 +31,7 @@ export default function Home({ navigation }){
<View style={styles.imageView}> <View style={styles.imageView}>
<Image <Image
style={styles.image} style={styles.image}
source={require('../assets/read/background4.jpg')} source={require('../assets/read/image/background4.jpg')}
resizeMode="contain"></Image> resizeMode="contain"></Image>
<ImageButton path="Read" title="Read Activity" /> <ImageButton path="Read" title="Read Activity" />
</View> </View>
......
...@@ -13,7 +13,7 @@ import { ...@@ -13,7 +13,7 @@ import {
Image, Image,
} from 'react-native'; } from 'react-native';
export default function ReadActivity2() { export default function ReadActivity() {
const navigation = useNavigation(); const navigation = useNavigation();
// React.useEffect(() => { // React.useEffect(() => {
...@@ -32,12 +32,12 @@ export default function ReadActivity2() { ...@@ -32,12 +32,12 @@ export default function ReadActivity2() {
<View style={{flexDirection: 'column'}}> <View style={{flexDirection: 'column'}}>
<ImageBackground <ImageBackground
style={styles.image} style={styles.image}
source={require('../../assets/read/activity-2-backg.jpeg')}> source={require('../../assets/read/image/activity-2-backg.jpeg')}>
<View style={styles.imageContainer}> <View style={styles.imageContainer}>
<View style={styles.imageView}> <View style={styles.imageView}>
<View style={styles.robo}> <View style={styles.robo}>
<Image <Image
source={require('../../assets/read/activity-2-rob.png')}></Image> source={require('../../assets/read/image/activity-2-rob.png')}></Image>
</View> </View>
</View> </View>
<View style={styles.textBody}> <View style={styles.textBody}>
...@@ -55,12 +55,11 @@ export default function ReadActivity2() { ...@@ -55,12 +55,11 @@ export default function ReadActivity2() {
<View> <View>
<Image <Image
style={styles.blackboard} style={styles.blackboard}
source={require('../../assets/read/backboard3.png')}></Image> source={require('../../assets/read/image/backboard3.png')}></Image>
</View> </View>
<View style={{flexDirection: 'row', marginTop: 120}}>
{/* <View style={{flexDirection: 'row', marginTop: 120}}>
<Button style={styles.button} title="Start" /> <Button style={styles.button} title="Start" />
</View> */} </View>
</ImageBackground> </ImageBackground>
</View> </View>
</SafeAreaView> </SafeAreaView>
...@@ -121,10 +120,12 @@ const styles = StyleSheet.create({ ...@@ -121,10 +120,12 @@ const styles = StyleSheet.create({
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
color: '#00008B', color: '#00008B',
borderRadius:10,
backgroundColor: 'rgba(0,0,0,0.2)',
textAlign: 'center', textAlign: 'center',
fontWeight: 'bold', fontWeight: 'bold',
}, },
button: { button: {
padding: 10, padding: 10,
marginLeft: 5, marginLeft: 5,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment