-
Notifications
You must be signed in to change notification settings - Fork 31
[곽지훈] sprint 3,4 #159
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
Merged
dongqui
merged 3 commits into
codeit-bootcamp-frontend:Basic-곽지훈
from
jihoon135:Basic-곽지훈-sprint3
May 20, 2025
The head ref may contain hidden characters: "Basic-\uACFD\uC9C0\uD6C8-sprint3"
Merged
[곽지훈] sprint 3,4 #159
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| :root { | ||
| --gray900: #111827; | ||
| --gray800: #1f2937; | ||
| --gray700: #374151; | ||
| --gray600: #4b5563; | ||
| --gray500: #6b7280; | ||
| --gray400: #9ca3af; | ||
| --gray300: #d1d5db; | ||
| --gray200: #e5e7eb; | ||
| --gray100: #f3f4f6; | ||
| --gray50: #f9fafb; | ||
| --blue: #3692ff; | ||
| } | ||
|
|
||
| * { | ||
| box-sizing: border-box; | ||
| font-family: 'Pretendard Variable'; | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,27 +4,47 @@ | |
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <link rel="stylesheet" href="/panda_market_login.css" /> | ||
| <link rel="stylesheet" href="/global.css" /> | ||
| <title>판다마켓 로그인 페이지</title> | ||
| </head> | ||
| <body> | ||
| <div class="login__container"> | ||
| <div class="logo__container"> | ||
| <a href="/"> | ||
| <img src="../img/panda__face.png" alt="판다얼굴" /> | ||
| <img src="/assets/img/panda__face.png" alt="판다얼굴" /> | ||
| </a> | ||
| <div class="logo__text">판다마켓</div> | ||
| </div> | ||
| <div class="login__input__text">이메일</div> | ||
| <input class="login__input" placeholder="이메일을 입력해주세요." /> | ||
|
|
||
| <div class="login__input__text">비밀번호</div> | ||
| <label class="login__input__text" for="email">이메일</label> | ||
| <input | ||
| id="email" | ||
| class="login__input" | ||
| type="password" | ||
| placeholder="비밀번호를 입력하세요" | ||
| type="text" | ||
| placeholder="이메일을 입력해주세요." | ||
| /> | ||
| <p class="error-message" id="email-error"></p> | ||
|
|
||
| <!-- 비밀번호 --> | ||
| <label class="login__input__text" for="password">비밀번호</label> | ||
| <div class="password__wrapper"> | ||
| <input | ||
| id="password" | ||
| class="login__input" | ||
| type="password" | ||
| placeholder="비밀번호를 입력하세요" | ||
| /> | ||
| <img | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아이콘에 기능이 있다면 버튼으로 감싸주시거나 aria-label 등을 활용해 주시면 접근성에 좋습니다 :) |
||
| src="/assets/icons/icon-eye-off.svg" | ||
| alt="비밀번호 보기 토글" | ||
| class="toggle-password" | ||
| id="toggle-password" | ||
| /> | ||
| </div> | ||
| <p class="error-message" id="password-error"></p> | ||
|
|
||
| <!-- 로그인 버튼 --> | ||
| <div> | ||
| <button class="login__button">로그인</button> | ||
| <button class="login__button" id="login-btn" disabled>로그인</button> | ||
| </div> | ||
| <div class="snsAuth__container"> | ||
| <span>간편 로그인하기</span> | ||
|
|
@@ -34,14 +54,14 @@ | |
| target="_blank" | ||
| class="snsAuth__icon" | ||
| > | ||
| <img src="../img/Component 2.png" alt="구글 아이콘" /> | ||
| <img src="/assets/img/Component 2.png" alt="구글 아이콘" /> | ||
| </a> | ||
| <a | ||
| href="https://www.kakaocorp.com/page/" | ||
| target="_blank" | ||
| class="snsAuth__icon" | ||
| > | ||
| <img src="../img/Component 3.png" alt="카카오톡 아이콘" /> | ||
| <img src="/assets/img/Component 3.png" alt="카카오톡 아이콘" /> | ||
| </a> | ||
| </div> | ||
| </div> | ||
|
|
@@ -52,3 +72,83 @@ | |
| </div> | ||
| </body> | ||
| </html> | ||
|
|
||
| <script> | ||
| const emailInput = document.getElementById('email'); | ||
| const passwordInput = document.getElementById('password'); | ||
| const loginBtn = document.getElementById('login-btn'); | ||
| const emailError = document.getElementById('email-error'); | ||
| const passwordError = document.getElementById('password-error'); | ||
| const togglePasswordIcon = document.getElementById('toggle-password'); | ||
| let passwordVisible = false; | ||
|
|
||
| function validateEmail(email) { | ||
| const pattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; | ||
| return pattern.test(email); | ||
| } | ||
|
|
||
| function validateForm() { | ||
| const email = emailInput.value.trim(); | ||
| const password = passwordInput.value.trim(); | ||
|
|
||
| const emailValid = email && validateEmail(email); | ||
| const passwordValid = password && password.length >= 8; | ||
|
|
||
| loginBtn.disabled = !(emailValid && passwordValid); | ||
| } | ||
|
|
||
| togglePasswordIcon.addEventListener('click', () => { | ||
| passwordVisible = !passwordVisible; | ||
| passwordInput.type = passwordVisible ? 'text' : 'password'; | ||
|
|
||
| // 아이콘 이미지 변경 | ||
| togglePasswordIcon.src = passwordVisible | ||
| ? '/assets/icons/icon-eye.svg' // 눈 뜬 아이콘 | ||
| : '/assets/icons/icon-eye-off.svg'; // 눈 감은 아이콘 | ||
| }); | ||
|
|
||
| emailInput.addEventListener('focusout', () => { | ||
| const value = emailInput.value.trim(); | ||
| if (!value) { | ||
| emailInput.classList.add('error'); | ||
| emailError.textContent = '이메일을 입력해주세요.'; | ||
| } else if (!validateEmail(value)) { | ||
| emailInput.classList.add('error'); | ||
| emailError.textContent = '잘못된 이메일 형식입니다.'; | ||
| } else { | ||
| emailInput.classList.remove('error'); | ||
| emailError.textContent = ''; | ||
| } | ||
| validateForm(); | ||
| }); | ||
|
|
||
| passwordInput.addEventListener('focusout', () => { | ||
| const value = passwordInput.value.trim(); | ||
| if (!value) { | ||
| passwordInput.classList.add('error'); | ||
| passwordError.textContent = '비밀번호를 입력해주세요.'; | ||
| } else if (value.length < 8) { | ||
| passwordInput.classList.add('error'); | ||
| passwordError.textContent = '비밀번호를 8자 이상 입력해주세요.'; | ||
| } else { | ||
| passwordInput.classList.remove('error'); | ||
| passwordError.textContent = ''; | ||
| } | ||
| validateForm(); | ||
| }); | ||
|
|
||
| emailInput.addEventListener('input', () => { | ||
| validateForm(); | ||
| }); | ||
|
|
||
| passwordInput.addEventListener('input', () => { | ||
| validateForm(); | ||
| }); | ||
|
|
||
| loginBtn.addEventListener('click', (e) => { | ||
| e.preventDefault(); | ||
| if (!loginBtn.disabled) { | ||
| window.location.href = './items.html'; | ||
| } | ||
| }); | ||
| </script> | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.