Skip to content

Commit

Permalink
Merge pull request #147 from JJongBin/develop
Browse files Browse the repository at this point in the history
메인 로고 및 소개버튼
  • Loading branch information
ktmihs authored Dec 5, 2022
2 parents ffdf84c + 09a2483 commit c60c2dd
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 7 deletions.
13 changes: 12 additions & 1 deletion frontend/src/component/Background/background.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { css } from '@emotion/react';
import theme from '../../styles/theme';

export const header = css`
position: absolute;
position: sticky;
top: 0;
left: 0;
padding: 20px;
Expand All @@ -16,6 +16,17 @@ export const teamBtn = css`
border-radius: 20px;
font-weight: 700;
z-index: 1000;
opacity: 0.8;
transition: 0.2s;
cursor: pointer;
color: ${theme.black};
text-decoration: none;
margin-left: 10px;
:hover {
opacity: 1;
}
`;

export const main = css`
Expand Down
12 changes: 11 additions & 1 deletion frontend/src/component/Background/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { Link } from 'react-router-dom';
import { childrenType } from '../../types/types';
import { header, teamBtn, main, video } from './background.styled';

const Background = ({ children }: childrenType) => {
const notion =
'https://www.notion.so/boostcamp-wm/Web05-Phaser-Socket-WebRTC-4913d5b6116f4c37be84340703eb8a8d';
const github = 'https://github.com/boostcampwm-2022/web05-SleepyWoods';

return (
<>
<video css={video} src="src/assets/background.mp4" autoPlay loop muted>
배경 영상
</video>
<header css={header}>
<button css={teamBtn}>팀 소개</button>
<a href={github} css={teamBtn} target="_blank">
Github
</a>
<a href={notion} css={teamBtn} target="_blank">
프로젝트 소개
</a>
</header>
<main css={main}>{children}</main>
</>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/component/Button/button.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ export const button = (type: string) => css`
height: 50px;
background-color: ${type === 'dark' ? theme.black : theme.white};
color: ${type === 'dark' ? theme.white : theme.black};
opacity: 0.9;
opacity: 0.8;
border-radius: 20px;
font-weight: 700;
text-align: center;
transition: 0.3s;
:hover {
opacity: 1;
}
`;

export const signButton = (type: string) => css`
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/component/MainContent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { useRecoilValue } from 'recoil';
import { userState } from '../../store/atom/user';
import { MainButton } from '../Button';
import { buttons } from '../Button/button.styled';
import { container, logo } from './mainContent.styled';
import logo from '../../assets/logo.png';
import * as style from './mainContent.styled';

const ClientButton = () => {
const handleLogoutEvent = async () => {
Expand Down Expand Up @@ -39,8 +40,8 @@ const MainContent = () => {
const user = useRecoilValue(userState);

return (
<section css={container}>
<h1 css={logo}>Sleepy Woods</h1>
<section css={style.container}>
<img src={logo} css={style.logo} alt="슬리피우드 로고 이미지"></img>
<div css={buttons}>
{user.nickname ? <ClientButton /> : <GuestButton />}
</div>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/component/MainContent/mainContent.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ export const container = css`
export const logo = css`
font-size: 64px;
font-weight: 700;
color: ${theme.white};
filter: drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.4));
margin-bottom: 50px;
`;

0 comments on commit c60c2dd

Please sign in to comment.