Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ 마이페이지 UI 구현 #45

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/containers/ChangePass.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Sidebar from "./SideForm";
import Button from "../component/Button";
import Input from "../component/Input";
import Search from "../component/Search";
import "./styles/ChangePass.scss";
import Logo from "../image/logo_black.png";

const ChangePass = () => {
return (
Expand All @@ -10,7 +12,13 @@ const ChangePass = () => {
<Sidebar showLogout={false} />
</div>
<div className="content-wrapper">
<div className="search-area">
<Search />
</div>

<div className="password-area">
<h3>비밀번호 변경</h3>
<img className="settinglogo" src={Logo} />
<Input type="password" placeholder="비밀번호" />
<Input type="password" placeholder="비밀번호 확인" />
<Button text="비밀번호 변경하기" />
Expand Down
37 changes: 35 additions & 2 deletions src/containers/SettingForm.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import { useNavigate } from "react-router-dom";
import Sidebar from "./SideForm";
import Search from "../component/Search";
import "./styles/ChangePass.scss";
import Button from "../component/Button";
import Input from "../component/Input";
import ProfileUpload from "../component/ProfileUpload";
import "./styles/SettingForm.scss";

const SettingForm = () => {
const navigate = useNavigate();

const handleChangePassword = () => {
navigate("/setting/changepassword");
};

return (
<div className="start-container">
<div className="sidebar-area">
Expand All @@ -12,7 +22,30 @@ const SettingForm = () => {
<div className="search-area">
<Search />
</div>
<div className="setting-area"></div>
<div className="setting-area">
<div className="signup-area">
<h3>마이페이지</h3>
<ProfileUpload />
<Input
type="text"
placeholder="아이디"
disabled={true}
value="아이디: user123" // 실제 사용자 아이디로 대체
/>
<Input type="text" placeholder="이름(한글)" />
<Input type="text" placeholder="이름(영문)" />

<div className="button-group">
<button className="action-button" onClick={handleChangePassword}>
비밀번호 변경
</button>
<button className="action-button">내 게시물</button>
</div>

<Button text="정보수정하기" />
<span className="Withdrawal">회원탈퇴하기</span>
</div>
</div>
</div>
</div>
);
Expand Down
22 changes: 17 additions & 5 deletions src/containers/styles/ChangePass.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@
}

.content-wrapper {
width: 80%;
display: flex;
flex-direction: column;

h3 {
text-align: center;
margin: 20px 0; // 위아래 여백 추가
}
.settinglogo {
width: 300px;
height: 300px;
}
.password-area {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -52,10 +56,18 @@
width: 100%;
height: calc(7.15 * 100% / 8);

h3 {
margin: 15px 0; // 모바일에서는 여백 줄임
font-size: 18px; // 모바일에서 폰트 크기 조정
}

.search-area {
height: calc(100% / 8);
}

.settinglogo {
width: 150px;
height: 150px;
}
.password-area {
height: calc(7 * 100% / 7);
}
Expand Down
1 change: 1 addition & 0 deletions src/containers/styles/Community.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
max-width: 950px;
margin: 0 auto;
overflow-y: auto;
overflow-x: hidden;
@media (max-width: 767px) {
padding: 10px;
max-width: 100%;
Expand Down
99 changes: 87 additions & 12 deletions src/containers/styles/SettingForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,7 @@
display: flex;
flex-direction: column;

.search-area {
height: calc(100% / 16);
background-color: none;
padding: 10px;
display: flex;
align-items: center;
}

.setting-area {
.signup-area {
display: flex;
flex-direction: column;
justify-content: center;
Expand All @@ -40,10 +32,90 @@
height: calc(9 * 100% / 10);
background-color: #fdfcfc;
padding: 20px;
.custom-button {
width: 300px !important; // !important를 사용하여 강제 적용
height: 95px !important;
background-color: #4267b2;
color: white;
font-size: 15px;

&:hover {
background-color: #365899;
}

@media (max-width: 767px) {
width: 250px !important;
height: 40px !important;
font-size: 13px;
}
}
.button-group {
display: flex;
gap: 20px;
width: 100%;
max-width: 400px;
justify-content: center;
margin: 10px 0;

.action-button {
flex: 1;
padding: 12px 20px;
background-color: white;
color: #3d3d3d;
border: solid 1.5px;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s;

&:hover {
background-color: rgb(231, 231, 231);
}
}
}

.Withdrawal {
color: #666;
text-decoration: underline;
cursor: pointer;
font-size: 13px;
margin-top: 10px;

&:hover {
color: #333;
}
}

@media (max-width: 767px) {
gap: 10px;

.button-group {
gap: 10px;
max-width: 300px;

.action-button {
padding: 10px 15px;
font-size: 13px;
}
}

:global(.custom-button) {
width: 300px;
height: 34px;
font-size: 14px;
}

.Withdrawal {
font-size: 13px;
}
}
}

.re-login {
text-decoration: underline;
}
}

// Media query for screens smaller than 768px
@media (max-width: 767px) {
flex-direction: column;

Expand All @@ -61,8 +133,11 @@
height: calc(100% / 8);
}

.setting-area {
height: calc(7 * 100% / 8);
.signup-area {
height: calc(7 * 100% / 7);
}
.re-login {
font-size: 13px;
}
}
}
Expand Down
37 changes: 36 additions & 1 deletion src/containers/styles/SignupForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,51 @@
height: calc(9 * 100% / 10);
background-color: #fdfcfc;
padding: 20px;

.button-group {
display: flex;
gap: 20px;
width: 100%;
max-width: 400px;
justify-content: center;
margin: 10px 0;

.action-button {
flex: 1;
padding: 12px 20px;
background-color: white;
color: #3d3d3d;
border: solid 1.5px;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
transition: background-color 0.2s;

&:hover {
background-color: rgb(231, 231, 231);
}
}
}

@media (max-width: 767px) {
gap: 10px;

.button-group {
gap: 10px;

.action-button {
padding: 10px 15px;
font-size: 13px;
}
}
}
}

.re-login {
text-decoration: underline;
}
}

// Media query for screens smaller than 768px
@media (max-width: 767px) {
flex-direction: column;

Expand Down