Skip to content

Commit

Permalink
Merge pull request #66 from KUSITMS-29th-TEAM-D/develop
Browse files Browse the repository at this point in the history
v0.3.1
  • Loading branch information
AAminha authored May 22, 2024
2 parents 7582c2c + 11405a1 commit 0594fa9
Show file tree
Hide file tree
Showing 16 changed files with 379 additions and 261 deletions.
13 changes: 13 additions & 0 deletions src/apis/programAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,17 @@ export const programAPI = {
);
return response.data;
},
// 프로그램 상세페이지 조회
getProgramDetail: async (type: string, id: string) => {
const response = await authClient.get(`/api/programs/${type}/${id}`);
return response.data;
},
// 프로그램 신청
applyProgram: async (type: string, programId: string) => {
const response = await authClient.post(`/api/programs/apply`, {
type,
programId,
});
return response.data;
},
};
2 changes: 1 addition & 1 deletion src/components/DesignStartPage/DesignStartView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DesignStartView = () => {
어떤 브랜더가 되고 싶나요?
</TitleContainer>
<SubTitleContainer>
문항은 <span className="highlight">3문항</span>으로, 앞으로 만들어 갈 나의 브랜드
문항은 <span className="highlight">5문항</span>으로, 앞으로 만들어 갈 나의 브랜드
방향성을 설정하는 첫 걸음이에요.
<br />
설계하기 테스트를 통해 나의 브랜드 컨셉을 정해보고,{' '}
Expand Down
142 changes: 140 additions & 2 deletions src/components/ExperienceDetailPage/BubbleSection.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,141 @@
export const BubbleSection = () => {
return <div>여긴 버블버블</div>;
import styled from 'styled-components';

import { moveDown, moveLeft, moveRight, moveUp } from '@/styles';

interface BubbleSectionProps {
keywords: string[];
}

export const BubbleSection = ({ keywords }: BubbleSectionProps) => {
return (
<StyledContainer>
<div className="title">
이런 <span className="highlight">이미지 키워드</span>의 사람이 선호하는 경험이에요.
</div>
<StyledBubbleContainer>
{keywords.map((keyword, index) => (
<StyledBubble
key={keyword}
className={`b${index}`}
$weight={1 - ((1 - 0.48) / (keywords.length - 1)) * index}
>
<span>{keyword}</span>
</StyledBubble>
))}
</StyledBubbleContainer>
</StyledContainer>
);
};

const StyledContainer = styled.section`
width: 100%;
.title {
${({ theme }) => theme.font.desktop.title1};
color: ${({ theme }) => theme.color.gray700};
margin-bottom: 24px;
.highlight {
color: ${({ theme }) => theme.color.primary500};
}
}
`;

const StyledBubbleContainer = styled.div`
height: 481px;
position: relative;
border-radius: 8px;
border: 2px solid ${({ theme }) => theme.color.primary100};
background: linear-gradient(180deg, rgba(255, 255, 255, 0) 59.5%, #e1d1ff 100%), #fff;
`;

const StyledBubble = styled.div<{ $weight: number }>`
width: ${({ $weight }) => $weight * 270}px;
height: ${({ $weight }) => $weight * 270}px;
display: flex;
justify-content: center;
align-items: center;
will-change: transform;
text-align: center;
color: ${({ theme }) => theme.color.primary800};
${({ theme }) => theme.font.desktop.body1b};
position: absolute;
border-radius: 50%;
background: radial-gradient(
50% 50% at 50% 50%,
rgba(255, 255, 255, 0) 76%,
rgba(204, 179, 253, 0.4) 100%
);
box-shadow:
-0.319px 51.263px 151.773px 0px rgba(48, 13, 115, 0.12),
-0.04px 6.444px 21.116px 0px rgba(48, 13, 115, 0.06);
&.b0 {
bottom: 10%;
left: 30%;
animation:
${moveDown} 2000ms ease-in-out infinite,
${moveLeft} 3000ms ease-in-out infinite;
}
&.b1 {
top: 12%;
right: 32%;
animation:
${moveDown} 3000ms ease-in-out infinite,
${moveRight} 2000ms ease-in-out infinite;
}
&.b2 {
bottom: 20%;
right: 17%;
animation:
${moveUp} 2500ms ease-in-out infinite,
${moveLeft} 3000ms ease-in-out infinite;
}
&.b3 {
top: 20%;
left: 20%;
animation:
${moveUp} 2300ms ease-in-out infinite,
${moveLeft} 2700ms ease-in-out infinite;
}
&.b4 {
top: 10%;
right: 14%;
animation:
${moveDown} 2500ms ease-in-out infinite,
${moveRight} 2300ms ease-in-out infinite;
}
&.b5 {
top: 20%;
left: 10%;
animation:
${moveUp} 2600ms ease-in-out infinite,
${moveRight} 3000ms ease-in-out infinite;
}
&.b6 {
bottom: 14%;
left: 20%;
animation:
${moveDown} 3000ms ease-in-out infinite,
${moveRight} 2800ms ease-in-out infinite;
}
`;
Loading

0 comments on commit 0594fa9

Please sign in to comment.