-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#19 main page intergrate #20
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
9024aa1
Merge pull request #7 from DguFarmSystem/develop
dewbeeny e2719a7
Merge pull request #18 from DguFarmSystem/develop
dewbeeny 2f708fd
feat: 팝업창 컴포넌트 화화
parkjoohyung0826 0beb609
feat: 백그라운드 블러 효과 적용
parkjoohyung0826 33889f9
feat: 메인페이지 네비게이션
parkjoohyung0826 eb945a2
feat: 트랙 소개 레이아웃 UI 수정 및 헤더 모달창 추가가
parkjoohyung0826 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const PopupOverlay = styled.div` | ||
position: fixed; | ||
inset: 0; | ||
background: rgba(113, 113, 113, 0.3); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
z-index: 9999; | ||
`; | ||
|
||
export const PopupBox = styled.div` | ||
width: 500px; | ||
background-color: #fcfcfc; | ||
border: 3px solid #28723f; | ||
border-radius: 15px; | ||
text-align: center; | ||
padding: 40px; | ||
z-index: 10000; | ||
`; | ||
|
||
export const PopupTitle = styled.p` | ||
font-size: 22px; | ||
font-weight: 700; | ||
color: black; | ||
margin-bottom: 20px; | ||
`; | ||
|
||
export const PopupText = styled.p` | ||
font-size: 18px; | ||
color: black; | ||
margin-bottom: 20px; | ||
`; | ||
|
||
export const PopupCloseButton = styled.button` | ||
background-color: #28723f; | ||
color: #fcfcfc; | ||
font-size: 16px; | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 10px; | ||
cursor: pointer; | ||
box-shadow: 0px 2px 10px rgba(25, 25, 25, 0.2); | ||
width: 100px; | ||
margin-top: 20px; | ||
&:hover { | ||
background-color: #1f5b30; | ||
} | ||
`; |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React from 'react'; | ||
import * as S from './Popup.styled'; | ||
|
||
interface PopupProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
title: string; | ||
content: string; | ||
} | ||
|
||
const Popup: React.FC<PopupProps> = ({ isOpen, onClose, title, content }) => { | ||
if (!isOpen) return null; | ||
|
||
return ( | ||
<S.PopupOverlay onClick={onClose}> | ||
<S.PopupBox onClick={(e) => e.stopPropagation()}> | ||
<S.PopupTitle>{title}</S.PopupTitle> | ||
<S.PopupText>{content}</S.PopupText> | ||
<S.PopupCloseButton onClick={onClose}>확인</S.PopupCloseButton> | ||
</S.PopupBox> | ||
</S.PopupOverlay> | ||
); | ||
}; | ||
|
||
export default Popup; |
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
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,12 +1,52 @@ | ||
import * as S from './FarmSystemNav.styled'; | ||
import { useState, useEffect } from 'react'; | ||
|
||
export default function FarmSystemNav() { | ||
const [isVisible, setIsVisible] = useState(false); | ||
|
||
useEffect(() => { | ||
const handleScroll = () => { | ||
if (window.scrollY > 200) { | ||
setIsVisible(true); | ||
} else { | ||
setIsVisible(false); | ||
} | ||
}; | ||
|
||
window.addEventListener("scroll", handleScroll); | ||
return () => { | ||
window.removeEventListener("scroll", handleScroll); | ||
}; | ||
}, []); | ||
|
||
const handleSmoothScroll = (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>, targetId: string) => { | ||
event.preventDefault(); | ||
const targetElement = document.querySelector(targetId); | ||
if (targetElement) { | ||
window.scrollTo({ | ||
top: targetElement.getBoundingClientRect().top + window.scrollY, | ||
behavior: "smooth", | ||
}); | ||
} | ||
}; | ||
|
||
|
||
return ( | ||
<S.Navbar> | ||
<S.NavItem href="#about">● Farm System이란?</S.NavItem> | ||
<S.NavItem href="#tracks">● 트랙 및 커리큘럼</S.NavItem> | ||
<S.NavItem href="#achievements">● 활동 및 성과</S.NavItem> | ||
<S.NavItem href="#eligibility">● 지원 요건</S.NavItem> | ||
</S.Navbar> | ||
<S.FixedNavWrapper isVisible={isVisible}> | ||
<S.Navbar> | ||
<S.NavItem href="#about" onClick={(e) => handleSmoothScroll(e, "#about")}> | ||
<S.Circle /> Farm System이란? | ||
</S.NavItem> | ||
<S.NavItem href="#tracks" onClick={(e) => handleSmoothScroll(e, "#tracks")}> | ||
<S.Circle /> 트랙 및 커리큘럼 | ||
</S.NavItem> | ||
<S.NavItem href="#achievements" onClick={(e) => handleSmoothScroll(e, "#achievements")}> | ||
<S.Circle /> 활동 및 성과 | ||
</S.NavItem> | ||
<S.NavItem href="#eligibility" onClick={(e) => handleSmoothScroll(e, "#eligibility")}> | ||
<S.Circle /> 지원 요건 | ||
</S.NavItem> | ||
</S.Navbar> | ||
</S.FixedNavWrapper> | ||
); | ||
} | ||
} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분 오타가 있습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 넵 고치겠습니당