-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[feat] 트렌드 분석 페이지 마무리
- Loading branch information
Showing
17 changed files
with
918 additions
and
447 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,52 @@ | ||
import React, { useState } from "react"; | ||
import styled from "styled-components"; | ||
|
||
interface ToggleButtonProps { | ||
items: string[]; | ||
} | ||
|
||
const RadioButtons = (props: ToggleButtonProps) => { | ||
const [selectedOption, setSelectedOption] = useState(1); | ||
const { items } = props; | ||
|
||
return ( | ||
<RadioButtonsWrapper> | ||
{items.map((item, index) => ( | ||
<RadioButtonLabel | ||
key={index} | ||
selected={selectedOption === index + 1} | ||
onClick={() => setSelectedOption(index + 1)} | ||
> | ||
{item} | ||
</RadioButtonLabel> | ||
))} | ||
</RadioButtonsWrapper> | ||
); | ||
}; | ||
|
||
export default RadioButtons; | ||
|
||
const RadioButtonsWrapper = styled.div` | ||
display: flex; | ||
jusitfy-content: space-between; | ||
align-items: center; | ||
gap: 0.5rem; | ||
background: #383838; | ||
color: #b4b4b4; | ||
border-radius: 100px; | ||
padding: 0.3rem; | ||
`; | ||
|
||
const RadioButtonLabel = styled.label<{ selected: boolean }>` | ||
display: inline-flex; | ||
align-items: center; | ||
cursor: pointer; | ||
background: ${({ selected }) => (selected ? "#EFEFEF" : "transparent")}; | ||
color: ${({ selected }) => (selected ? "#595959" : "#b4b4b4")}; | ||
width: 100%; | ||
height: 100%; | ||
text-align: center; | ||
padding: 0.4rem 1.2rem; | ||
border-radius: 100px; | ||
transition: all 0.2s; | ||
`; |
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 |
---|---|---|
@@ -1,44 +1,83 @@ | ||
import { styled } from "styled-components"; | ||
import Ranking from "./Ranking"; | ||
import Container from "../common/Container"; | ||
import { brandRequtation } from "@/lib/trend/trendData"; | ||
import Image from "next/image"; | ||
|
||
const rankData = ["이병헌", "조승우", "김수현"]; | ||
|
||
const BrandReputationIndex = () => { | ||
return ( | ||
<RankingBox> | ||
{brandRequtation.map((brand) => ( | ||
<Ranking | ||
key={brand.id} | ||
title={brand.title} | ||
ranking={brand.ranking} | ||
trend={brand.trend} | ||
updown={brand.updown} | ||
/> | ||
))} | ||
</RankingBox> | ||
<> | ||
<Label> | ||
영화배우 부문 <span>4위</span> | ||
</Label> | ||
<Layout> | ||
<Genre>영화배우 부문</Genre> | ||
<LineBox> | ||
<Image src="/trend/line1.svg" alt="line" width={50} height={30} /> | ||
<Image src="/trend/line2.svg" alt="line" width={50} height={30} /> | ||
<Image src="/trend/line3.svg" alt="line" width={50} height={30} /> | ||
</LineBox> | ||
<RankBox> | ||
{rankData.map((name, index) => ( | ||
<Rank> | ||
<span>{index + 1}위</span> {name} | ||
</Rank> | ||
))} | ||
</RankBox> | ||
</Layout> | ||
</> | ||
); | ||
}; | ||
|
||
export default BrandReputationIndex; | ||
|
||
const BrandText = styled.div` | ||
const Layout = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-top: 3rem; | ||
`; | ||
|
||
const Label = styled.div` | ||
color: ${({ theme }) => theme.colors.grey5}; | ||
font-size: 2rem; | ||
font-style: normal; | ||
font-weight: 700; | ||
line-height: normal; | ||
padding-left: 0.78rem; | ||
span { | ||
color: ${({ theme }) => theme.colors.main}; | ||
} | ||
`; | ||
|
||
const Genre = styled.div` | ||
color: ${({ theme }) => theme.colors.grey5}; | ||
font-size: 1.2rem; | ||
font-weight: 700; | ||
margin-bottom: 2rem; | ||
background: ${({ theme }) => theme.colors.main}; | ||
border-radius: 100px; | ||
width: 40%; | ||
text-align: center; | ||
padding: 0.6rem 0; | ||
margin-left: 0.78rem; | ||
`; | ||
|
||
const RankingBox = styled.div` | ||
const LineBox = styled.div` | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
flex-direction: column; | ||
gap: 1rem; | ||
`; | ||
|
||
& > * { | ||
flex-basis: calc(50% - 0.5rem); // 요소의 초기 크기를 50%로 설정 | ||
margin-bottom: 1rem; // 각 요소의 아래 여백 설정 | ||
} | ||
const RankBox = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
gap: 3rem; | ||
margin-right: 2rem; | ||
`; | ||
|
||
& > *:first-child { | ||
flex-basis: 100%; // 첫 번째 요소의 크기를 100%로 설정 | ||
const Rank = styled.div` | ||
font-size: 1.2rem; | ||
color: ${({ theme }) => theme.colors.white}; | ||
span { | ||
color: ${({ theme }) => theme.colors.mainLight1}; | ||
} | ||
`; |
This file was deleted.
Oops, something went wrong.
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.