diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index d462b65..e6b977c 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -66,7 +66,6 @@ export default function TabLayout() { /> - Forum Screen - - Discussions and community posts will appear here - - + + + {/* Search Bar */} + + + + + + {/* Category Filters */} + + + Main dish + + + Dessert + + + Appetite + + + + {/* Filter Options */} + + + Rating + + + + Newest + + + + Best + + + + + {/* Post */} + + {/* User Info */} + + + + + + Mr. Chef + + + 4.2 + + + + + {/* Post Image */} + + + {/* Post Content */} + + Kajjecaw + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut at + hendrerit enim. Etiam lacinia mi nec nunc ornare, vitae tempus leo + aliquet... + + + + {/* Post Actions */} + + + + 3 + + + + 2 + + + + 2 + + + + + + + + ); } + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: "#FFFFFF", + }, + scrollView: { + flex: 1, + }, + searchContainer: { + flexDirection: "row", + alignItems: "center", + marginHorizontal: 16, + marginTop: 10, + marginBottom: 16, + paddingHorizontal: 12, + height: 40, + backgroundColor: "#FFFFFF", + borderRadius: 20, + borderWidth: 1, + borderColor: "#DDDDDD", + }, + searchInput: { + flex: 1, + marginLeft: 8, + color: "#333333", + }, + categoryContainer: { + flexDirection: "row", + justifyContent: "space-between", + marginHorizontal: 16, + marginBottom: 16, + }, + categoryButton: { + backgroundColor: "#FFCC00", + paddingVertical: 12, + paddingHorizontal: 16, + borderRadius: 12, + flex: 1, + marginHorizontal: 4, + alignItems: "center", + }, + categoryText: { + fontWeight: "bold", + color: "#333333", + }, + filterContainer: { + flexDirection: "row", + marginHorizontal: 16, + marginBottom: 16, + }, + filterButton: { + backgroundColor: "#FF0000", + paddingVertical: 8, + paddingHorizontal: 12, + borderRadius: 20, + marginRight: 8, + flexDirection: "row", + alignItems: "center", + }, + filterText: { + color: "#FFFFFF", + fontWeight: "bold", + marginRight: 4, + }, + postContainer: { + marginHorizontal: 16, + marginBottom: 16, + backgroundColor: "#FFFFFF", + borderRadius: 12, + overflow: "hidden", + borderWidth: 1, + borderColor: "#EEEEEE", + }, + userInfoContainer: { + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + paddingHorizontal: 12, + paddingVertical: 8, + }, + userInfo: { + flexDirection: "row", + alignItems: "center", + }, + userAvatar: { + width: 32, + height: 32, + borderRadius: 16, + justifyContent: "center", + alignItems: "center", + backgroundColor: "#F5F5F5", + }, + userName: { + marginLeft: 8, + fontWeight: "bold", + color: "#333333", + }, + ratingContainer: { + flexDirection: "row", + alignItems: "center", + }, + ratingText: { + marginRight: 4, + fontWeight: "bold", + color: "#333333", + }, + postImage: { + width: "100%", + height: 200, + }, + postContent: { + padding: 12, + }, + postTitle: { + fontSize: 16, + fontWeight: "bold", + marginBottom: 4, + color: "#333333", + }, + postDescription: { + color: "#666666", + fontSize: 14, + }, + postActions: { + flexDirection: "row", + borderTopWidth: 1, + borderTopColor: "#EEEEEE", + paddingVertical: 8, + paddingHorizontal: 12, + }, + actionButton: { + flexDirection: "row", + alignItems: "center", + marginRight: 16, + }, + actionText: { + marginLeft: 4, + color: "#666666", + }, +}); diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx index 22539d4..072d868 100644 --- a/app/(tabs)/index.tsx +++ b/app/(tabs)/index.tsx @@ -1,3 +1,4 @@ +import { IconSymbol } from "@/components/ui/IconSymbol"; import { Feather, FontAwesome, Ionicons } from "@expo/vector-icons"; import * as ImagePicker from "expo-image-picker"; import { router } from "expo-router"; @@ -15,56 +16,59 @@ import { } from "react-native"; // Sample recipe data -const recipeData = [ +const foodHighlights = [ { id: 1, - title: "Pad Kra Pao Moo Sab with Eggs", - image: - "/placeholder.svg?height=400&width=400&query=thai basil stir fry with egg and rice", - color: "#ffd60a", + name: "Pad Kra Pao Moo Sab with Eggs", + image: require("@/assets/images/food/padkrapao.jpg"), + description: "Thai stir-fry with ground pork and holy basil", + time: "30 Mins", + calories: "520 kcal", }, { id: 2, - title: "Chicken Curry", - image: - "/placeholder.svg?height=400&width=400&query=chicken curry with rice", - color: "#ffd60a", + name: "Jjajangmyeon", + image: require("@/assets/images/food/jjajangmyeon.jpg"), + description: "Korean black bean noodles", + time: "45 Mins", + calories: "650 kcal", }, { id: 3, - title: "Beef Steak", - image: - "/placeholder.svg?height=400&width=400&query=beef steak with vegetables", - color: "#bb0718", + name: "Ramen", + image: require("@/assets/images/food/ramen.jpg"), + description: "Japanese noodle soup", + time: "60 Mins", + calories: "480 kcal", }, { id: 4, - title: "Vegetable Pasta", - image: "/placeholder.svg?height=400&width=400&query=vegetable pasta", - color: "#ffd60a", - }, - { - id: 5, - title: "Salmon Sushi", - image: "/placeholder.svg?height=400&width=400&query=salmon sushi", - color: "#ffd60a", + name: "Beef Wellington", + image: require("@/assets/images/food/beef.jpg"), + description: "Tender beef wrapped in puff pastry", + time: "90 Mins", + calories: "750 kcal", }, ]; +const navigateToFoodDetail = (foodId: string) => { + router.push({ pathname: "/food/[id]", params: { id: foodId } }); +}; + export default function HomeScreen() { const [searchQuery, setSearchQuery] = useState(""); - const [filteredRecipes, setFilteredRecipes] = useState(recipeData); + const [filteredRecipes, setFilteredRecipes] = useState(foodHighlights); // Handle search const handleSearch = (text: string): void => { setSearchQuery(text); if (text) { - const filtered = recipeData.filter((recipe: Recipe) => - recipe.title.toLowerCase().includes(text.toLowerCase()) + const filtered = foodHighlights.filter((food) => + food.name.toLowerCase().includes(text.toLowerCase()) ); setFilteredRecipes(filtered); } else { - setFilteredRecipes(recipeData); + setFilteredRecipes(foodHighlights); } }; @@ -214,45 +218,58 @@ export default function HomeScreen() { - {/* Highlights Section */} - - - Highlights - + {/* Food Highlights Section */} + + + + Food Highlights + + - - - - {filteredRecipes.slice(0, 3).map((recipe) => ( - goToRecipeDetail(recipe)} - > - - - ))} - - - - - {filteredRecipes.slice(3, 5).map((recipe) => ( + + {foodHighlights.map((food) => ( goToRecipeDetail(recipe)} + key={food.id} + className="flex-row bg-white rounded-xl mb-3 shadow-sm overflow-hidden" + style={{ + shadowColor: "#000", + shadowOffset: { width: 0, height: 2 }, + shadowOpacity: 0.1, + shadowRadius: 4, + elevation: 2, + }} + onPress={() => navigateToFoodDetail(String(food.id))} > + + + {food.name} + + + {food.description} + + + + + + {food.time} + + + + + + {food.calories} + + + + ))} diff --git a/app/(tabs)/profile.tsx b/app/(tabs)/profile.tsx index b30f751..5074790 100644 --- a/app/(tabs)/profile.tsx +++ b/app/(tabs)/profile.tsx @@ -1,12 +1,118 @@ -import { Text, View } from "react-native"; +"use client"; + +import { Image } from "expo-image"; +import { useState } from "react"; +import { ScrollView, Text, TouchableOpacity, View } from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; export default function ProfileScreen() { + const [activeTab, setActiveTab] = useState("Repost"); + + const foodItems = [ + { + id: 1, + name: "Padthaipro", + image: require("@/assets/images/food/padthai.jpg"), + color: "#FFCC00", + }, + { + id: 2, + name: "Jjajangmyeon", + image: require("@/assets/images/food/jjajangmyeon.jpg"), + color: "#FFA500", + }, + { + id: 3, + name: "Wingztab", + image: require("@/assets/images/food/wings.jpg"), + color: "#FFCC00", + }, + { + id: 4, + name: "Ramen", + image: require("@/assets/images/food/ramen.jpg"), + color: "#FFA500", + }, + { + id: 5, + name: "Tiramisu", + image: require("@/assets/images/food/tiramisu.jpg"), + color: "#FFCC00", + }, + { + id: 6, + name: "Beef wellington", + image: require("@/assets/images/food/beef.jpg"), + color: "#FFA500", + }, + { + id: 7, + name: "Tiramisu", + image: require("@/assets/images/food/tiramisu.jpg"), + color: "#FFCC00", + }, + { + id: 8, + name: "Beef wellington", + image: require("@/assets/images/food/beef.jpg"), + color: "#FFA500", + }, + ]; + return ( - - Profile Screen - - Your profile information will appear here - - + + + {/* Profile Header */} + + + + 👨‍🍳 + + + Mr. Chef + + Edit + + + + {/* Tab Navigation */} + + {["Repost", "Likes", "Bookmark"].map((tab) => ( + setActiveTab(tab)} + > + {tab} + + ))} + + + + + {/* Food Grid */} + + {foodItems.map((item, index) => ( + + + + + {item.name} + + + + ))} + + + ); } diff --git a/app/(tabs)/recipes.tsx b/app/(tabs)/recipes.tsx index c46c7d7..66d5001 100644 --- a/app/(tabs)/recipes.tsx +++ b/app/(tabs)/recipes.tsx @@ -1,10 +1,101 @@ -import { Text, View } from "react-native"; +import { IconSymbol } from "@/components/ui/IconSymbol"; +import { Image } from "expo-image"; +import { + ScrollView, + Text, + TextInput, + TouchableOpacity, + View, +} from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; export default function RecipesScreen() { + const foodItems = [ + { + id: 1, + name: "Padthaipro", + image: require("@/assets/images/food/padthai.jpg"), + color: "#FFCC00", + }, + { + id: 2, + name: "Jjajangmyeon", + image: require("@/assets/images/food/jjajangmyeon.jpg"), + color: "#FFA500", + }, + { + id: 3, + name: "Wingztab", + image: require("@/assets/images/food/wings.jpg"), + color: "#FFCC00", + }, + { + id: 4, + name: "Ramen", + image: require("@/assets/images/food/ramen.jpg"), + color: "#FFA500", + }, + { + id: 5, + name: "Tiramisu", + image: require("@/assets/images/food/tiramisu.jpg"), + color: "#FFCC00", + }, + { + id: 6, + name: "Beef wellington", + image: require("@/assets/images/food/beef.jpg"), + color: "#FFA500", + }, + ]; + return ( - - Recipes Screen - Your recipes will appear here - + + + {/* Search Bar */} + + + + + + {/* Filter Buttons */} + + + All Recipes + + + My Recipes + + + + {/* Divider */} + + + {/* Food Grid */} + + {foodItems.map((item) => ( + + + + + {item.name} + + + + ))} + + + ); } diff --git a/assets/images/placeholder-food.jpg b/assets/images/placeholder-food.jpg index 87d0b1f..70de86e 100644 Binary files a/assets/images/placeholder-food.jpg and b/assets/images/placeholder-food.jpg differ