diff --git a/app/_layout.tsx b/app/_layout.tsx index 0a4c50a..b4e5c09 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -5,6 +5,7 @@ export default function RootLayout() { + ); -} +} \ No newline at end of file diff --git a/app/styles.ts b/app/styles.ts index 0d104c6..ba24882 100644 --- a/app/styles.ts +++ b/app/styles.ts @@ -53,6 +53,22 @@ export const styles = StyleSheet.create({ textShadowRadius: 3, fontFamily: "Minecraft", }, + backButton: { + alignSelf: "flex-start", + marginTop: 0, + marginBottom: 20, + paddingVertical: 8, + paddingHorizontal: 15, + backgroundColor: "rgba(106, 90, 205, 0.7)", + borderRadius: 8, + marginLeft: 0, + }, + backButtonText: { + color: "#fff", + fontSize: 16, + fontWeight: "bold", + fontFamily: "Minecraft", + }, // --- Nether Portal Calculator --- converterScreenRoot: { @@ -156,20 +172,81 @@ export const styles = StyleSheet.create({ fontWeight: "bold", fontFamily: "Minecraft", }, - backButton: { - alignSelf: "flex-start", - marginTop: 0, + + // --- Todo List --- + todoInputContainer: { + flexDirection: "row", + width: "90%", + backgroundColor: "rgba(255,255,255,0.8)", + borderRadius: 10, + padding: 5, marginBottom: 20, - paddingVertical: 8, - paddingHorizontal: 15, - backgroundColor: "rgba(106, 90, 205, 0.7)", - borderRadius: 8, - marginLeft: 0, + alignItems: "center", }, - backButtonText: { + todoInputField: { + flex: 1, + paddingVertical: 10, + paddingHorizontal: 15, + fontSize: 16, + color: "#333", + fontFamily: "Minecraft", + }, + addTodoButton: { + backgroundColor: "#4CAF50", + paddingVertical: 10, + paddingHorizontal: 20, + borderRadius: 8, + marginLeft: 10, + }, + addTodoButtonText: { color: "#fff", fontSize: 16, fontWeight: "bold", + }, + todoListContainer: { + width: "90%", + }, + todoItem: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + backgroundColor: "rgba(255,255,255,0.9)", + borderRadius: 8, + paddingVertical: 12, + paddingHorizontal: 15, + marginBottom: 10, + shadowColor: "#000", + shadowOffset: { width: 0, height: 2 }, + shadowOpacity: 0.1, + shadowRadius: 3, + elevation: 3, + }, + todoText: { + flex: 1, + fontSize: 18, + color: "#333", + }, + removeTodoButton: { + backgroundColor: "#FF6347", + paddingVertical: 5, + paddingHorizontal: 10, + borderRadius: 5, + marginLeft: 15, + }, + removeTodoButtonText: { + color: "#fff", + fontWeight: "bold", + fontSize: 16, + }, + placeholderText: { + color: "#fff", + textAlign: "center", + marginTop: 20, + fontSize: 18, + fontStyle: "italic", + textShadowColor: "rgba(0, 0, 0, 0.75)", + textShadowOffset: { width: -1, height: 1 }, + textShadowRadius: 5, fontFamily: "Minecraft", }, }); \ No newline at end of file diff --git a/app/todo.tsx b/app/todo.tsx new file mode 100644 index 0000000..e0a8eae --- /dev/null +++ b/app/todo.tsx @@ -0,0 +1,101 @@ +import { useRouter } from "expo-router"; +import { useState } from "react"; +import { + ImageBackground, + KeyboardAvoidingView, + Platform, + ScrollView, + Text, + TextInput, + TouchableOpacity, + View +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { styles } from "./styles"; + +const converterBgImage = require("../assets/images/todo.png"); + +export default function CoordinateConverter() { + const router = useRouter(); + const [todos, setTodos] = useState([]); + const [newTodo, setNewTodo] = useState(""); + + const addTodo = () => { + if (newTodo.trim().length > 0) { + setTodos([...todos, newTodo.trim()]); + setNewTodo(""); + } + }; + + const removeTodo = (index: number) => { + const updatedTodos = todos.filter((_, i) => i !== index); + setTodos(updatedTodos); + }; + + return ( + + + + + + + + + {/* Custom Back Button */} + router.back()} + style={styles.backButton} + > + ← Go Back + + + Todo List + + {/* Todo Input Section */} + + + + Add + + + + {/* Todo List Display */} + + {todos.length === 0 ? ( + + Your todo list is empty. Add some tasks! + + ) : ( + todos.map((todo, index) => ( + + {todo} + removeTodo(index)} + style={styles.removeTodoButton} + > + X + + + )) + )} + + + + + + ); +} \ No newline at end of file diff --git a/assets/images/todo.png b/assets/images/todo.png new file mode 100644 index 0000000..d81ec33 Binary files /dev/null and b/assets/images/todo.png differ