Merged
Conversation
…지 넘어가는 기능 구현 amazon : html 과 css 기본 구조를 작성 / 화살표 버튼과 이미지 버튼 클릭시 이미지 넘어가는 기능 구현
js 버튼 클릭과 메뉴 클릭시의 index 변화를 하나로 통일해서 관리.
메뉴 버튼, 화살표 버튼, 슬라이드로 클래스 나누어서 구현중. 버튼 클릭시 슬라이드의 변화를 콜백 함수를 이용하여 구현하려고 함.
단어의 선택을 구현하기 위해? class를 사용하여 구조를 변경할 예정. json 파일은 임시로 이전에 사용한 amazon cardUI 의 json 파일 사용.
crongro
requested changes
Feb 26, 2020
Contributor
crongro
left a comment
There was a problem hiding this comment.
좋아요!
기능을 좀더 완성해보시죠.
리뷰는 참고해서 수정하시고요.
일단 request changes 상태로 반려해둡니다.
계속 개발하시고 커밋&푸시 하세요.
| ] | ||
| }, | ||
| { | ||
| "_id": "5b9777925890ef59b72912f7", |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
| <title>Search UI</title> | ||
| <link href="searchUI.css" rel="stylesheet" type="text/css"> | ||
| <script src="searchUI.js"></script> |
Contributor
There was a problem hiding this comment.
script선언위치가 위쪽인데, 보통은 body 마지작쪽에 선언하기도하고,(왜 그런지 알죠?)
아니면 위에 선언하고 defer나 async 속성을 추가하기도 합니다. (이렇게 추가하면 DOM파싱을 방해하지 않는다고 함)
| @@ -0,0 +1,40 @@ | |||
| window.addEventListener('DOMContentLoaded', () => { | |||
| let c = []; | |||
| .then(response => response.json()) | ||
| .then(users => { | ||
| let output = ''; | ||
| users.forEach(function (user) { |
Contributor
There was a problem hiding this comment.
고차함수안의 인자로 들어가는 함수는 간단하게 람다표기법으로 arrow function!
| .then(response => response.json()) | ||
| .then(users => { | ||
| let output = ''; | ||
| users.forEach(function (user) { |
Contributor
There was a problem hiding this comment.
forEach를 공부해서 reduce로 바꾸어보시죠.
| if (event.keyCode === 8) { | ||
| c.pop(); | ||
| } | ||
| else if (event.keyCode === 32 || (65 <= event.keyCode && event.keyCode <= 65 + 25) |
Contributor
There was a problem hiding this comment.
키코드는 주석으로 설명하던지, 변수로 저장해서 표현하던지~
| let c = []; | ||
|
|
||
| //document.getElementById('fetchUserDataBtn').addEventListener('click', fetchUserData); | ||
| document.getElementById('searchInput').addEventListener('keydown', onkeydowns); |
Contributor
There was a problem hiding this comment.
keydown과 change 이벤트 차이는 무엇일까요?
This file contains hidden or 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.
https://sally4405.github.io/demoPage/search/searchUI.html
커밋 로그를 좀 더 신경 쓰라고 하셨는데 아직 익숙하지 않아서 방학때 좋은 커밋 로그 작성법과 깃에 대해 집중적으로 공부해보고 개선하겠습니다!
json 파일은 임시로 카드 ui 때 올려놓으신 파일을 사용하였습니다. sh로 시작하는 단어로 테스트 가능하고 아직 단어를 선택하는 기능은 구현하지 못했습니다.