From 1dc9e1f6ac48321211b492ba4fcbd5ad45484fd8 Mon Sep 17 00:00:00 2001 From: StopSoo Date: Mon, 11 Dec 2023 22:43:04 +0900 Subject: [PATCH 1/3] =?UTF-8?q?:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=A0=84=20=ED=99=94=EB=A9=B4=20=EB=B2=84=ED=8A=BC=20=EB=B3=84?= =?UTF-8?q?=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/main screen/BeforeLogin.jsx | 21 ++++++++++++++++++--- src/component/main screen/ButtonSet.jsx | 8 +++----- 2 files changed, 21 insertions(+), 8 deletions(-) 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); } // 고도체 From 1153f450e61ca5e87e6b3aacaec1c51bb1590ade Mon Sep 17 00:00:00 2001 From: StopSoo Date: Mon, 11 Dec 2023 23:19:50 +0900 Subject: [PATCH 2/3] =?UTF-8?q?:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=20=EB=92=A4=EB=A1=9C=20?= =?UTF-8?q?=EA=B0=80=EA=B8=B0=20=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/common/BackBar.jsx | 64 +++++++++++++++++++++++++++ src/component/login/LoginTemplate.jsx | 14 +++--- src/component/login/WhiteBox.jsx | 2 + src/screen/LoginScreen.jsx | 1 - 4 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 src/component/common/BackBar.jsx 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/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/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 ( ); From c272ad4bb14bc5166d24ae8dd4252c9be286486b Mon Sep 17 00:00:00 2001 From: StopSoo Date: Mon, 11 Dec 2023 23:34:36 +0900 Subject: [PATCH 3/3] =?UTF-8?q?:=20=EC=9D=B4=EC=9A=A9=20=EC=95=88?= =?UTF-8?q?=EB=82=B4=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20position=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/component/guide/GuideContents.jsx | 2 +- src/component/guide/GuideTemplate.jsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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