diff --git a/src/component/common/BackBar.jsx b/src/component/common/BackBar.jsx new file mode 100644 index 0000000..c56ffae --- /dev/null +++ b/src/component/common/BackBar.jsx @@ -0,0 +1,64 @@ +import React, { useState } from 'react'; +import styled from 'styled-components'; +import { GoChevronLeft } from "react-icons/go"; +import { useNavigate } from 'react-router-dom'; + +// 전 페이지로 돌아갈 수 있는 버튼이 있는 상단 바 +function BackBar() { + return ( + + + + ); +} + +const Menus = styled.div` + width: auto; + height: 8vh; + background: none; + border: none; + display: flex; + flex-direction: row; + margin-right: auto; + margin-top: 1vh; +`; + +function LeftBackBar({}) { + const [isBackHovered, setIsMenuHovered] = useState(false); // 버튼 hover 여부 + const navigate = useNavigate(); + + const isBackClick = () => { + navigate(-1); // 바로 이전 페이지로 가기 + }; + + return ( + setIsMenuHovered(true)} + onMouseOut={() => setIsMenuHovered(false)} + onClick={isBackClick} + > + + + ); +} + +const BackButton = styled.button` + width: 5vw; + height: 8vh; + background: none; + border: none; + position: relative; + justify-content: flex-start; + cursor: pointer; + z-index: 3000; + + &:active, + &:hover { + transition: 0.7s; + } +`; + +export default BackBar; \ No newline at end of file diff --git a/src/component/guide/GuideContents.jsx b/src/component/guide/GuideContents.jsx index 9f3979f..10df235 100644 --- a/src/component/guide/GuideContents.jsx +++ b/src/component/guide/GuideContents.jsx @@ -20,7 +20,7 @@ const GuideContents = forwardRef(({detail, img, name}, ref) => {

{name}

{detail}
-
+
{ img.second === null ? null : }
diff --git a/src/component/guide/GuideTemplate.jsx b/src/component/guide/GuideTemplate.jsx index 5b798a7..9a38144 100644 --- a/src/component/guide/GuideTemplate.jsx +++ b/src/component/guide/GuideTemplate.jsx @@ -74,15 +74,17 @@ const TranslucentBox = styled.div` background-color: rgba(255, 255, 255, 0.90); border-radius: 1rem 1rem 0 0; - + position: absolute; `; const ContentsContainer = styled.div` overflow: auto; height: calc(100% - 15vh); - width: 90%; + width: 83vw; + height: 65vh; margin-left: auto; margin-right: auto; + position: relative; `; export {GuideTemplate, TranslucentBox, ContentsContainer}; \ No newline at end of file diff --git a/src/component/login/LoginTemplate.jsx b/src/component/login/LoginTemplate.jsx index df34219..dd9a227 100644 --- a/src/component/login/LoginTemplate.jsx +++ b/src/component/login/LoginTemplate.jsx @@ -3,7 +3,7 @@ import styled from 'styled-components'; import naverLogo from '../resource/logo_naver.png'; import kakaoLogo from '../resource/logo_kakao.png'; import googleLogo from '../resource/logo_google.png'; - +import BackBar from '../common/BackBar.jsx'; import WhiteBox from './WhiteBox' function LoginTemplate() { @@ -18,13 +18,13 @@ function LoginTemplate() { }; return ( - //align-items: center -> 적용이 안되는 문제로 우선 삭제 -
- +
+ +

로그인하기

소셜 로그인으로 진행하세요

- + login('kakao')}> 카카오 로그인 @@ -37,11 +37,11 @@ function LoginTemplate() {   구글 로그인 - + {/* 회원가입하기 */} -
+
); }; diff --git a/src/component/login/WhiteBox.jsx b/src/component/login/WhiteBox.jsx index 294c3c5..2c2ce73 100644 --- a/src/component/login/WhiteBox.jsx +++ b/src/component/login/WhiteBox.jsx @@ -1,9 +1,11 @@ import styled from 'styled-components'; const WhiteBox = styled.div` + justify-Content: 'center'; width: 55%; height: auto; padding: 2% 5% 3% 5%; + margin: auto; border-radius: 30px; background-color: var(--white); h1 { diff --git a/src/component/main screen/BeforeLogin.jsx b/src/component/main screen/BeforeLogin.jsx index 8617949..9eae9fa 100644 --- a/src/component/main screen/BeforeLogin.jsx +++ b/src/component/main screen/BeforeLogin.jsx @@ -1,5 +1,6 @@ import React from 'react'; import styled from 'styled-components'; +import { useNavigate } from 'react-router-dom'; import Button from './ButtonSet.jsx' import Avatar from '../common/Avatar.jsx'; import logoRoot from '../resource/unisphere_logo.png'; @@ -7,15 +8,29 @@ import chRoot from '../resource/avatar_unisphere.png'; /* 사용자가 로그인하기 전 화면 배치 */ function BeforeLoginSet() { + const navigate = useNavigate(); + + const navigateToLogin = () => { + navigate('/login'); + }; + + const navigateToGuide = () => { + navigate('/guide'); + } + + const navigateToArticle = () => { + navigate('/article'); + } + return ( logo - - - + + + diff --git a/src/component/main screen/ButtonSet.jsx b/src/component/main screen/ButtonSet.jsx index 020bf39..998e113 100644 --- a/src/component/main screen/ButtonSet.jsx +++ b/src/component/main screen/ButtonSet.jsx @@ -1,8 +1,7 @@ import styled from "styled-components"; -import { BrowserRouter as Router, Route, Switch, Link } from "react-router-dom"; -function Button({ children, onClick }) { - return (
{children}
); +function Button({ children, onClickFunction }) { + return (
{children}
); } const StyledButton = styled.button` @@ -20,8 +19,7 @@ const StyledButton = styled.button` cursor: pointer; &:active, - &:hover, - &:focus { + &:hover { background: var(--button-hover-bg-color, #5e5e5e); } // 고도체 diff --git a/src/screen/LoginScreen.jsx b/src/screen/LoginScreen.jsx index 5bdb8be..d839e5d 100644 --- a/src/screen/LoginScreen.jsx +++ b/src/screen/LoginScreen.jsx @@ -2,7 +2,6 @@ import React from 'react'; import LoginTemplate from "../component/login/LoginTemplate"; function LoginScreen() { - // 여기서 뭔가 url이나 요청 보내는걸로 return ( );