From a4c7fbf9dd2ba6c43a94c0dd42a17a538b51c092 Mon Sep 17 00:00:00 2001 From: MinseoLee <mmmm@ajou.ac.kr> Date: Fri, 8 Dec 2023 22:09:06 +0900 Subject: [PATCH] feat: everything's max-width 768px --- public/index.html | 2 +- src/components/bottom-sheet/BottomSheet.module.css | 1 + src/components/header/Header.module.css | 3 ++- src/components/toast/Toast.module.css | 1 + src/index.css | 7 +++++++ src/pages/cart-page/CartPage.module.css | 9 +++++---- src/pages/cart-page/CartPage.tsx | 2 +- .../history-page/modules/order-box/OrderBox.module.css | 5 +++-- src/pages/login-page/LoginPage.module.css | 1 + src/pages/menu-page/modules/menu-box/MenuBox.module.css | 1 + src/pages/order-page/module/ExitButton.module.css | 1 + src/pages/signup-page/SignupPage.module.css | 3 ++- 12 files changed, 26 insertions(+), 10 deletions(-) diff --git a/public/index.html b/public/index.html index 8c89ef6..5f3b2d6 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html lang="en"> +<html lang="en" style="margin: 0 auto"> <head> <meta charset="utf-8" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> diff --git a/src/components/bottom-sheet/BottomSheet.module.css b/src/components/bottom-sheet/BottomSheet.module.css index 23e0cf5..fd9dce3 100644 --- a/src/components/bottom-sheet/BottomSheet.module.css +++ b/src/components/bottom-sheet/BottomSheet.module.css @@ -3,6 +3,7 @@ bottom: 0; z-index: 10; width: 100vw; + max-width: 768px; height: 50vh; border-top: 2px solid var(--brand-color); background-color: white; diff --git a/src/components/header/Header.module.css b/src/components/header/Header.module.css index b238f73..bcbafa7 100644 --- a/src/components/header/Header.module.css +++ b/src/components/header/Header.module.css @@ -1,6 +1,7 @@ .container { height: var(--header-height); - width: 100%; + width: 100vw; + max-width: 768px; padding: 15px; font-weight: bold; diff --git a/src/components/toast/Toast.module.css b/src/components/toast/Toast.module.css index 6c620e1..89a7a30 100644 --- a/src/components/toast/Toast.module.css +++ b/src/components/toast/Toast.module.css @@ -3,6 +3,7 @@ top: 75px; margin: 0 auto; width: 80%; + max-width: calc(768px * 0.8); left: 50%; transform: translate(-50%, -50%); z-index: 10; diff --git a/src/index.css b/src/index.css index d808029..07f2b04 100644 --- a/src/index.css +++ b/src/index.css @@ -11,11 +11,18 @@ body { -moz-osx-font-smoothing: grayscale; } +#root { + max-width: 768px; +} + html { height: 100vh; width: 100vw; + max-width: 768px; + margin: 0 auto; } + a { text-decoration: none; color: black; diff --git a/src/pages/cart-page/CartPage.module.css b/src/pages/cart-page/CartPage.module.css index d38a723..a259932 100644 --- a/src/pages/cart-page/CartPage.module.css +++ b/src/pages/cart-page/CartPage.module.css @@ -36,8 +36,9 @@ } .item-remove { - position: absolute; + position: relative; right: 20px; + font-size: 36px; float: right; cursor: pointer; } @@ -50,11 +51,10 @@ } .item-text { - width: calc(100% - 88px); - display: flex; flex-direction: column; justify-content: space-between; + width: 100%; } .item-name { @@ -71,10 +71,11 @@ .nav { position: fixed; bottom: 0; - width: 100%; height: 56px; background-color: white; padding: 8px; + max-width: calc(768px - 8px); + width: 100%; } .nav-btn { diff --git a/src/pages/cart-page/CartPage.tsx b/src/pages/cart-page/CartPage.tsx index fb5cfcd..5e925b8 100644 --- a/src/pages/cart-page/CartPage.tsx +++ b/src/pages/cart-page/CartPage.tsx @@ -85,7 +85,6 @@ const CartPage: GFC = ({ connector }) => { cartItem?.menus.map((d, i) => { return ( <div className={S['item']} key={`item-${i}`}> - <div onClick={() => handleRemoveItem(i)} className={S['item-remove']}>x</div> <img className={S['item-image']} src={d.image} alt={`item-${d.name}`} /> @@ -94,6 +93,7 @@ const CartPage: GFC = ({ connector }) => { <span className={S['item-price']}>{moneyFormatter(d.price * quantities[i])}</span> <QuantityController quantity={quantities[i]} setQuantity={setQuantities} index={i} /> </div> + <div onClick={() => handleRemoveItem(i)} className={S['item-remove']}>x</div> </div> ); }) diff --git a/src/pages/history-page/modules/order-box/OrderBox.module.css b/src/pages/history-page/modules/order-box/OrderBox.module.css index 5678c4f..9f721ec 100644 --- a/src/pages/history-page/modules/order-box/OrderBox.module.css +++ b/src/pages/history-page/modules/order-box/OrderBox.module.css @@ -24,12 +24,13 @@ } .price { - position: absolute; + position: relative; float: right; right: 16px; + bottom: 16px; font-size: 20px; } .pickup { display: block; -} \ No newline at end of file +} diff --git a/src/pages/login-page/LoginPage.module.css b/src/pages/login-page/LoginPage.module.css index e607ceb..632667c 100644 --- a/src/pages/login-page/LoginPage.module.css +++ b/src/pages/login-page/LoginPage.module.css @@ -1,5 +1,6 @@ .container { width: 100vw; + max-width: 768px; height: 100vh; margin-top: calc(-1*var(--header-height)); diff --git a/src/pages/menu-page/modules/menu-box/MenuBox.module.css b/src/pages/menu-page/modules/menu-box/MenuBox.module.css index e61de3c..f0a858f 100644 --- a/src/pages/menu-page/modules/menu-box/MenuBox.module.css +++ b/src/pages/menu-page/modules/menu-box/MenuBox.module.css @@ -59,6 +59,7 @@ bottom: 0; padding-bottom: 24px; width: calc(100% - 48px); + max-width: calc(768px - 48px); } .bs-bottom button { diff --git a/src/pages/order-page/module/ExitButton.module.css b/src/pages/order-page/module/ExitButton.module.css index 798dac9..399bc46 100644 --- a/src/pages/order-page/module/ExitButton.module.css +++ b/src/pages/order-page/module/ExitButton.module.css @@ -1,5 +1,6 @@ .container { width: 100vw; + max-width: 768px; height: 100vh; margin-top: calc(-1*var(--header-height)); diff --git a/src/pages/signup-page/SignupPage.module.css b/src/pages/signup-page/SignupPage.module.css index 1223b48..1958a7b 100644 --- a/src/pages/signup-page/SignupPage.module.css +++ b/src/pages/signup-page/SignupPage.module.css @@ -1,5 +1,6 @@ .container { width: 100vw; + max-width: 768px; height: 100vh; margin-top: -48px; @@ -42,4 +43,4 @@ } .password-unsame { color: red; -} \ No newline at end of file +} -- GitLab