diff --git a/assets/images/captcha.png b/assets/images/captcha.png new file mode 100644 index 0000000..52fccfe Binary files /dev/null and b/assets/images/captcha.png differ diff --git a/assets/images/news.png b/assets/images/news.png new file mode 100644 index 0000000..66e64a8 Binary files /dev/null and b/assets/images/news.png differ diff --git a/components/header/HeaderAllPage.tsx b/components/header/HeaderAllPage.tsx index 06fe93d..896bff7 100644 --- a/components/header/HeaderAllPage.tsx +++ b/components/header/HeaderAllPage.tsx @@ -37,7 +37,7 @@ const HeaderCategory = () => { const navigation = useNavigation(); return ( - + navigation.goBack()}> diff --git a/navigation/BottomTabNavigator.tsx b/navigation/BottomTabNavigator.tsx index c064d35..994b7ac 100644 --- a/navigation/BottomTabNavigator.tsx +++ b/navigation/BottomTabNavigator.tsx @@ -14,6 +14,11 @@ import ProductDetail from '../screens/ProductDetail'; import Cart from '../screens/Cart'; import Login from '../screens/Login'; import ProductSearch from '../screens/ProductSearch'; +import Register from '../screens/Register'; +import ArticleHome from '../screens/ArticleHome'; +import ArticleList from '../screens/ArticleList'; +import ArticleDetail from '../screens/ArticleDetail'; +import AccountHome from '../screens/AccountHome'; import { HeaderHome, HeaderCategory, HeaderProductDetail, HeaderAllOtherPage } from '../components/header/HeaderAllPage' @@ -207,6 +212,30 @@ function LoginNavigation() { ); } +const RegisterStack = createStackNavigator(); + +function RegisterNavigation() { + return ( + + ( + + ), + headerStyle: { + backgroundColor: '#fff', + height: 80, + } + }} + /> + + ); +} + + const ProductSearchStack = createStackNavigator(); function ProductSearchNavigation() { @@ -230,6 +259,99 @@ function ProductSearchNavigation() { ); } +const ArticleHomeStack = createStackNavigator(); + +function ArticleHomeNavigation() { + return ( + + ( + + ), + headerStyle: { + backgroundColor: '#fff', + height: 80, + } + }} + /> + + ); +} + +const ArticleListStack = createStackNavigator(); + +function ArticleListNavigation() { + return ( + + ( + + ), + headerStyle: { + backgroundColor: '#fff', + height: 80, + } + }} + /> + + ); +} + +const ArticleDetailStack = createStackNavigator(); + +function ArticleDetailNavigation() { + return ( + + ( + + ), + headerStyle: { + backgroundColor: '#fff', + height: 80, + } + }} + /> + + ); +} + +const AccountHomeStack = createStackNavigator(); + +function AccountHomeNavigation() { + return ( + + ( + + ), + headerStyle: { + backgroundColor: '#fff', + height: 80, + } + }} + /> + + ); +} + + const AllStack = createStackNavigator(); function AllStackNavigation() { return ( @@ -269,6 +391,31 @@ function AllStackNavigation() { component={ProductSearchNavigation} options={{ headerShown: false }} /> + + + + + ); } diff --git a/screens/AccountHome.tsx b/screens/AccountHome.tsx new file mode 100644 index 0000000..9caebb6 --- /dev/null +++ b/screens/AccountHome.tsx @@ -0,0 +1,986 @@ +import 'react-native-gesture-handler'; +import * as React from 'react'; +import { useState } from 'react'; +import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, Modal, Pressable, Share } from 'react-native'; +import Constants from 'expo-constants'; +import { Ionicons, FontAwesome } from '@expo/vector-icons'; +import { LinearGradient } from 'expo-linear-gradient'; + +import EditScreenInfo from '../components/EditScreenInfo'; +import { Text, View, } from '../components/Themed'; +import useColorScheme from '../hooks/useColorScheme'; +import { TextInput } from 'react-native-gesture-handler'; +import { RadioButton, Checkbox } from 'react-native-paper'; +import { Picker } from '@react-native-picker/picker'; + +export default function AccountHome() { + return ( + + + + Trang chủ + + Tài khoản của bạn + + + + + + + + + Tài khoản + Hurasoft test + + + + + + + Bạn đang ở trang tài khoản. Vui lòng chọn XEM THÔNG TIN để xem các mục. + + + + + + + + + + + + + + + + + + + + + ) +} + +const MenuAccount = () => { + const [showMenuAccount, setShowMenuAccount] = useState(true) + return ( + + setShowMenuAccount(!showMenuAccount)}> + Xem thông tin + + + + + + Thông tin tài khoản + + + + Quản lý đơn hàng + + + + Sản phẩm đã xem + + + + Sản phẩm đã lưu + + + + Sản phẩm bạn đã đánh giá + + + + Sản phẩm bạn đã thích + + + + Thay đổi mật khẩu + + + + Logout + + + + ) +} + +const CustommerInfo = () => { + return ( + + Thông tin tài khoản + Họ tên: Hurasoft Test + Giới tính: Nữ + Email: test@mail.com + Địa chỉ: 30 Nguyên Hồng - Láng Hạ - Đống Đa - HN + Tỉnh/Thành phố: Hà Nội + Số điện thoại: 0912345678 + + Chỉnh sửa thông tin cá nhân + + + ) +} + +const CustommerInfoChange = () => { + const [selectedProvince, setSelectedProvince] = useState(); + const [checked, setChecked] = React.useState('male'); + return ( + + Cập nhật thông tin cá nhân + + + Họ tên + + + + + + Giới tính + + + + Nam + + setChecked('male')} /> + + + + Nữ + + setChecked('female')} /> + + + + + + + Địa chỉ email + + + + + + Địa chỉ nhà + + + + + + Tỉnh/TP + + + setSelectedProvince(itemValue) + } + > + + + + + + + + + Điện thoại cố định + + + + + + Điện thoại di động + + + + + + + Thay đổi + + + + + ) +} + +function formatCurrency(price: string | number) { + let priceConvert = parseFloat(`${price}`).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1.").toString(); + let len = priceConvert.length; + return priceConvert.substring(0, len - 3); +} + +const ShowProductItemSave = (props: { id: number, productName: string, productSKU: string, summary: string, productImage: { small: string, medium: string, large: string, original: string }, price: number, marketPrice: number, quantity: number, privateStyle: object }) => { + + const { id, productName, productSKU, summary, productImage, price, marketPrice, quantity, privateStyle } = props; + const discount = Math.ceil(100 - (price / marketPrice * 100)); + + + return ( + + + + + + {productSKU} + -{discount}% + + + + + + {productName} + + {summary} + {formatCurrency(price)} đ + {formatCurrency(marketPrice)} đ + + ); +} + +const productData = [ + { + id: 1, + productName: 'Máy làm mát Nagakawa NFC452 (110W) - Hàng chính hãng', + productSKU: 'TESTSKU', + productImage: { + small: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + medium: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + large: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + original: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + }, + price: 30000000, + marketPrice: 50000000, + quantity: 1, + summary: 'CPU: Intel Core i5 1035G1\nRAM: 8GB\nỔ cứng: 256GB SSD\nMàn hình: 15.6 inch FHD\nHĐH: Win 10\nMàu: Đen' + }, + { + id: 2, + productName: 'Máy làm mát Nagakawa NFC452 (110W) - Hàng chính hãng', + productSKU: 'TESTSKU', + productImage: { + small: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + medium: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + large: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + original: 'https://shop.nagakawa.com.vn/media/product/137_nfc452.jpg', + }, + price: 25000000, + marketPrice: 50000000, + quantity: 0, + summary: 'CPU: Intel Core i5 1035G1\nRAM: 8GB\nỔ cứng: 256GB SSD\nMàn hình: 15.6 inch FHD\nHĐH: Win 10\nMàu: Đen' + }, +] + +const ProductSave = () => { + const itemProductStyle = { + width: '100%', + borderBottomWidth: 1, + borderBottomColor: '#e8e8e8', + position: 'relative', + } + return ( + + Sản phẩm mua sau + + { + productData.map(item => ) + } + + + ) +} + +const ProductFavorite = () => { + const itemProductStyle = { + width: '100%', + borderBottomWidth: 1, + borderBottomColor: '#e8e8e8', + position: 'relative', + } + return ( + + Sản phẩm Bạn đã thích + + { + productData.map(item => ) + } + + + ) +} + +const ChangePassword = () => { + return ( + + Thay đổi mật khẩu + + + Mật khẩu hiện tại + + + + + + Mật khẩu mới + + + + + + Nhập lại mật khẩu mới + + + + + + + Thay đổi + + + + + ) +} + +const ListOrder = () => { + return ( + + Danh Sách đơn hàng + + + Số đơn hàng + Giá trị + Thời gian + Thông tin + + + + #123456 + + Xem chi tiết + + + 100.000.000 đ + 13-03-2021 + Đã hoàn thành + + + + #123457 + + Xem chi tiết + + + 100.000.000 đ + 13-03-2021 + Hủy bỏ + + + + ) +} + +const OrderDetail = () => { + return ( + + Đơn hàng số #123456 + Thời gian đặt mua: 13-3-2021, 5:00 pm + + Thông tin người mua + + Họ và tên: + Hurasoft Test + + + Email: + test@mail.com + + + Số điện thoại: + 0912345678 + + + Địa chỉ: + 30 Nguyên Hồng - Láng Hạ - Đống Đa - HN + + + + + + + STT + + + 1 + + + + + Ảnh + + + + + + + + + + Tên Sản phẩm + + + + Bàn Game K-Deck ( Khung Kim Loại , Mặt Gỗ Tự Nhiên Phủ PU Bóng ) + + + + + + Giá bán + + + 30.000.000 đ + + + + + Số lượng + + + 1 + + + + + Tổng + + + 30.000.000 đ + + + + + + + Giá trị + + + 30.000.000 đ + + + + + Phí vận chuyển + + + 30.000 đ + + + + + Tổng giá trị đơn hàng + + + 30.030.000 đ + + + + + + ) +} + +const winWidth = Dimensions.get('window').width; //full width +const winHeight = Dimensions.get('window').height; //full height +const winWidthP10 = winWidth - 20; +const halfWinWidth = winWidth / 2; +const ratio = winWidthP10 / 850; //541 is actual image width + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#fff', + }, + brecrumb: { + display: 'flex', + width: winWidth, + paddingLeft: 10, + paddingRight: 10, + flexDirection: 'row', + height: 18, + alignItems: 'center', + marginTop: 10, + marginBottom: 10, + }, + brecrumbText: { + fontSize: 13, + color: '#222', + }, + brecrumbTextLast: { + fontSize: 13, + color: '#b7b7b7', + }, + brecrumbIcon: { + fontSize: 13, + color: '#222', + marginLeft: 6, + marginRight: 6 + }, + accountBox: { + marginBottom: 20, + width: winWidth, + paddingHorizontal: 10, + }, + accountBoxHeader: { + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'space-between', + marginBottom: 20, + }, + accountBoxHeaderIcon: { + width: 60, + height: 60, + borderRadius: 30, + overflow: 'hidden', + backgroundColor: '#008445', + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + marginRight: 20, + }, + accountBoxHeaderIconFont: { + fontSize: 40, + color: '#fff', + lineHeight: 40, + }, + accountBoxHeaderInfo: { + width: winWidthP10 - 80, + }, + accountBoxHeaderInfoText: { + marginBottom: 10, + }, + accountBoxHeaderInfoName: { + fontSize: 16, + textTransform: 'uppercase', + fontWeight: 'bold' + }, + accountBoxSelec: { + marginBottom: 20, + }, + accountBoxSelecBox: { + borderRadius: 3, + borderWidth: 1, + borderColor: '#999', + paddingHorizontal: 10, + height: 40, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + }, + accountBoxSelecBoxText: { + textTransform: 'uppercase', + fontWeight: 'bold', + }, + accountBoxSelecBoxIcon: {}, + accountBoxSelecList: { + width: '100%', + borderRadius: 3, + borderWidth: 1, + borderColor: '#999', + display: 'none', + }, + active: { + display: 'flex', + }, + accountNameTab: { + padding: 10, + flexDirection: 'row', + alignItems: 'center', + }, + accountNameTabIcon: { + fontSize: 24, + color: '#7b7b7b', + marginRight: 8, + }, + accountNameTabText: {}, + accountBoxContent: {}, + accountBoxTextHome: {}, + custommerInfo: { + }, + custommerInfoItemHeader: { + marginBottom: 10, + fontWeight: 'bold', + }, + custommerInfoItem: { + marginBottom: 10, + }, + custommerInfoButtonText: { + color: '#ed1b24' + }, + boxCustommerInfoChange: {}, + boxCustommerInfoChangeList: { + padding: 10, + borderColor: '#e1e1e1', + borderWidth: 1, + borderRadius: 5, + }, + titleBoxInAccount: { + fontSize: 16, + fontWeight: 'bold', + marginBottom: 10, + }, + custommerInfoChangeItem: { + marginBottom: 15, + flexDirection: 'row', + alignItems: 'center' + }, + custommerInfoChangeItemText: { + width: 148, + }, + custommerInfoChangeItemContent: { + width: winWidthP10 - 170, + }, + custommerInfoChangeItemInput: { + width: '100%', + height: 36, + borderRadius: 3, + borderWidth: 1, + borderColor: '#e1e1e1', + paddingHorizontal: 10, + }, + registerItemSex: { + flexDirection: 'row', + alignItems: 'center', + }, + registerItemSexItem: { + flexDirection: 'row', + alignItems: 'center', + marginRight: 20, + }, + registerItemSexText: { + marginRight: 5, + }, + registerItemSexRadio: { + width: 36, + height: 36, + borderColor: '#333', + borderWidth: 1, + borderRadius: 18, + }, + picker: { + height: 46, + width: '100%', + }, + onePickerItem: { + height: 46, + color: '#222', + fontSize: 14, + textAlign: 'center', + width: '100%', + }, + boxCustommerInfoChangeSubmit: { + width: 150, + height: 36, + backgroundColor: 'red', + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + borderRadius: 5, + }, + boxCustommerInfoChangeSubmitText: { + color: '#fff' + }, + boxProductSave: {}, + boxProductSaveTitle: { + fontSize: 16, + fontWeight: 'bold', + marginBottom: 15, + }, + listProductSave: {}, + ListOrder: {}, + ListOrderList: { + width: '100%', + borderColor: '#e1e1e1', + borderWidth: 1, + borderRadius: 5, + padding: 5 + }, + ListOrderListHeader: { + flexDirection: 'row', + alignItems: 'center', + borderBottomColor: '#e1e1e1', + borderBottomWidth: 1, + height: 40, + }, + ListOrderListHeaderSt: { + fontWeight: 'bold', + width: winWidthP10 - 260, + fontSize: 12, + }, + ListOrderListHeaderNd: { + fontWeight: 'bold', + width: 90, + fontSize: 12, + }, + ListOrderListHeaderRd: { + fontWeight: 'bold', + width: 75, + fontSize: 12, + }, + ListOrderListHeaderInfo: { + fontWeight: 'bold', + width: 90, + fontSize: 12, + }, + ListOrderItem: { + flexDirection: 'row', + alignItems: 'center', + borderBottomColor: '#e1e1e1', + borderBottomWidth: 1, + paddingVertical: 10, + }, + ListOrderItemLast: { + borderBottomWidth: 0, + }, + ListOrderItemSt: { + width: winWidthP10 - 260, + flexDirection: 'row', + flexWrap: 'wrap', + alignItems: 'center', + }, + ListOrderItemStText: { + fontSize: 12, + marginRight: 6, + }, + ListOrderItemStButton: {}, + ListOrderItemStButtonText: { + fontSize: 12, + color: '#f78d1c' + }, + ListOrderItemNd: { + width: 90, + fontSize: 12, + }, + ListOrderItemRd: { + width: 75, + fontSize: 12, + }, + ListOrderItemInfo: { + width: 90, + fontSize: 12, + }, + boxOrderDetail: {}, + boxOrderDetailNum: { + width: '100%', + marginBottom: 15, + fontSize: 21, + fontWeight: 'bold', + textAlign: 'center' + }, + boxOrderDetailTime: { + marginBottom: 15, + }, + boxOrderDetailInfo: { + borderWidth: 1, + borderRadius: 5, + borderColor: '#e1e1e1', + marginBottom: 20, + padding: 8, + }, + boxOrderDetailInfoTitle: { + fontWeight: 'bold', + color: '#f60', + marginBottom: 10, + }, + boxOrderDetailInfoItem: { + flexDirection: 'row', + alignItems: 'center', + marginBottom: 10, + }, + boxOrderDetailInfoItemTextSt: { + width: 100, + }, + boxOrderDetailInfoItemTextNd: { + width: winWidthP10 - 120, + }, + boxOrderDetailList: { + borderWidth: 1, + borderRadius: 5, + borderColor: '#e1e1e1', + width: '100%', + flexDirection: 'column', + }, + bold: { + fontWeight: 'bold', + }, + boxOrderDetailListItem: { + width: '100%', + flexDirection: 'column', + }, + boxOrderDetailListItemLine: { + flexDirection: 'row', + borderBottomWidth: 1, + borderBottomColor: '#e1e1e1', + width: '100%', + }, + boxOrderDetailListItemLineTotal: { + width: '100%', + flexDirection: 'row', + borderBottomWidth: 1, + borderBottomColor: '#e1e1e1', + alignItems: 'center', + }, + boxOrderDetailListItemLeft: { + width: 100, + padding: 10, + }, + boxOrderDetailListItemText: {}, + boxOrderDetailListItemRight: { + width: winWidthP10 - 120, + borderLeftColor: '#e1e1e1', + borderLeftWidth: 1, + padding: 10, + }, + boxOrderDetailListItemImage: { + width: 75, + height: 75, + position: 'relative', + }, + boxOrderDetailListItemImageCt: { + width: '100%', + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0, + }, + boxOrderTotalItemLeft: { + width: '50%', + flexDirection: 'row', + justifyContent: 'flex-end', + padding: 10, + }, + boxOrderTotalItemRight: { + width: '50%', + flexDirection: 'row', + justifyContent: 'flex-start', + borderLeftColor: '#e1e1e1', + borderLeftWidth: 1, + padding: 10, + }, + boxOrderDetailTotal: { + width: '100%', + flexDirection: 'column', + }, + itemProduct: { + padding: 10, + }, + pBloxImgProduct: { + position: 'relative', + marginBottom: 10, + }, + pSkuProduct: { + position: 'absolute', + fontSize: 12, + color: '#e00', + top: 0, + left: 0, + lineHeight: 36, + zIndex: 10, + }, + pDiscountProduct: { + width: 36, + height: 36, + backgroundColor: '#e00', + position: 'absolute', + top: 0, + right: 0, + color: '#fff', + textAlign: 'center', + lineHeight: 36, + borderRadius: 18, + overflow: 'hidden', + fontSize: 12, + zIndex: 10, + }, + pBloxImgProductBao: { + position: 'relative', + paddingTop: '100%', + overflow: 'hidden', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + flexDirection: 'row', + }, + pImgProduct: { + position: 'absolute', + top: 0, + left: '5%', + right: 0, + bottom: 0, + maxHeight: 500, + width: '90%', + }, + pNameProduct: { + height: 40, + lineHeight: 20, + overflow: 'hidden', + fontSize: 14, + color: '#111', + marginBottom: 5, + }, + priceProduct: { + fontSize: 16, + fontWeight: 'bold', + color: '#f10000', + marginBottom: 5, + }, + oldPriceProduct: { + fontSize: 14, + color: '#b7b7b7', + marginBottom: 5, + height: 24, + lineHeight: 24, + overflow: 'hidden', + textDecorationLine: 'line-through', + }, + pBottonProduct: { + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', + flexDirection: 'row', + marginTop: 5, + }, + pStatusProduct: { + fontSize: 13, + color: '#00a706', + }, + pCartProduct: { + fontSize: 13, + color: '#333', + }, + pStatusProductIcon: { + fontSize: 15, + }, + pCartProductIcon: { + fontSize: 15 + }, + pProductDelete: {}, + pProductDeleteIcon: { + fontSize: 18, + }, + pSummaryProduct: { + marginBottom: 10, + lineHeight: 20, + }, +}) \ No newline at end of file diff --git a/screens/ArticleDetail.tsx b/screens/ArticleDetail.tsx new file mode 100644 index 0000000..93e16af --- /dev/null +++ b/screens/ArticleDetail.tsx @@ -0,0 +1,583 @@ +import * as React from 'react'; +import { useState } from 'react'; +import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, ImageBackground, Modal, Pressable } from 'react-native'; +import { LinearGradient } from 'expo-linear-gradient'; +import { Ionicons, FontAwesome } from '@expo/vector-icons'; +import EditScreenInfo from '../components/EditScreenInfo'; +import { Text, View } from '../components/Themed'; +import { TextInput } from 'react-native-gesture-handler'; +import { useNavigation } from '@react-navigation/native'; + +export default function Login() { + const navigation = useNavigation(); + return ( + + + + + + + + + + + + + + ); +} + +const ListArticleCategory = () => { + const navigation = useNavigation(); + return ( + + navigation.navigate('ArticleList')} style={[styles.lacItem, styles.lacItemActive]}> + Tin tức mới + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin sản phẩm + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin doanh nghiệp + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin khuyến mại + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Kinh nghiệm mẹo vặt + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Video + + + ) +} + +const ArticleDetailContent = () => { + return ( + + Cách sử dụng máy lọc không khí hiệu quả nhất + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Giống như nhiều thiết bị điện máy khác, máy lọc không khí cần được sử dụng đúng các để đạt hiệu quả tốt nhất, cũng như đảm bảo tuổi thọ lâu bền nhất. Cùng Nagakawa xem một vài hướng dẫn sử dụng máy lọc không khí đúng cách và hiệu quả nhất nhé + + + Nội dung đang được cập nhật + + + ) +} + +const ArticleBestView = () => { + return ( + + + Tin Xem nhiều + + + + 1 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 2 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 3 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 4 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 5 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 6 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 7 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 8 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + + ) +} + +const ProductArticle = () => { + return ( + + Sản phẩm nổi bật + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + ) +} + +const BoxArticleListRight = () => { + return ( + + + Tin khuyến mãi + + Xem tất cả + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Có thể nói, máy rửa bát thực sự đã mang tới một cuộc cách mạng trong căn bếp khi giúp cho người người, nhà nhà tiết kiệm được rất nhiều thời gian, công sức cũng như kinh phí hơn sau mỗi bữa ăn hàng ngày. "Nhà sạch thì mát - Bát + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + ) +} + +const winWidth = Dimensions.get('window').width; //full width +const winHeight = Dimensions.get('window').height; //full height + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + boxListArticleCategory: { + width: winWidth, + padding: 10, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + flexWrap: 'wrap', + }, + lacItem: { + width: winWidth / 2 - 15, + marginBottom: 10, + height: 34, + justifyContent: 'center', + flexDirection: 'row', + alignItems: 'center', + backgroundColor: '#e6e6e6', + borderRadius: 5, + }, + lacItemActive: { + backgroundColor: '#ec3237', + }, + lacItemText: {}, + lacItemTextActive: { + color: '#fff' + }, + boxArticleDetail: { + width: winWidth, + padding: 10, + }, + boxArticleDetailTitle: { + marginBottom: 20, + fontSize: 24, + fontWeight: '500', + }, + boxArticleDetailSummary: { + marginBottom: 20, + }, + boxArticleDetailSummaryText: { + fontWeight: 'bold', + }, + boxArticleDetailContent: {}, + nTimeView: { + flexDirection: 'row', + alignItems: 'center', + marginBottom: 10, + }, + nTimeViewCt: { + flexDirection: 'row', + alignItems: 'center', + marginRight: 20, + }, + nTimeViewIcon: { + marginRight: 5, + color: '#999', + }, + nTimeViewText: { + color: '#999' + }, + articleBestView: { + width: winWidth, + padding: 10, + }, + articleBestViewContent: { + width: '100%', + padding: 10, + backgroundColor: '#f5f5f5', + }, + articleBestViewTitle: { + marginBottom: 10, + fontSize: 18, + fontWeight: 'bold', + }, + articleBestViewList: { + backgroundColor: 'rgba(0,0,0,0)', + paddingTop: 10, + borderTopColor: '#ddd', + borderTopWidth: 1, + width: '100%', + }, + articleBestViewItem: { + marginBottom: 10, + backgroundColor: 'rgba(0,0,0,0)', + flexDirection: 'row', + alignItems: 'center', + }, + articleBestViewMun: { + width: 36, + height: 36, + borderRadius: 18, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#eee', + marginRight: 10, + }, + articleBestViewMunText: { + fontSize: 16, + fontWeight: 'bold', + color: '#999', + }, + articleBestViewName: { + width: winWidth - 90, + }, + articleBestViewMunSt: { + backgroundColor: '#f25630' + }, + articleBestViewMunNd: { + backgroundColor: '#cc7935' + }, + articleBestViewMunRd: { + backgroundColor: '#ccb135' + }, + white: { + color: '#fff', + }, + boxProductBestSaleItemStTwo: { + width: '100%', + }, + pContainerStTwo: { + flexDirection: 'row', + padding: 10, + }, + pImgContentTwo: { + width: 111, + height: 111, + marginRight: 20, + position: 'relative', + }, + pInfoStTwo: { + width: winWidth - 175, + }, + pContainer: { + width: '100%', + padding: 10, + }, + pImgContent: { + width: '100%', + position: 'relative', + paddingTop: '100%', + marginBottom: 10, + }, + pNew: { + width: 24, + height: 18, + position: 'absolute', + zIndex: 6, + top: 0, + left: 0, + }, + pImg: { + width: '100%', + position: 'absolute', + zIndex: 5, + top: 0, + left: 0, + right: 0, + bottom: 0, + }, + pTraGop: { + width: 68, + height: 16, + position: 'absolute', + zIndex: 6, + bottom: 0, + left: '50%', + transform: [{ translateX: -34 }], + }, + pInfo: { + width: '100%', + }, + pName: { + width: '100%', + fontSize: 14, + marginBottom: 10, + }, + pPrice: { + width: '100%', + fontSize: 18, + marginBottom: 10, + color: '#D8262F', + fontWeight: 'bold', + }, + pAllSale: { + width: '100%', + flexDirection: 'row', + alignItems: 'center', + marginBottom: 10, + }, + pOldPrice: { + color: '#A1A1A1', + fontSize: 14, + textDecorationLine: 'line-through', + }, + pDiscount: { + paddingVertical: 5, + backgroundColor: '#D8262F', + width: 50, + textAlign: 'center', + color: '#fff', + borderRadius: 5, + overflow: 'hidden', + marginLeft: 5, + }, + pOffer: { + flexDirection: 'row', + alignItems: 'center', + }, + pOfferText: { + fontSize: 10, + color: '#A1A1A1', + }, + pOfferPrice: { + fontSize: 10, + color: '#D8262F', + }, + boxProductArticle: { + width: winWidth, + padding: 10, + }, + boxProductArticleTitle: { + fontSize: 16, + fontWeight: 'bold', + marginBottom: 10, + }, + boxProductArticleList: { + width: '100%', + paddingTop: 10, + borderTopWidth: 1, + borderTopColor: '#ddd', + }, + boxArticleList: { + width: winWidth, + padding: 10, + }, + boxArticleListTitle: { + marginBottom: 10, + paddingBottom: 10, + borderBottomColor: '#e1e1e1', + borderBottomWidth: 1, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + }, + boxArticleListTitleName: { + fontSize: 20, + fontWeight: 'bold', + color: '#d9282f', + textTransform: 'uppercase', + }, + boxArticleListTitleVm: {}, + boxArticleListList: { + }, + nItemFirst: { + marginBottom: 20, + width: '100%', + }, + nItemFirstImg: { + width: '100%', + position: 'relative', + height: winWidth * 65 / 100, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + marginBottom: 10, + }, + nImg: { + height: '100%', + }, + nItemFirstInfo: { + width: '100%', + }, + nNameSt: { + marginBottom: 10, + fontSize: 16, + fontWeight: 'bold', + }, + nSum: {}, + nSumText: {}, + nItem: { + width: '100%', + marginBottom: 10, + flexDirection: 'row', + }, + nItemImg: { + width: 110, + position: 'relative', + height: 70, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + marginRight: 10, + }, + nItemInfo: { + width: winWidth - 140, + }, + nName: { + marginBottom: 10, + fontWeight: 'bold', + }, +}); diff --git a/screens/ArticleHome.tsx b/screens/ArticleHome.tsx new file mode 100644 index 0000000..9717f30 --- /dev/null +++ b/screens/ArticleHome.tsx @@ -0,0 +1,675 @@ +import * as React from 'react'; +import { useState } from 'react'; +import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, ImageBackground, Modal, Pressable } from 'react-native'; +import { LinearGradient } from 'expo-linear-gradient'; +import { Ionicons, FontAwesome } from '@expo/vector-icons'; +import EditScreenInfo from '../components/EditScreenInfo'; +import { Text, View } from '../components/Themed'; +import { TextInput } from 'react-native-gesture-handler'; +import { useNavigation } from '@react-navigation/native'; + +export default function ArticleHome() { + return ( + + + + + + + + + + + + + + + + + + ); +} + +const ListArticleCategory = () => { + const navigation = useNavigation(); + return ( + + navigation.navigate('ArticleList')} style={[styles.lacItem, styles.lacItemActive]}> + Tin tức mới + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin sản phẩm + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin doanh nghiệp + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin khuyến mại + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Kinh nghiệm mẹo vặt + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Video + + + ) +} + +const BoxArticleNew = () => { + return ( + + + + + + + + + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + 29-03-2021, 2:55 pm + + + + ) +} + +const BoxArticleList = () => { + return ( + + + Tin sản phẩm + + Xem tất cả + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Có thể nói, máy rửa bát thực sự đã mang tới một cuộc cách mạng trong căn bếp khi giúp cho người người, nhà nhà tiết kiệm được rất nhiều thời gian, công sức cũng như kinh phí hơn sau mỗi bữa ăn hàng ngày. "Nhà sạch thì mát - Bát + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + ) +} + +const ArticleBestView = () => { + return ( + + + Tin Xem nhiều + + + + 1 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 2 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 3 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 4 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 5 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 6 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 7 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 8 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + + ) +} + +const ProductArticle = () => { + return ( + + Sản phẩm nổi bật + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + ) +} + +const BoxArticleListRight = () => { + return ( + + + Tin khuyến mãi + + Xem tất cả + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Có thể nói, máy rửa bát thực sự đã mang tới một cuộc cách mạng trong căn bếp khi giúp cho người người, nhà nhà tiết kiệm được rất nhiều thời gian, công sức cũng như kinh phí hơn sau mỗi bữa ăn hàng ngày. "Nhà sạch thì mát - Bát + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + ) +} + +const winWidth = Dimensions.get('window').width; //full width +const winHeight = Dimensions.get('window').height; //full height + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + boxListArticleCategory: { + width: winWidth, + padding: 10, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + flexWrap: 'wrap', + }, + lacItem: { + width: winWidth / 2 - 15, + marginBottom: 10, + height: 34, + justifyContent: 'center', + flexDirection: 'row', + alignItems: 'center', + backgroundColor: '#e6e6e6', + borderRadius: 5, + }, + lacItemActive: { + backgroundColor: '#ec3237', + }, + lacItemText: {}, + lacItemTextActive: { + color: '#fff' + }, + BoxArticleNew: { + width: winWidth, + padding: 10, + }, + BoxArticleNewItem: { + width: '100%', + position: 'relative', + }, + BoxArticleNewItemImg: { + width: '100%', + position: 'relative', + height: winWidth * 65 / 100, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + }, + BoxArticleNewItemImage: { + height: '100%' + }, + BoxArticleNewItemInfo: { + width: '100%', + padding: 10, + backgroundColor: 'rgba(0,0,0,0.5)', + position: 'absolute', + bottom: 0, + left: 0, + }, + BoxArticleNewItemName: { + marginBottom: 10, + fontSize: 16, + fontWeight: 'bold', + color: '#fff', + }, + BoxArticleNewItemTime: { + color: '#999' + }, + boxArticleList: { + width: winWidth, + padding: 10, + }, + boxArticleListTitle: { + marginBottom: 10, + paddingBottom: 10, + borderBottomColor: '#e1e1e1', + borderBottomWidth: 1, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + }, + boxArticleListTitleName: { + fontSize: 20, + fontWeight: 'bold', + color: '#d9282f', + textTransform: 'uppercase', + }, + boxArticleListTitleVm: {}, + boxArticleListList: { + }, + nItemFirst: { + marginBottom: 20, + width: '100%', + }, + nItemFirstImg: { + width: '100%', + position: 'relative', + height: winWidth * 65 / 100, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + marginBottom: 10, + }, + nImg: { + height: '100%', + }, + nItemFirstInfo: { + width: '100%', + }, + nNameSt: { + marginBottom: 10, + fontSize: 16, + fontWeight: 'bold', + }, + nTimeView: { + flexDirection: 'row', + alignItems: 'center', + marginBottom: 10, + }, + nTimeViewCt: { + flexDirection: 'row', + alignItems: 'center', + marginRight: 20, + }, + nTimeViewIcon: { + marginRight: 5, + color: '#999', + }, + nTimeViewText: { + color: '#999' + }, + nSum: {}, + nSumText: {}, + nItem: { + width: '100%', + marginBottom: 10, + flexDirection: 'row', + }, + nItemImg: { + width: 110, + position: 'relative', + height: 70, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + marginRight: 10, + }, + nItemInfo: { + width: winWidth - 140, + }, + nName: { + marginBottom: 10, + fontWeight: 'bold', + }, + articleBestView: { + width: winWidth, + padding: 10, + }, + articleBestViewContent: { + width: '100%', + padding: 10, + backgroundColor: '#f5f5f5', + }, + articleBestViewTitle: { + marginBottom: 10, + fontSize: 18, + fontWeight: 'bold', + }, + articleBestViewList: { + backgroundColor: 'rgba(0,0,0,0)', + paddingTop: 10, + borderTopColor: '#ddd', + borderTopWidth: 1, + width: '100%', + }, + articleBestViewItem: { + marginBottom: 10, + backgroundColor: 'rgba(0,0,0,0)', + flexDirection: 'row', + alignItems: 'center', + }, + articleBestViewMun: { + width: 36, + height: 36, + borderRadius: 18, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#eee', + marginRight: 10, + }, + articleBestViewMunText: { + fontSize: 16, + fontWeight: 'bold', + color: '#999', + }, + articleBestViewName: { + width: winWidth - 90, + }, + articleBestViewMunSt: { + backgroundColor: '#f25630' + }, + articleBestViewMunNd: { + backgroundColor: '#cc7935' + }, + articleBestViewMunRd: { + backgroundColor: '#ccb135' + }, + white: { + color: '#fff', + }, + boxProductBestSaleItemStTwo: { + width: '100%', + }, + pContainerStTwo: { + flexDirection: 'row', + padding: 10, + }, + pImgContentTwo: { + width: 111, + height: 111, + marginRight: 20, + position: 'relative', + }, + pInfoStTwo: { + width: winWidth - 175, + }, + pContainer: { + width: '100%', + padding: 10, + }, + pImgContent: { + width: '100%', + position: 'relative', + paddingTop: '100%', + marginBottom: 10, + }, + pNew: { + width: 24, + height: 18, + position: 'absolute', + zIndex: 6, + top: 0, + left: 0, + }, + pImg: { + width: '100%', + position: 'absolute', + zIndex: 5, + top: 0, + left: 0, + right: 0, + bottom: 0, + }, + pTraGop: { + width: 68, + height: 16, + position: 'absolute', + zIndex: 6, + bottom: 0, + left: '50%', + transform: [{ translateX: -34 }], + }, + pInfo: { + width: '100%', + }, + pName: { + width: '100%', + fontSize: 14, + marginBottom: 10, + }, + pPrice: { + width: '100%', + fontSize: 18, + marginBottom: 10, + color: '#D8262F', + fontWeight: 'bold', + }, + pAllSale: { + width: '100%', + flexDirection: 'row', + alignItems: 'center', + marginBottom: 10, + }, + pOldPrice: { + color: '#A1A1A1', + fontSize: 14, + textDecorationLine: 'line-through', + }, + pDiscount: { + paddingVertical: 5, + backgroundColor: '#D8262F', + width: 50, + textAlign: 'center', + color: '#fff', + borderRadius: 5, + overflow: 'hidden', + marginLeft: 5, + }, + pOffer: { + flexDirection: 'row', + alignItems: 'center', + }, + pOfferText: { + fontSize: 10, + color: '#A1A1A1', + }, + pOfferPrice: { + fontSize: 10, + color: '#D8262F', + }, + boxProductArticle: { + width: winWidth, + padding: 10, + }, + boxProductArticleTitle: { + fontSize: 16, + fontWeight: 'bold', + marginBottom: 10, + }, + boxProductArticleList: { + width: '100%', + paddingTop: 10, + borderTopWidth: 1, + borderTopColor: '#ddd', + }, +}); diff --git a/screens/ArticleList.tsx b/screens/ArticleList.tsx new file mode 100644 index 0000000..ee79a57 --- /dev/null +++ b/screens/ArticleList.tsx @@ -0,0 +1,721 @@ +import * as React from 'react'; +import { useState } from 'react'; +import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, ImageBackground, Modal, Pressable } from 'react-native'; +import { LinearGradient } from 'expo-linear-gradient'; +import { Ionicons, FontAwesome } from '@expo/vector-icons'; +import EditScreenInfo from '../components/EditScreenInfo'; +import { Text, View } from '../components/Themed'; +import { TextInput } from 'react-native-gesture-handler'; +import { useNavigation } from '@react-navigation/native'; + +export default function ArticleList() { + return ( + + + + + + + + + + + + + + + + ); +} + +const ListArticleCategory = () => { + const navigation = useNavigation(); + return ( + + navigation.navigate('ArticleList')} style={[styles.lacItem, styles.lacItemActive]}> + Tin tức mới + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin sản phẩm + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin doanh nghiệp + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Tin khuyến mại + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Kinh nghiệm mẹo vặt + + navigation.navigate('ArticleList')} style={styles.lacItem}> + Video + + + ) +} + +const BoxArticleList = () => { + const navigation = useNavigation(); + return ( + + + + navigation.navigate('ArticleDetail')}> + + + + + + navigation.navigate('ArticleDetail')}> + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Có thể nói, máy rửa bát thực sự đã mang tới một cuộc cách mạng trong căn bếp khi giúp cho người người, nhà nhà tiết kiệm được rất nhiều thời gian, công sức cũng như kinh phí hơn sau mỗi bữa ăn hàng ngày. "Nhà sạch thì mát - Bát + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Có thể nói, máy rửa bát thực sự đã mang tới một cuộc cách mạng trong căn bếp khi giúp cho người người, nhà nhà tiết kiệm được rất nhiều thời gian, công sức cũng như kinh phí hơn sau mỗi bữa ăn hàng ngày. "Nhà sạch thì mát - Bát + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Có thể nói, máy rửa bát thực sự đã mang tới một cuộc cách mạng trong căn bếp khi giúp cho người người, nhà nhà tiết kiệm được rất nhiều thời gian, công sức cũng như kinh phí hơn sau mỗi bữa ăn hàng ngày. "Nhà sạch thì mát - Bát + + + + + + ) +} + +const Paging = () => { + return ( + + + + 1 + + + 2 + + + 3 + + + 4 + + + 5 + + + + ) +} + +const ArticleBestView = () => { + return ( + + + Tin Xem nhiều + + + + 1 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 2 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 3 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 4 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 5 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 6 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 7 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + 8 + + Chương trình khuyến mãi dành riêng cho Khách hàng VinID mua hàng tại Nagakawa Shop + + + + + ) +} + +const ProductArticle = () => { + return ( + + Sản phẩm nổi bật + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + + + + + + + Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) + 1.292.000đ + + 1.634.000đ + -30% + + + + + + + ) +} + +const BoxArticleListRight = () => { + return ( + + + Tin khuyến mãi + + Xem tất cả + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + Có thể nói, máy rửa bát thực sự đã mang tới một cuộc cách mạng trong căn bếp khi giúp cho người người, nhà nhà tiết kiệm được rất nhiều thời gian, công sức cũng như kinh phí hơn sau mỗi bữa ăn hàng ngày. "Nhà sạch thì mát - Bát + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + + + + Những đặc điểm nổi bật của Máy rửa bát Nagakawa bạn cần biết! + + + + 04-02-2021, 3:43 pm + + + + 56 + + + + + + + ) +} + +const winWidth = Dimensions.get('window').width; //full width +const winHeight = Dimensions.get('window').height; //full height + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + boxListArticleCategory: { + width: winWidth, + padding: 10, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + flexWrap: 'wrap', + }, + lacItem: { + width: winWidth / 2 - 15, + marginBottom: 10, + height: 34, + justifyContent: 'center', + flexDirection: 'row', + alignItems: 'center', + backgroundColor: '#e6e6e6', + borderRadius: 5, + }, + lacItemActive: { + backgroundColor: '#ec3237', + }, + lacItemText: {}, + lacItemTextActive: { + color: '#fff' + }, + BoxArticleNew: { + width: winWidth, + padding: 10, + }, + BoxArticleNewItem: { + width: '100%', + position: 'relative', + }, + BoxArticleNewItemImg: { + width: '100%', + position: 'relative', + height: winWidth * 65 / 100, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + }, + BoxArticleNewItemImage: { + height: '100%' + }, + BoxArticleNewItemInfo: { + width: '100%', + padding: 10, + backgroundColor: 'rgba(0,0,0,0.5)', + position: 'absolute', + bottom: 0, + left: 0, + }, + BoxArticleNewItemName: { + marginBottom: 10, + fontSize: 16, + fontWeight: 'bold', + color: '#fff', + }, + BoxArticleNewItemTime: { + color: '#999' + }, + boxArticleList: { + width: winWidth, + padding: 10, + }, + boxArticleListTitle: { + marginBottom: 10, + paddingBottom: 10, + borderBottomColor: '#e1e1e1', + borderBottomWidth: 1, + flexDirection: 'row', + justifyContent: 'space-between', + alignItems: 'center', + }, + boxArticleListTitleName: { + fontSize: 20, + fontWeight: 'bold', + color: '#d9282f', + textTransform: 'uppercase', + }, + boxArticleListTitleVm: {}, + boxArticleListList: { + }, + nItemFirst: { + marginBottom: 20, + width: '100%', + }, + nItemFirstImg: { + width: '100%', + position: 'relative', + height: winWidth * 65 / 100, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + marginBottom: 10, + }, + nImg: { + height: '100%', + }, + nItemFirstInfo: { + width: '100%', + }, + nNameSt: { + marginBottom: 10, + fontSize: 16, + fontWeight: 'bold', + }, + nTimeView: { + flexDirection: 'row', + alignItems: 'center', + marginBottom: 10, + }, + nTimeViewCt: { + flexDirection: 'row', + alignItems: 'center', + marginRight: 20, + }, + nTimeViewIcon: { + marginRight: 5, + color: '#999', + }, + nTimeViewText: { + color: '#999' + }, + nSum: {}, + nSumText: {}, + nItem: { + width: '100%', + marginBottom: 10, + flexDirection: 'row', + }, + nItemImg: { + width: 110, + position: 'relative', + height: 70, + overflow: 'hidden', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + marginRight: 10, + }, + nItemInfo: { + width: winWidth - 140, + }, + nName: { + marginBottom: 10, + fontWeight: 'bold', + }, + articleBestView: { + width: winWidth, + padding: 10, + }, + articleBestViewContent: { + width: '100%', + padding: 10, + backgroundColor: '#f5f5f5', + }, + articleBestViewTitle: { + marginBottom: 10, + fontSize: 18, + fontWeight: 'bold', + }, + articleBestViewList: { + backgroundColor: 'rgba(0,0,0,0)', + paddingTop: 10, + borderTopColor: '#ddd', + borderTopWidth: 1, + width: '100%', + }, + articleBestViewItem: { + marginBottom: 10, + backgroundColor: 'rgba(0,0,0,0)', + flexDirection: 'row', + alignItems: 'center', + }, + articleBestViewMun: { + width: 36, + height: 36, + borderRadius: 18, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#eee', + marginRight: 10, + }, + articleBestViewMunText: { + fontSize: 16, + fontWeight: 'bold', + color: '#999', + }, + articleBestViewName: { + width: winWidth - 90, + }, + articleBestViewMunSt: { + backgroundColor: '#f25630' + }, + articleBestViewMunNd: { + backgroundColor: '#cc7935' + }, + articleBestViewMunRd: { + backgroundColor: '#ccb135' + }, + white: { + color: '#fff', + }, + boxProductBestSaleItemStTwo: { + width: '100%', + }, + pContainerStTwo: { + flexDirection: 'row', + padding: 10, + }, + pImgContentTwo: { + width: 111, + height: 111, + marginRight: 20, + position: 'relative', + }, + pInfoStTwo: { + width: winWidth - 175, + }, + pContainer: { + width: '100%', + padding: 10, + }, + pImgContent: { + width: '100%', + position: 'relative', + paddingTop: '100%', + marginBottom: 10, + }, + pNew: { + width: 24, + height: 18, + position: 'absolute', + zIndex: 6, + top: 0, + left: 0, + }, + pImg: { + width: '100%', + position: 'absolute', + zIndex: 5, + top: 0, + left: 0, + right: 0, + bottom: 0, + }, + pTraGop: { + width: 68, + height: 16, + position: 'absolute', + zIndex: 6, + bottom: 0, + left: '50%', + transform: [{ translateX: -34 }], + }, + pInfo: { + width: '100%', + }, + pName: { + width: '100%', + fontSize: 14, + marginBottom: 10, + }, + pPrice: { + width: '100%', + fontSize: 18, + marginBottom: 10, + color: '#D8262F', + fontWeight: 'bold', + }, + pAllSale: { + width: '100%', + flexDirection: 'row', + alignItems: 'center', + marginBottom: 10, + }, + pOldPrice: { + color: '#A1A1A1', + fontSize: 14, + textDecorationLine: 'line-through', + }, + pDiscount: { + paddingVertical: 5, + backgroundColor: '#D8262F', + width: 50, + textAlign: 'center', + color: '#fff', + borderRadius: 5, + overflow: 'hidden', + marginLeft: 5, + }, + pOffer: { + flexDirection: 'row', + alignItems: 'center', + }, + pOfferText: { + fontSize: 10, + color: '#A1A1A1', + }, + pOfferPrice: { + fontSize: 10, + color: '#D8262F', + }, + boxProductArticle: { + width: winWidth, + padding: 10, + }, + boxProductArticleTitle: { + fontSize: 16, + fontWeight: 'bold', + marginBottom: 10, + }, + boxProductArticleList: { + width: '100%', + paddingTop: 10, + borderTopWidth: 1, + borderTopColor: '#ddd', + }, + paging: { + width: winWidth, + padding: 10, + }, + pagingContent: { + width: '100%', + height: 60, + shadowColor: "#000", + shadowOffset: { + width: 0, + height: 2, + }, + shadowOpacity: 0.25, + shadowRadius: 3.84, + elevation: 5, + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + borderRadius: 5, + }, + pagingItem: { + width: 40, + height: 40, + borderRadius: 3, + borderWidth: 1, + borderColor: '#e1e1e1', + marginHorizontal: 2, + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + }, + pagingItemActive: { + borderColor: '#d9282f', + backgroundColor: '#d9282f', + }, + pagingItemText: {}, + pagingItemTextActive: { + color: '#fff', + }, +}); diff --git a/screens/HomePage.tsx b/screens/HomePage.tsx index df21cdf..3a11093 100644 --- a/screens/HomePage.tsx +++ b/screens/HomePage.tsx @@ -1091,7 +1091,7 @@ const styles = StyleSheet.create({ height: '100%', }, productBestSaleTitleText: { - width: 200, + width: '100%', lineHeight: 40, fontSize: 22, fontWeight: 'bold', @@ -1100,8 +1100,7 @@ const styles = StyleSheet.create({ position: 'absolute', zIndex: 2, top: 0, - left: '50%', - transform: [{ translateX: -100 }], + left: 0, textAlign: 'center', fontStyle: 'italic', }, diff --git a/screens/Login.tsx b/screens/Login.tsx index 86e3340..0f875da 100644 --- a/screens/Login.tsx +++ b/screens/Login.tsx @@ -9,6 +9,7 @@ import { TextInput } from 'react-native-gesture-handler'; import { useNavigation } from '@react-navigation/native'; export default function Login() { + const navigation = useNavigation(); return ( @@ -19,7 +20,7 @@ export default function Login() { Khách hàng mới? - + navigation.navigate('Register')}> Đăng ký tại đây @@ -38,7 +39,7 @@ export default function Login() { Quên mật khẩu? - + navigation.navigate('AccountHome')}> Đăng nhập diff --git a/screens/MenuCategory.tsx b/screens/MenuCategory.tsx index 70930d4..195d081 100644 --- a/screens/MenuCategory.tsx +++ b/screens/MenuCategory.tsx @@ -188,12 +188,21 @@ const OtherMenuFix = [ name: 'Deal hot', image: require('../assets/images/icon-cat7.png'), imageActive: require('../assets/images/icon-cat7.png'), + page: '', }, { id: 'cb', name: 'Combo', image: require('../assets/images/icon-cat8.png'), imageActive: require('../assets/images/icon-cat8.png'), + page: '', + }, + { + id: 'tt', + name: 'Tin tức', + image: require('../assets/images/icon-cat8.png'), + imageActive: require('../assets/images/icon-cat8.png'), + page: 'ArticleHome', }, ] @@ -230,7 +239,7 @@ const ListMenuCat = () => { OtherMenuFix.map((item, index) => { return ( - setActiveMenuother(item.id)}> + navigation.navigate(item.page) : () => setActiveMenuother(item.id)}> { activeMenuOther == item.id ? diff --git a/screens/Register.tsx b/screens/Register.tsx new file mode 100644 index 0000000..0fdf8d2 --- /dev/null +++ b/screens/Register.tsx @@ -0,0 +1,209 @@ +import * as React from 'react'; +import { useState } from 'react'; +import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, ImageBackground, Modal, Pressable } from 'react-native'; +import { LinearGradient } from 'expo-linear-gradient'; +import { Ionicons, FontAwesome } from '@expo/vector-icons'; +import EditScreenInfo from '../components/EditScreenInfo'; +import { Text, View } from '../components/Themed'; +import { TextInput } from 'react-native-gesture-handler'; +import { useNavigation } from '@react-navigation/native'; +import { Checkbox } from 'react-native-paper'; + +export default function Register() { + const [checkedRegis, setCheckedRegis] = useState(false); + const navigation = useNavigation(); + return ( + + + + Tạo tài khoản Nagakawa + + Bạn đã có tài khoản? + navigation.navigate('Login')}> + Đăng nhập + + tại đây + + + + Số điện thoại* + + + + Email đăng ký* + + + + Địa chỉ* + + + + Mật khẩu* + + + + Nhập lại mật khẩu* + + + + Họ tên* + + + + Mã xác nhận + + + + [ Xem mã khác ] + + + + + + + setCheckedRegis(!checkedRegis)} /> + + Tôi muốn nhận các thông tin khuyến mãi từ Nagakawa + + + Đăng ký + + + Hoặc đăng nhập bằng + + + + + + + + + + + + + + + + + ); +} + +const winWidth = Dimensions.get('window').width; //full width +const winHeight = Dimensions.get('window').height; //full height + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + boxRegister: { + width: winWidth, + padding: 10, + backgroundColor: 'rgba(0,0,0,0)', + }, + boxRegisterTitle: { + marginBottom: 15, + fontSize: 18, + fontWeight: 'bold', + }, + boxRegisterNote: { + marginBottom: 10, + flexDirection: 'row', + justifyContent: 'flex-end', + alignItems: 'center', + backgroundColor: 'rgba(0,0,0,0)' + }, + green: { + color: '#008445', + }, + boxRegisterList: { + width: '100%', + padding: 10, + }, + boxRegisterItem: { + width: '100%', + marginBottom: 10, + }, + boxRegisterItemText: { + fontWeight: 'bold', + marginBottom: 5, + }, + boxRegisterItemInput: { + width: '100%', + height: 40, + borderColor: '#e1e1e1', + borderWidth: 1, + borderRadius: 5, + }, + boxRegisterCapcha: { + flexDirection: 'row', + alignItems: 'center', + }, + boxRegisterCapchaOther: {}, + checkKmRegis: { + flexDirection: 'row', + marginBottom: 10, + marginTop: 10, + }, + checkKmRegisCheck: { + width: 36, + height: 36, + borderWidth: 1, + borderColor: '#e1e1e1', + marginRight: 10, + }, + checkKmRegisText: {}, + boxLoginSubmit: { + width: '100%', + height: 40, + flexDirection: 'row', + alignItems: 'center', + justifyContent: 'center', + borderRadius: 5, + overflow: 'hidden', + backgroundColor: '#d9282f', + marginBottom: 20, + }, + boxLoginSubmitText: { + fontWeight: 'bold', + color: '#fff' + }, + boxLoginOther: { + marginBottom: 20, + flexDirection: 'row', + justifyContent: 'center', + }, + boxLoginOtherText: {}, + boxLoginSocial: { + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + }, + boxLoginSocialItem: { + width: 34, + height: 34, + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'center', + borderRadius: 5, + marginHorizontal: 5, + backgroundColor: '#3b5998', + }, + boxLoginSocialFace: {}, + boxLoginSocialGoogle: { + backgroundColor: '#df4a32', + }, + boxLoginSocialZalo: { + backgroundColor: '#0f8edd', + }, + boxLoginSocialIcon: { + fontSize: 16, + color: '#fff', + }, + boxLoginSocialImg: { + width: 16, + height: 16, + }, +});