-
Notifications
You must be signed in to change notification settings - Fork 0
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
Week02/seunghyun #8
Open
hyun907
wants to merge
32
commits into
main
Choose a base branch
from
week02/seunghyun
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
✨어떤 과제를 수행했나요?✨
2주차 과제인 당근마켓 랜딩 페이지 클론(HTML, CSS 구현), javascript로 달력 만들기 과제를 수행했습니다.
![image](https://private-user-images.githubusercontent.com/159671505/331854236-a9139d3b-c527-4f1f-b0f1-5f4a3d28fcae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4Njg0MzMsIm5iZiI6MTczOTg2ODEzMywicGF0aCI6Ii8xNTk2NzE1MDUvMzMxODU0Mj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lZDRkN2FhMTZiN2ZhZmUxY2I2ZGY4OGM0Njg2NmMzMWYzOTUwODU2Y2FjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.2g_NBghpws0u1NmXBAzLQbVPpxzyIs0H-jw_9IvoXPQ)
✨어려웠던점, 트러블슈팅✨
🥕 당근마켓 페이지 클론 과제
퍼블리싱 작업을 진행하면서 저에게 익숙하지 않았던 CSS 속성들을 다시금 공부할 수 있어서 좋았습니다.
white-space: nowrap
텍스트가 길어서 부모 요소 안의 가로폭을 넘어가더라도 자동으로 줄바꿈이 일어나게 하고 싶지 않은 부분이 있었는데, 이럴 때는 white-space 속성을 nowrap으로 설정해주면 된다는 것을 찾아 변경했습니다.
justify-content: space-between
당근마켓 랜딩페이지에서는 드래그를 할 시, 홈페이지 성격에 맞춰 background 색상이 변경된다는 것을 알았습니다. 그래서 ::selection을 사용했습니다.
🗓️ 달력 만들기 과제
우선, 날짜를 구하려면 Date 객체를 사용해야 합니다. 과제를 하기 위해 어떻게 하면 오늘 날짜 출력이 가능할까? 부터 접근해보았습니다.
이렇게 코드를 작성하면 해당 달 - 1의 달이 출력되는 것을 확인했습니다. getMonth()메서드는 Zero-base 로 설정되어있기 때문에 +1을 해줘야 정상적인 해당 달이 출력된다는 사실을 알았습니다. 따라서, 해당 달을 구할 때에는
로 작성해주어야 합니다.
🤔 PR Point
🗓️ 달력 만들기 과제
![image](https://private-user-images.githubusercontent.com/159671505/331853926-59213ed4-111d-4fb3-b220-6b97bd67a5ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4Njg0MzMsIm5iZiI6MTczOTg2ODEzMywicGF0aCI6Ii8xNTk2NzE1MDUvMzMxODUzOTI2LTU5MjEzZWQ0LTExMWQtNGZiMy1iMjIwLTZiOTdiZDY3YTVhYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOFQwODQyMTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lYjE2ZjgxMDAzODA4MTJlODM2NzhjY2U0ZWIxYzBjZTMzN2IxMTYwYmRmZjA3NjE4MWQyNTFiOTY1NDAxMmZjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.s72aPRVh3RldXDTSfGBIhufURW5aqcZLFdEipnJwO0k)
달력 만들기 과제에서 이전, 다음, 현재 달로 이동하는 함수를 이렇게 구현했습니다. 코드를 다시 살펴보니 만약 오늘 날짜가 31일일 경우, nextMonth 함수가 제대로 작동하지 않는 버그가 있습니다. 31일이 없는 달이 있기 때문입니다. 이 부분에 대해서 어떻게 하면 해결할 수 있을지 같이 공부해보고 싶습니다.