-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/2023WISCOM/WISCOM-FE into f…
…eature/#10-guestbook
- Loading branch information
Showing
15 changed files
with
470 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const MapContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
|
||
export const Floorplan = styled.div` | ||
position: relative; | ||
width: 300px; | ||
height: 450px; | ||
border: 2.5px solid black; | ||
margin: 0 auto; | ||
@media screen and (max-width: 400px) { | ||
width: 280px; | ||
} | ||
@media screen and (max-width: 350px) { | ||
width: 250px; | ||
} | ||
`; | ||
|
||
export const Title = styled.div` | ||
color: #000; | ||
text-align: center; | ||
font-size: 35px; | ||
font-style: normal; | ||
font-weight: 600; | ||
margin-bottom: 30px; | ||
`; | ||
|
||
export const Room = styled.div` | ||
position: absolute; | ||
width: 50px; | ||
height: 80px; | ||
border: 2px solid black; | ||
background-color: #fff; | ||
border-radius: 10px; | ||
font-size: 20px; | ||
padding: 5px 0 0 5px; | ||
@media screen and (max-width: 350px) { | ||
width: 40px; | ||
height: 80px; | ||
} | ||
`; | ||
|
||
export const RoomR = styled.div` | ||
position: absolute; | ||
width: 80px; | ||
height: 50px; | ||
border: 2px solid black; | ||
background-color: #fff; | ||
border-radius: 10px; | ||
font-size: 20px; | ||
padding: 5px 0 0 5px; | ||
@media screen and (max-width: 350px) { | ||
width: 70px; | ||
height: 40px; | ||
} | ||
`; | ||
|
||
export const Info = styled.div` | ||
position: absolute; | ||
top: 50%; | ||
right: 10px; | ||
transform: translateY(-50%); | ||
width: 50px; | ||
height: 50px; | ||
border: 2px solid black; | ||
text-align: center; | ||
line-height: 50px; | ||
font-size: 15px; | ||
background-color: #fff; | ||
@media screen and (max-width: 400px) { | ||
width: 40px; | ||
height: 40px; | ||
} | ||
`; | ||
|
||
export const Door = styled.div` | ||
position: absolute; | ||
background-color: #ffffff; | ||
z-index: 2; | ||
bottom: -20px; | ||
left: 230px; | ||
width: 50px; | ||
height: 60px; | ||
@media screen and (max-width: 400px) { | ||
bottom: -20px; | ||
left: 215px; | ||
width: 50px; | ||
height: 60px; | ||
} | ||
@media screen and (max-width: 350px) { | ||
bottom: -20px; | ||
left: 200px; | ||
width: 50px; | ||
height: 30px; | ||
} | ||
`; | ||
|
||
export const LineContainer = styled.div` | ||
:nth-of-type(1) { | ||
top: 0px; | ||
left: 220px; | ||
width: 10px; | ||
height: 180px; | ||
} | ||
:nth-of-type(2) { | ||
top: 180px; | ||
left: 220px; | ||
width: 78px; | ||
height: 10px; | ||
} | ||
`; | ||
export const Line = styled.div` | ||
position: absolute; | ||
background-color: #000000; | ||
z-index: 2; | ||
@media screen and (max-width: 400px) { | ||
&:nth-child(2) { | ||
width: 59px; | ||
} | ||
} | ||
@media screen and (max-width: 350px) { | ||
&:nth-child(1) { | ||
left: 200px; | ||
} | ||
&:nth-child(2) { | ||
top: 180px; | ||
left: 200px; | ||
width: 48px; | ||
height: 10px; | ||
} | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import * as M from './MapStyle'; | ||
|
||
export default function MapWrapper() { | ||
const [activeTeamIndex, setActiveTeamIndex] = useState(0); | ||
|
||
useEffect(() => { | ||
const interval = setInterval(() => { | ||
setActiveTeamIndex((prevIndex) => (prevIndex + 1) % 11); | ||
}, 2000); | ||
|
||
return () => { | ||
clearInterval(interval); | ||
}; | ||
}, []); | ||
|
||
return ( | ||
<M.MapContainer> | ||
<M.Title>WISCOM MAP</M.Title> | ||
<M.Floorplan> | ||
<M.RoomR | ||
style={{ | ||
top: '10px', | ||
left: '100px', | ||
backgroundColor: activeTeamIndex === 0 ? '#7ce06b' : undefined, | ||
}}> | ||
01 | ||
</M.RoomR> | ||
<M.Room style={{ top: '100px', left: '10px', backgroundColor: activeTeamIndex === 1 ? '#7ce06b' : undefined }}> | ||
02 | ||
</M.Room> | ||
<M.Room style={{ top: '100px', left: '90px', backgroundColor: activeTeamIndex === 2 ? '#7ce06b' : undefined }}> | ||
03 | ||
</M.Room> | ||
<M.Room style={{ top: '100px', left: '150px', backgroundColor: activeTeamIndex === 3 ? '#7ce06b' : undefined }}> | ||
04 | ||
</M.Room> | ||
<M.Room style={{ top: '190px', left: '150px', backgroundColor: activeTeamIndex === 4 ? '#7ce06b' : undefined }}> | ||
05 | ||
</M.Room> | ||
<M.Room style={{ top: '190px', left: '90px', backgroundColor: activeTeamIndex === 5 ? '#7ce06b' : undefined }}> | ||
06 | ||
</M.Room> | ||
<M.Room style={{ top: '280px', left: '10px', backgroundColor: activeTeamIndex === 6 ? '#7ce06b' : undefined }}> | ||
07 | ||
</M.Room> | ||
<M.Room style={{ top: '280px', left: '90px', backgroundColor: activeTeamIndex === 7 ? '#7ce06b' : undefined }}> | ||
08 | ||
</M.Room> | ||
<M.RoomR | ||
style={{ top: '280px', left: '150px', backgroundColor: activeTeamIndex === 9 ? '#7ce06b' : undefined }}> | ||
10 | ||
</M.RoomR> | ||
<M.RoomR | ||
style={{ bottom: '10px', left: '30px', backgroundColor: activeTeamIndex === 8 ? '#7ce06b' : undefined }}> | ||
09 | ||
</M.RoomR> | ||
<M.RoomR | ||
style={{ bottom: '10px', left: '125px', backgroundColor: activeTeamIndex === 10 ? '#7ce06b' : undefined }}> | ||
11 | ||
</M.RoomR> | ||
|
||
<M.Door /> | ||
|
||
<M.LineContainer> | ||
<M.Line /> | ||
<M.Line /> | ||
</M.LineContainer> | ||
|
||
<M.Info>Info</M.Info> | ||
</M.Floorplan> | ||
</M.MapContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React, { useEffect, useState } from 'react'; | ||
import * as MP from './ProjectListStyle'; | ||
|
||
export default function ProjectList() { | ||
const [activeTeamIndex, setActiveTeamIndex] = useState(0); | ||
|
||
const TeamList = [ | ||
{ team: 'HATCH', service: 'Pocket Pose : PoPo' }, | ||
{ team: 'DRAKE', service: 'FREN:SEND' }, | ||
{ team: 'HIGHFIVE', service: '아트어리' }, | ||
{ team: '딱꼼', service: '어댄고(Urdango)' }, | ||
{ team: 'IDEAL', service: 'DUK TO ME' }, | ||
{ team: '내마음을UNLOCK', service: 'UNLOCK' }, | ||
{ team: '클래스메이트', service: 'SchoolLog' }, | ||
{ team: '한울', service: 'We:Lover' }, | ||
{ team: '한소리', service: '실록 샐록' }, | ||
{ team: '사현희있어요', service: '라-이터' }, | ||
{ team: 'AFORE', service: 'Fairy Tale' }, | ||
]; | ||
|
||
useEffect(() => { | ||
const interval = setInterval(() => { | ||
setActiveTeamIndex((prevIndex) => (prevIndex + 1) % TeamList.length); | ||
}, 2000); | ||
|
||
return () => { | ||
clearInterval(interval); | ||
}; | ||
}, []); | ||
|
||
const onClickPrj = (index) => { | ||
window.location.href = `project/${index}`; | ||
}; | ||
return ( | ||
<> | ||
<MP.ListWrapper> | ||
{TeamList.map(({ team, service }, index) => ( | ||
<MP.Team | ||
key={team} | ||
onClick={() => onClickPrj(index)} | ||
style={{ | ||
color: activeTeamIndex === index ? '#7ce06b' : 'black', | ||
}}> | ||
{String(index + 1).padStart(2, '0')}.{team} - {service} | ||
</MP.Team> | ||
))} | ||
</MP.ListWrapper> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const ListWrapper = styled.div` | ||
margin-top: 5rem; | ||
display: flex; | ||
flex-direction: column; | ||
@media screen and (max-width: 760px) and (min-width: 685px) { | ||
padding-left: 3rem; | ||
} | ||
`; | ||
|
||
export const Team = styled.div` | ||
color: #000; | ||
font-family: Pretendard; | ||
font-size: 18px; | ||
font-style: normal; | ||
font-weight: 400; | ||
letter-spacing: 1px; | ||
line-height: 50px; | ||
@media screen and (max-width: 400px) { | ||
font-size: 15px; | ||
} | ||
@media screen and (max-width: 350px) { | ||
font-size: 13px; | ||
} | ||
&:hover { | ||
color: #7ce06b; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.