Skip to content

Commit

Permalink
Merge pull request #97 from LikeLionHGU/mang_#17/profile
Browse files Browse the repository at this point in the history
๐ŸŽจ Profile page ํ•˜๋‹ค๊ฐ€ ๋ง์Œ
  • Loading branch information
hwan129 authored Aug 3, 2024
2 parents e113f9c + b8af94d commit e80f208
Show file tree
Hide file tree
Showing 15 changed files with 213 additions and 20 deletions.
3 changes: 3 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Board from "./pages/Board";
import Setting from "./pages/project/manager/Setting";
import Galpi from "./pages/project/manager/Galpi";
import Approval from "./pages/project/manager/Approval";
import Profile from "./pages/Profile";

import { RecoilRoot } from "recoil";
import BoardDetail from "./pages/BoardDetail";

Expand All @@ -30,6 +32,7 @@ function App() {
<Route path="/mypage/manage" element={<Setting />} />
<Route path="/approval" element={<Approval />} />
<Route path="/boardDetail/" element={<BoardDetail/>} />
<Route path="/profile" element={<Profile/>}/>
</Routes>
</BrowserRouter>
</RecoilRoot>
Expand Down
8 changes: 7 additions & 1 deletion src/components/Slide.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@ export default function Slide({ mode, data }) {
return (
<div
className="slide-container"
style={mode === 1 ? { height: "345px" } : { height: "380px" }}
style={
mode === 1
? { height: "345px" }
: mode === 2
? { height: "380px", backgroundColor: 'rgba(0, 0, 0, 0)', zIndex : 10} // 100% ํˆฌ๋ช…๋„
: { height: "380px" }
}
>
{mode === 1 ? (
// <div className="arrow"></div>
Expand Down
21 changes: 10 additions & 11 deletions src/pages/Mypage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,20 @@ export default function Mypage() {
<img className="wall-pape-cover" src={wallpaper} alt="img" />
<div className="overlay-content">
<h1>๋‚˜์˜ ํ”„๋กœํ•„</h1>
<div className="profile-section">
<img className="profile-cover" src={profile} alt="img" />
<div className="my-page-profile-section">
<img className="my-page-profile-cover" src={profile} alt="img" />
</div>
</div>
</div>

<div className="profile-details">
<div className="profile-details-exp">
<div className="profile-details-edit">
<div className="my-page-profile-details">
<div className="my-page-profile-details-exp">
<div className="my-page-profile-details-edit">
<div>{userInfo.name}</div>
<button>
<div>
<img
className="profile-edit"
className="my-page-profile-edit"
src={EditImg}
alt="profile/edit"
onClick={() => {
Expand All @@ -103,16 +103,16 @@ export default function Mypage() {
<div>์ด๋ฉ”์ผ</div>
<div>{userInfo.email}</div>
</div>
<div className="profile-details-count">
<div className="books-progress-count">
<div className="my-page-profile-details-count">
<div className="my-page-books-progress-count">
<div>์ง„ํ–‰ ์ค‘์ธ ์ฑ…</div>
<div>{userInfo.progressProjects}๊ถŒ</div>
</div>
<div className="books-completed-count">
<div className="my-page-books-completed-count">
<div>์™„๊ฒฐ๋œ ์ฑ…</div>
<div>{userInfo.finishedProjects}๊ถŒ</div>
</div>
<div className="books-subscribe-count">
<div className="my-page-books-subscribe-count">
<div>๊ตฌ๋…์ž</div>
<div>{userInfo.subscribeUserCounts}๋ช…</div>
</div>
Expand All @@ -122,7 +122,6 @@ export default function Mypage() {
<div className="my-book-lists">
<div className="books-progress">
<h3>์ง„ํ–‰ ์ค‘์ธ ์ฑ…</h3>

<Slide mode={2} data={userInfo.progressProjectList || []} />
</div>
<div className="books-completed">
Expand Down
90 changes: 88 additions & 2 deletions src/pages/Profile.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,91 @@
// ์ƒ๋Œ€๋ฐฉ ํ”„๋กœํ•„ ๋ณด์ด๋Š” ํŽ˜์ด์ง€
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";

import EditImg from "../imgs/edit.svg";
import ImgNone from "../imgs/img_none.svg";
import Header from "../components/Header";
import Slide from "../components/Slide";
import axios from "axios";

import "../styles/profile.scss";

export default function Profile() {
return <>Hi</>;
}
const navigate = useNavigate();
const [wallpaper, setWallPaper] = useState(`${ImgNone}`);
const [profile, setProFile] = useState(`${ImgNone}`);
const [userInfo, setUserInfo] = useState([]);
const [isSubscribed, setIsSubscribed] = useState(false);

const handleSubscribe = () => {
setIsSubscribed(!isSubscribed);
};

return(
<div className="profile-page">
<Header mode={2} />
<div className="profile-container">
<div className="profile-wall-paper-section">
<img className="profile-wall-pape-cover" src={wallpaper} alt="img" />

<div className="profile-img-section">
<img className="profile-img-cover" src={profile} alt="img" />
</div>
</div>


<div className="profile-details">
<div className="profile-details-exp">
<div className="profile-details-edit">
<div>{userInfo.name}</div>
</div>
<div>{userInfo.userOneliner}</div>
<div>์ด๋ฉ”์ผ</div>
<div>{userInfo.email}</div>
</div>
<div className="profile-details-count">
<div className="books-progress-count">
<div>์ง„ํ–‰ ์ค‘์ธ ์ฑ…</div>
<div>{userInfo.progressProjects}๊ถŒ</div>
</div>
<div className="books-completed-count">
<div>์™„๊ฒฐ๋œ ์ฑ…</div>
<div>{userInfo.finishedProjects}๊ถŒ</div>
</div>
<div className="books-subscribe-count">
<div>๊ตฌ๋…์ž</div>
<div>{userInfo.subscribeUserCounts}๋ช…</div>
</div>
</div>

<div>
<button onClick={handleSubscribe}>
{isSubscribed ? '๊ตฌ๋…์ค‘' : '๊ตฌ๋…ํ•˜๊ธฐ'}
</button>
</div>

</div>

<div className="profile-book-lists">
<div className="profile-book-projects">
<div>
ํ”„๋กœ์ ํŠธ
</div>
<Slide mode={2} data={userInfo.progressProjectList || []} />
</div>
</div>
</div>

</div>








)

}

5 changes: 5 additions & 0 deletions src/pages/project/Detail.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Header from "../../components/Header";
import PeopleSlide from "../../components/PeopleSlide";

import TestImg from "../../imgs/test5.png";
import LikeImg from "../../imgs/like.svg";
Expand Down Expand Up @@ -325,6 +326,10 @@ export default function Detail() {
</div>
</div>
</div>
<div id="about-the-writer">
<div className="detail-title">์ž‘๊ฐ€ ์†Œ๊ฐœ</div>
{/* <PeopleSlide/> */}
</div>
<div id="detail-bookinfo">
<div className="detail-title">์ฑ… ์†Œ๊ฐœ</div>
<div id="detail-contents">{project.information}</div>
Expand Down
8 changes: 8 additions & 0 deletions src/styles/detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
flex-direction: column;
align-items: center;

margin-bottom: 80px;

/* padding: 0 9.17vw; */

}
Expand Down Expand Up @@ -48,6 +50,7 @@

#detail-img-cover {
position: relative;
object-fit: cover;
z-index: 1;
width: 11.11vw;
height: 220px;
Expand Down Expand Up @@ -130,6 +133,11 @@
cursor: pointer;
}

#about-the-writer{
width: 100%;
margin-top: 80px;
}

#detail-bookinfo {
width: 100%;
margin-top: 80px;
Expand Down
9 changes: 6 additions & 3 deletions src/styles/mypage.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

.wall-paper-section {
width: 100%;
height: 400px;
height: 362px;
overflow: hidden;
padding: 0 !important;
margin-bottom: 100px;
Expand All @@ -28,7 +28,6 @@
position: absolute;
top: 70%;
text-align: center;

z-index: 10;
color: var(--black);
padding: 0 9.17vw;
Expand Down Expand Up @@ -67,6 +66,10 @@
text-align: left;
}

.profile-details-exp div {
margin-bottom: 10px;
}

.profile-details-edit {
width: 40vw;
display: flex;
Expand Down Expand Up @@ -108,4 +111,4 @@

.my-book-lists {
width: 100%;
}
}/*# sourceMappingURL=mypage.css.map */
2 changes: 1 addition & 1 deletion src/styles/mypage.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/styles/mypage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

.wall-paper-section {
width: 100%;
height: 400px;
height: 362px;
overflow: hidden;
padding: 0 !important; // ํŒจ๋”ฉ์„ ํ™•์‹คํ•˜๊ฒŒ ์ œ๊ฑฐํ•˜๊ธฐ ์œ„ํ•ด !important ์‚ฌ์šฉ
margin-bottom: 100px;
Expand Down
2 changes: 2 additions & 0 deletions src/styles/mypageedit.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

.edit-wall-paper-section {
width: 100%;
height: 362px;
overflow: hidden;
padding: 0 !important;
margin-bottom: 100px;
position: relative;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/mypageedit.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/styles/mypageedit.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

.edit-wall-paper-section {
width: 100%;
height: 362px;
overflow: hidden;
padding: 0 !important; // ํŒจ๋”ฉ์„ ํ™•์‹คํ•˜๊ฒŒ ์ œ๊ฑฐํ•˜๊ธฐ ์œ„ํ•ด !important ์‚ฌ์šฉ
margin-bottom: 100px;
position: relative;
Expand Down
40 changes: 40 additions & 0 deletions src/styles/profile.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.profile-page {
height: 100vh;
}

.profile-container {
display: flex;
flex-direction: column;
align-items: center;
}

.profile-wall-paper-section {
width: 100%;
height: 362px;
overflow: hidden;
padding: 0 !important;
position: relative;
}

.profile-wall-pape-cover {
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}

.profile-img-section {
top: 10px;
width: 100px;
height: 100px;
z-index: 10;
position: relative;
margin-top: 20px;
}

.profile-img-cover {
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}/*# sourceMappingURL=profile.css.map */
1 change: 1 addition & 0 deletions src/styles/profile.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions src/styles/profile.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.profile-page{
height: 100vh;
}

.profile-container {
display: flex;
flex-direction: column;
align-items: center;
}

.profile-wall-paper-section {
width: 100%;
height: 362px;
overflow: hidden;
padding: 0 !important; // ํŒจ๋”ฉ์„ ํ™•์‹คํ•˜๊ฒŒ ์ œ๊ฑฐํ•˜๊ธฐ ์œ„ํ•ด !important ์‚ฌ์šฉ
position: relative;
}

.profile-wall-pape-cover {
width: 100%;
height: 100%;
object-fit: cover;
}

.profile-img-section {
top: 10px; // ํ•„์š”ํ•œ ์œ„์น˜์— ๋งž๊ฒŒ ์กฐ์ •
width: 100px;
height: 100px;
z-index: 10;
position: relative;
margin-top: 20px; // ์—ฌ๋ฐฑ ์ถ”๊ฐ€
}

.profile-img-cover {
width: 100%;
height: 100%;
object-fit: cover;
}

0 comments on commit e80f208

Please sign in to comment.