From a422372585312427dac07e96b7656c0c1217475e Mon Sep 17 00:00:00 2001 From: jihyun-j Date: Thu, 2 Jan 2025 15:30:40 +0900 Subject: [PATCH 01/16] =?UTF-8?q?[style]=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EB=B0=8F=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/components/atoms/Button.tsx | 9 ++-- front/src/components/atoms/Divider.tsx | 8 +++- front/src/components/atoms/Message.tsx | 2 +- front/src/components/atoms/Text.tsx | 7 ++-- front/src/components/atoms/TextInput.tsx | 8 ++-- .../components/molecules/AddFriendForm.tsx | 4 +- .../components/molecules/CategorySelector.tsx | 4 +- front/src/components/molecules/FormField.tsx | 5 ++- .../components/molecules/ServerCardItem.tsx | 2 +- front/src/components/molecules/ServerInfo.tsx | 10 ++--- .../components/molecules/ThemeSelector.tsx | 4 +- .../src/components/molecules/UserProfile.tsx | 8 ++-- .../components/organisms/CreateServerForm.tsx | 2 +- front/src/components/organisms/Hero.tsx | 4 +- front/src/components/organisms/JoinForm.tsx | 12 ++++-- .../src/components/organisms/LeftSideBar.tsx | 2 +- front/src/components/organisms/LoginForm.tsx | 9 ++-- front/src/components/organisms/Modal.tsx | 4 +- front/src/components/pages/Join.tsx | 6 +-- front/src/components/pages/Login.tsx | 6 +-- .../src/components/templates/JoinTemplate.tsx | 17 +++++--- .../components/templates/LoginTemplate.tsx | 17 +++++--- front/src/index.css | 11 +++-- front/tailwind.config.js | 41 ++++++++++++------- 24 files changed, 115 insertions(+), 87 deletions(-) diff --git a/front/src/components/atoms/Button.tsx b/front/src/components/atoms/Button.tsx index cd93d370..e40571a7 100644 --- a/front/src/components/atoms/Button.tsx +++ b/front/src/components/atoms/Button.tsx @@ -4,8 +4,9 @@ type ButtonProps< children: React.ReactNode; icon?: React.ReactNode; onClick?: (e: E) => void; - color: string; + style?: string; disabled?: boolean; + type?: "button" | "submit" | "reset"; }; // TODO: 스타일 변경 @@ -13,13 +14,15 @@ const Button: React.FC = ({ children, icon, onClick, - color, + style, + type, disabled = false, }) => { return ( ) : ( diff --git a/front/src/components/molecules/CategorySelector.tsx b/front/src/components/molecules/CategorySelector.tsx index bee356f7..e307b404 100644 --- a/front/src/components/molecules/CategorySelector.tsx +++ b/front/src/components/molecules/CategorySelector.tsx @@ -19,9 +19,7 @@ const CategorySelector: React.FC = ({ return (
- - 카테고리 - + 카테고리
{categories?.map((category) => ( ) => void; message: string; + style?: string; }; const FormField: React.FC = ({ @@ -19,9 +20,10 @@ const FormField: React.FC = ({ onChange, message, name, + style, }) => { return ( -
+
= ({ label={label} placeholder={placeholder} onChange={onChange} + style={style} />
diff --git a/front/src/components/molecules/ServerCardItem.tsx b/front/src/components/molecules/ServerCardItem.tsx index adf20334..a06ba7cd 100644 --- a/front/src/components/molecules/ServerCardItem.tsx +++ b/front/src/components/molecules/ServerCardItem.tsx @@ -16,7 +16,7 @@ const ServerCardItem: React.FC = ({ - + {serverName} {categories ? ` - ${categories.map((category) => category.name).join(", ")}` diff --git a/front/src/components/molecules/ServerInfo.tsx b/front/src/components/molecules/ServerInfo.tsx index 4b6866f2..e344c83e 100644 --- a/front/src/components/molecules/ServerInfo.tsx +++ b/front/src/components/molecules/ServerInfo.tsx @@ -21,18 +21,16 @@ const ServerInfo: React.FC = ({ }) => { return (
- + {categories?.map((category) => category.name).join(", ")} - - {hostName} - + {hostName} - -
diff --git a/front/src/components/molecules/ThemeSelector.tsx b/front/src/components/molecules/ThemeSelector.tsx index 99b732c2..a71bc156 100644 --- a/front/src/components/molecules/ThemeSelector.tsx +++ b/front/src/components/molecules/ThemeSelector.tsx @@ -24,9 +24,7 @@ const ThemeSelector: React.FC = ({ }) => { return (
- - 테마 - + 테마
{themeObj.map((theme) => ( = ({
- - {nickname} - + {nickname}
@@ -40,11 +38,11 @@ const UserProfile: React.FC = ({
{isCurrentUser ? ( - ) : ( - )} diff --git a/front/src/components/organisms/CreateServerForm.tsx b/front/src/components/organisms/CreateServerForm.tsx index 0aa88099..25bfeb5d 100644 --- a/front/src/components/organisms/CreateServerForm.tsx +++ b/front/src/components/organisms/CreateServerForm.tsx @@ -77,7 +77,7 @@ const CreateServerForm: React.FC = () => { }} selectedTheme={serverFormValues.theme} /> - + ); }; diff --git a/front/src/components/organisms/Hero.tsx b/front/src/components/organisms/Hero.tsx index 6a56b553..6f7b94ea 100644 --- a/front/src/components/organisms/Hero.tsx +++ b/front/src/components/organisms/Hero.tsx @@ -5,9 +5,7 @@ import Text from "../atoms/Text"; const Hero = () => { return (
- - 새로운 테마 - + 새로운 테마
); diff --git a/front/src/components/organisms/JoinForm.tsx b/front/src/components/organisms/JoinForm.tsx index fd5f19ad..2bb570d5 100644 --- a/front/src/components/organisms/JoinForm.tsx +++ b/front/src/components/organisms/JoinForm.tsx @@ -33,13 +33,14 @@ const JoinForm = () => { } }; return ( -
+ { label="Nickname" type="text" onChange={onChangeHandler("nickname")} + style={`text-white font-bold`} message={errors.nickname} /> { label="Password" type="password" onChange={onChangeHandler("password")} + style={`text-white font-bold`} message={errors.password} /> { label="Confirm Password" type="password" onChange={onChangeHandler("passwordConfirm")} + style={`text-white font-bold`} message={errors.passwordConfirm} /> - ); diff --git a/front/src/components/organisms/LeftSideBar.tsx b/front/src/components/organisms/LeftSideBar.tsx index c83c5e48..38cea723 100644 --- a/front/src/components/organisms/LeftSideBar.tsx +++ b/front/src/components/organisms/LeftSideBar.tsx @@ -21,7 +21,7 @@ const LeftSideBar = () => { nickname={userProfile?.data.username} onAvatarClick={() => openModal("profile")} onAddServerClick={() => openModal("addServer")}> - +
diff --git a/front/src/components/organisms/LoginForm.tsx b/front/src/components/organisms/LoginForm.tsx index 3fb4b9d4..e5760a14 100644 --- a/front/src/components/organisms/LoginForm.tsx +++ b/front/src/components/organisms/LoginForm.tsx @@ -39,12 +39,13 @@ const LoginForm = () => { } }; return ( -
+ @@ -53,14 +54,14 @@ const LoginForm = () => { name="password" label="Password" type="password" + style={`text-white font-bold`} onChange={onChangeHandler("password")} message={errors.password} /> diff --git a/front/src/components/organisms/Modal.tsx b/front/src/components/organisms/Modal.tsx index 0d403a9b..d2572ed7 100644 --- a/front/src/components/organisms/Modal.tsx +++ b/front/src/components/organisms/Modal.tsx @@ -20,9 +20,7 @@ const Modal: React.FC = ({
- - {title} - + {title} { return ( -
- - 회원가입 - +
+ 회원가입
); diff --git a/front/src/components/pages/Login.tsx b/front/src/components/pages/Login.tsx index ea916abe..1e5fbeda 100644 --- a/front/src/components/pages/Login.tsx +++ b/front/src/components/pages/Login.tsx @@ -3,10 +3,8 @@ import LoginTemplate from "../templates/LoginTemplate"; const Login = () => { return ( -
- - 로그인 - +
+ 로그인
); diff --git a/front/src/components/templates/JoinTemplate.tsx b/front/src/components/templates/JoinTemplate.tsx index 02f5d553..b739982f 100644 --- a/front/src/components/templates/JoinTemplate.tsx +++ b/front/src/components/templates/JoinTemplate.tsx @@ -6,13 +6,18 @@ import Divider from "../atoms/Divider"; const JoinTemplate = () => { const navigate = useNavigate(); return ( -
+
- - 이미 계정이 있으시면 로그인을 클릭해주세요. - + + + 이미 계정이 있으시면{" "} + navigate("login")}> + 로그인 + + 을 클릭해주세요. +
); }; diff --git a/front/src/components/templates/LoginTemplate.tsx b/front/src/components/templates/LoginTemplate.tsx index 75a2645a..52e7151f 100644 --- a/front/src/components/templates/LoginTemplate.tsx +++ b/front/src/components/templates/LoginTemplate.tsx @@ -6,13 +6,18 @@ import Divider from "../atoms/Divider"; const LoginTemplate = () => { const navigate = useNavigate(); return ( -
+
- - 계정이 없으신가요? - + + + 계정이 없으신가요?{" "} + navigate("/join")}> + 회원가입 + + 을 클릭해 주세요. +
); }; diff --git a/front/src/index.css b/front/src/index.css index 376ca3b0..358c2291 100644 --- a/front/src/index.css +++ b/front/src/index.css @@ -2,11 +2,16 @@ @tailwind components; @tailwind utilities; +@font-face { + font-family: "NEXON Lv1 Gothic OTF"; + src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF.woff") + format("woff"); + font-weight: normal; + font-style: normal; +} body { margin: 0; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", - "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", - sans-serif; + font-family: "NEXON Lv1 Gothic OTF", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } diff --git a/front/tailwind.config.js b/front/tailwind.config.js index 18888918..a6c60d13 100644 --- a/front/tailwind.config.js +++ b/front/tailwind.config.js @@ -4,21 +4,32 @@ module.exports = { theme: { extend: { colors: { - dark: { - DEFAULT: "#2A2F4F", - }, - pink: { - DEFAULT: "#FDE2F3", - }, - darkPink: { - DEFAULT: "#E5BEEC", - }, - gray: { - DEFAULT: "hsla(0, 0%, 100%, .9)", - }, - darkGray: { - DEFAULT: "rgb(39 38 46/var(--tw-text-opacity))", - }, + primary: "#5d2fd6", + secondary: "#aba8ff", // hover + tertiary: "#343096", // active + quaternary: "#d5d4ff", + white: "#f7f7f7", + black: "#2f2f2f", + disabled: "#d9d9d9", + error: "#ff5a48", + confirm: "#3cf584", + }, + + fontSize: { + h1: "3.8rem", + h2: "3rem", + h3: "2.4rem", + h4: "1.9rem", + h5: "1.5rem", + h6: "1.2rem", + p: "1rem", + small: "0.8rem", + }, + + fontWeight: { + bold: 700, + regular: 400, + thin: 300, }, }, backgroundImage: { From 3ed6069a74caf712513d48d0afcf96b46183f24f Mon Sep 17 00:00:00 2001 From: jihyun-j Date: Thu, 2 Jan 2025 15:42:27 +0900 Subject: [PATCH 02/16] =?UTF-8?q?[style]=20=EB=84=A4=EB=B8=8C=EB=B0=94=20?= =?UTF-8?q?=EC=83=89=EC=83=81=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20=ED=98=B8?= =?UTF-8?q?=EB=B2=84=ED=9A=A8=EA=B3=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/components/organisms/Header.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/front/src/components/organisms/Header.tsx b/front/src/components/organisms/Header.tsx index 34dd5669..a31b14ba 100644 --- a/front/src/components/organisms/Header.tsx +++ b/front/src/components/organisms/Header.tsx @@ -6,8 +6,10 @@ import { IoPersonAddSharp } from "react-icons/io5"; import useModal from "@/hooks/common/useModal"; import Modal from "./Modal"; import AddFriendForm from "../molecules/AddFriendForm"; +import { useNavigate } from "react-router"; const Header: React.FC = () => { + const navigate = useNavigate(); const { isOpen, openModal, closeModal } = useModal(); const [activeSideBar, setActiveSideBar] = useState< "friends" | "messages" | null @@ -19,24 +21,26 @@ const Header: React.FC = () => { const handleAddFriend = () => openModal("addFriend"); return ( -