Skip to content

Commit

Permalink
timelinePage_edit (#16)
Browse files Browse the repository at this point in the history
* timelinePage_edit
* media-query
* timeline_feedback_edit
  • Loading branch information
JohnJung-1017 authored Feb 18, 2024
1 parent cc9383a commit f03ebee
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 94 deletions.
8 changes: 4 additions & 4 deletions project-front/src/components/Sessions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const Sessions = () => {
</header>

<div className={customStyle2.screen_header__underline} />
<div className={customStyle2.screen_header}>
<div className={customStyle2.screen_header__text}>
<a className={customStyle2.screen_header__text_bold}>GDSC Kookmin Sessions List</a>
<a className={customStyle2.screen_header__text_thin}>
<div className={customStyle2.session_header}>
<div className={customStyle2.session_header__text}>
<a className={customStyle2.session_header__text_bold}>GDSC Kookmin Sessions List</a>
<a className={customStyle2.session_header__text_thin}>
기술 파트별 소속 구성원이 매주 정해진 시간에 모여 세션을 진행합니다.
<br /> 각 세션은 Seminar에 참여 시 진행 상황이나 새로 배운 내용을 간단히
공유합니다.
Expand Down
84 changes: 70 additions & 14 deletions project-front/src/components/Style/page2.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
}



.actBackground{
background: linear-gradient(90deg, #f4d455 45%, #7dfca9 80%);
background: linear-gradient(90deg, #FCBC05 45%, #119D5A 80%);
padding: 80px;
text-align: center;
width: auto;
Expand All @@ -26,10 +25,10 @@
margin-bottom: 50px;
font-size: 120px;
text-shadow:
-1px -1px 3px whitesmoke,
1px -1px 3px whitesmoke,
-1px 1px 3px whitesmoke,
1px 1px 3px whitesmoke;
-2px -2px 5px whitesmoke,
2px -2px 5px whitesmoke,
-2px 2px 5px whitesmoke,
2px 2px 5px whitesmoke;
}

.nav1{
Expand Down Expand Up @@ -62,9 +61,9 @@
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
@media screen and (max-width: 768px) {
.greenBox {
.actBackground {
padding: 40px;
height: auto;
height: 60vh;
}

.act {
Expand All @@ -84,6 +83,26 @@
font-size: 30px;
}
}
@media screen and (max-width: 426px) {
.actBackground{
height: 60vh;
}
.act{
font-size: 15vw;
margin-bottom: 0;
}
.nav__link{
display: flex;
flex-direction: row;
justify-content: center;
}
.nav__linkS1,
.nav__linkS2,
.nav__linkE {
font-size: 5vw;
}

}

/* Seminars Page */

Expand Down Expand Up @@ -158,7 +177,7 @@
margin-right : auto;
margin-top:40px;
}
.seminar-previous__text{
.seminar_previous__text{
font-size: 25px;
font-weight: 600;
text-decoration: none;
Expand Down Expand Up @@ -199,9 +218,31 @@
.box__explain {
font-size: 2vw;
}

.seminar_previous{
height: 8vh;
}
.seminar_previous__text{
font-size: 1.8vw;
}
}

@media screen and (max-width: 530px) {
.container__box{
height: 10vh;
}
.seminar_previous{
display: flex;
flex-direction: column;
justify-content: center;
height: 5vh;
width: 25vw;
margin-top: 2vh;
}
.seminar_previous__text{
font-size: 2.5vh;
}

}
/* Session Page */
.session_header {
margin-top: 20px;
Expand Down Expand Up @@ -257,6 +298,8 @@
.session_text__a{
-webkit-text-stroke-color: #119D5A;
-webkit-text-stroke-width: 2px;
text-decoration: none;
color: white;
}
.session_repo {
margin-left: 250px;
Expand All @@ -283,25 +326,33 @@
.session_year__text{
color: white;
padding-left: 50px;
margin-left: 200px;
text-decoration: none;
font-weight: 600;
}
@media screen and (max-width: 1111px) {
.session_header__text{
display: flex;
justify-content: center;
padding-left: 0;
margin-left: 10vw;
}
.session_circle{
margin-top: 20px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.session_text{
border-radius: 0%;
.session_text{
width: 50vw;
height: 30vh;
margin-bottom: 10px;
border-radius: 10vh;
font-size: 7vw;
}
.session_repo{
margin-left: 10vw;
}

}

.expect_text {
Expand All @@ -323,4 +374,9 @@
margin-bottom: 30px;
font-weight: bold;
color: #595959;
}
@media screen and (max-width: 768px) {
.expect_text{
margin-left: 0;
}
}
92 changes: 47 additions & 45 deletions project-front/src/components/Style/timeline.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,66 @@

.timeline{
color: #4285F5;
font-size: 60px;
font-size: 4vw;
font-weight: bolder;
text-decoration: none;
margin-left: 30vh;
margin-left: 20vh;
margin-top: 10vh;
margin-bottom: 70px;
margin-bottom: 5vh;
}
.timeline__Data{
margin-left: 40vh;
font-size: 25px;
text-decoration: none;
font-weight: bold;
margin-bottom: 20px;
}
.nameData {
width: 75px;
display: inline-block;
justify-content: center;
.commit_list{
font-size: 2vw;
}
.repositoryData {
display: inline-block;
background-color: #4285F5;
width: 200px;
height: 35px;
display: inline-block;
border-radius: 7px;
text-decoration: none;
.commit{
color: rgb(100, 100, 100);
display: flex;
margin-left: 20vh;
}
a {
.commit_link{
text-decoration: none;
color: white;
font-weight: bold;
margin-left: 40px;
color: white;
background-color: #4285F5;
border-radius: 15px;
width: 17vw;
}
.commit_link:hover{
background-color: #184fac;
}
.commit_time{
color: rgb(57, 57, 57);
display: flex;
margin-left: 22vh;
}

@media screen and (max-width: 768px) {
.timeline {
font-size: 40px;
margin-left: 10px;
font-size: 6vw;
display: flex;
}
.commit_list{
padding: 1.0vh;
}

.timeline__Data {
margin-left: 10px;
font-size: 18px;
.commit{
font-size: 2.5vw;
}

.nameData {
text-align: center;
margin-bottom: 10px;
width: 55px;
}
@media screen and (max-width: 425px) {
.timeline{
margin-top: 5vh;
margin-bottom: 2vh;
font-size: 8vw;
display: flex;
margin-left: 5vw;
}

.repositoryData {
margin-top: 10px;
width: 110px;
height: 25px;
.commit_list{
display: flex;
flex-direction: column;
}

a {
margin-left: 10px;
.commit,.commit_time{
display: flex;
margin-left: 3.8vw;
font-size: 3vw;
font-weight: bold;
}

}
73 changes: 42 additions & 31 deletions project-front/src/pages/TimelinePage.jsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,47 @@
import React from 'react';
import jsonData from '../Data/memberData23_24.json';
import style from '../components/Style/timeline.module.css'; // 스타일 모듈 불러오기
import React, { useState, useEffect } from 'react';
import style from "../components/Style/timeline.module.css";

const TimelineItem = ({ name, githubLink }) => (
<div className={style['timeline__Data']}>
<div className={style['timeline__Individual']}>
<span className={style['nameData']}>{name}</span>님은{' '}
<span className={style['repositoryData']}>
<a href={githubLink} target="_blank" rel="noopener noreferrer">
repository
</a>
</span>
를 작업 중입니다.
</div>
</div>
);
function TimelinePage() {
const [recentCommits, setRecentCommits] = useState([]);

const Timeline = ({ data }) => (
<div>
<div className={style['timeline']}>TimeLines</div>
{data.map((userData, index) => (
<TimelineItem key={index} name={userData.Name} githubLink={userData.GitHubLink} />
))}
</div>
);
useEffect(() => {
fetch('https://raw.githubusercontent.com/Google-DSC-Kookmin/Google-DSC-Kookmin.github.io/master/data/data.json')
.then(response => response.json())
.then(data => {
const uniqueUsers = {};
const recentCommitsData = [];

const TimelinePage = () => {
return (
<div>
<Timeline data={jsonData} />
</div>
);
};
// 각 사용자의 최신 커밋 데이터를 추출하고 날짜를 형식화하여 저장
data.forEach(userCommits => {
userCommits.forEach(commit => {
if (!uniqueUsers[commit.userName] && recentCommitsData.length < 10) {
uniqueUsers[commit.userName] = true;
const formattedDate = new Date(commit.commitTime).toISOString().split('T')[0];
const repositoryName = commit.commitLink.split("/repos/")[1].split("/commits")[0];
const repositoryUrl = `https://github.com/${repositoryName}`;
recentCommitsData.push({ ...commit, commitTime: formattedDate, repositoryUrl });
}
});
});

setRecentCommits(recentCommitsData);
})
.catch(error => console.error('Error fetching data:', error));
}, []);

return (
<div>
<div className={style.timeline}>Timelines</div>
<ul>
{recentCommits.map((commit, index) => (
<li className={style.commit_list} key={index}>
<p className={style.commit_time}>{commit.commitTime}</p>
<p className={style.commit}>🔥{commit.userName}님은 <a className={style.commit_link} href={commit.repositoryUrl} target="_blank" rel="noopener noreferrer">Repository</a>를 작업중입니다. </p>
</li>
))}
</ul>
</div>
);
}

export default TimelinePage;

0 comments on commit f03ebee

Please sign in to comment.