-
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.
- Loading branch information
1 parent
3ec6e57
commit f985d38
Showing
2 changed files
with
71 additions
and
88 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// sidebar.tsx | ||
|
||
import { Box, IconButton, Flex } from "@chakra-ui/react"; | ||
import { Box, IconButton, Flex, Link, Button } from "@chakra-ui/react"; | ||
import { ArrowForwardIcon, ArrowBackIcon } from "@chakra-ui/icons"; | ||
import styled from "@emotion/styled"; | ||
import knuLogo from "@/assets/knuLogo.svg"; | ||
|
@@ -11,6 +11,10 @@ interface SidebarProps { | |
} | ||
|
||
export const Sidebar: React.FC<SidebarProps> = ({ isOpen, toggleSidebar }) => { | ||
const handleKakaoLogin = () => { | ||
window.location.href = "http://127.0.0.1:8080"; | ||
}; | ||
|
||
return ( | ||
<> | ||
<SidebarContainer isOpen={isOpen}> | ||
|
@@ -49,8 +53,38 @@ export const Sidebar: React.FC<SidebarProps> = ({ isOpen, toggleSidebar }) => { | |
style={{ width: "100px", height: "100px" }} | ||
/> | ||
<Divider /> | ||
<KakaoLoginButton onClick={handleKakaoLogin}> | ||
<KakaoLoginImage | ||
src="https://developers.kakao.com/tool/resource/static/img/button/login/full/ko/kakao_login_large_wide.png" | ||
alt="카카오 로그인" | ||
/> | ||
</KakaoLoginButton> | ||
</Flex> | ||
)} | ||
{isOpen && ( | ||
<Footer> | ||
<p>경북대학교 IT대학 컴퓨터학부</p> | ||
<p> | ||
우)41566 대구광역시 북구 대학로 80 / IT대학 융복합관 | ||
317호(건물번호 : 415) | ||
</p> | ||
<p>TEL. 학부 : 950-5550 , 대학원 : 950-6420 </p> | ||
<p>FAX. 053-957-4846</p> | ||
<p>E-mail. [email protected]</p> | ||
<p> | ||
담당자 현황: | ||
<Link | ||
href="https://computer.knu.ac.kr/bbs/board.php?bo_table=sub2_5" | ||
color="white" | ||
fontWeight="bold" | ||
textDecoration="Highlight" | ||
> | ||
링크 연결 | ||
</Link> | ||
</p> | ||
<p>Copyright(c) 2024, KNU CSE All rights reserved</p> | ||
</Footer> | ||
)} | ||
</SidebarContainer> | ||
</> | ||
); | ||
|
@@ -94,8 +128,8 @@ const ToggleButton = styled(IconButton)` | |
} | ||
&:hover { | ||
background-color: #e0a89b; | ||
transform: translateY(-50%) scale(1.1); | ||
background-color: #fcb9aa; | ||
transform: translateY(-50%) scale(1.2); | ||
} | ||
`; | ||
|
||
|
@@ -105,3 +139,36 @@ const Divider = styled.hr` | |
border-top: 1px solid white; | ||
margin: 20px 0; | ||
`; | ||
|
||
const Footer = styled(Box)` | ||
position: absolute; | ||
bottom: 0; | ||
padding: 20px; | ||
font-size: 12px; | ||
line-height: 1.5; | ||
text-align: left; | ||
color: white; | ||
width: 100%; | ||
margin-left: auto; | ||
margin-right: auto; | ||
`; | ||
|
||
const KakaoLoginButton = styled(Button)` | ||
margin-top: 20px; | ||
background-color: transparent; | ||
border: none; | ||
padding: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
&:hover { | ||
background-color: transparent; | ||
} | ||
`; | ||
|
||
const KakaoLoginImage = styled.img` | ||
width: 300px; | ||
height: 45px; | ||
filter: brightness(1.2); | ||
`; |