Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
6df09d4
✨ Add basic HTML structure
Yun-Jinwoo Feb 21, 2025
5489f02
🖼️ Add image files
Yun-Jinwoo Feb 21, 2025
32c1c07
✨ Add navigation bar
Yun-Jinwoo Feb 21, 2025
f82e8a5
💄 Style navigation bar
Yun-Jinwoo Feb 21, 2025
e74f34f
✨ Add top section
Yun-Jinwoo Feb 21, 2025
c93a237
💄 Style top section
Yun-Jinwoo Feb 21, 2025
756561b
✨ Add 3 main sections
Yun-Jinwoo Feb 22, 2025
614b2a3
💄 Style 3 main sections
Yun-Jinwoo Feb 22, 2025
8cf1e9b
✨ Add bottom section
Yun-Jinwoo Feb 22, 2025
38e8fed
💄 Style bottom section
Yun-Jinwoo Feb 22, 2025
e5ed30b
✨ Add footer section
Yun-Jinwoo Feb 22, 2025
36ddfdf
💄 Style footer section
Yun-Jinwoo Feb 22, 2025
bfd8337
🔗 Add links and linked pages
Yun-Jinwoo Feb 22, 2025
292b13d
🎨 Change font-sizes from px to rem
Yun-Jinwoo Feb 22, 2025
3dda2e6
🎨 Convert px to vw for responsive layout
Yun-Jinwoo Feb 22, 2025
179c2d9
Merge pull request #7 from Yun-Jinwoo/Basic-윤진우-sprint1
GANGYIKIM Feb 24, 2025
f6ccf67
🗂️ Create main page image folder and move image files
Yun-Jinwoo Feb 26, 2025
83168ce
♻️ Change logo text to image
Yun-Jinwoo Feb 26, 2025
12549d3
♻️ Replace local font files with CDN-hosted stylesheet
Yun-Jinwoo Feb 26, 2025
6ffe178
♻️ Add color variables
Yun-Jinwoo Feb 28, 2025
f0a3f64
🎨 Fix navbar to the top of the screen
Yun-Jinwoo Feb 28, 2025
e64675b
➕ Add login page HTML structure
Yun-Jinwoo Feb 28, 2025
ca6bd4f
🖼️ Add image files
Yun-Jinwoo Feb 28, 2025
b239249
🚚 Relocate logo.png for global use
Yun-Jinwoo Feb 28, 2025
47577b4
🚚 Rename style.css to home.css, and create style folder
Yun-Jinwoo Feb 28, 2025
3993c7c
✨ Add reset.css
Yun-Jinwoo Feb 28, 2025
93e56cf
💄 Style header and email, password inputs
Yun-Jinwoo Feb 28, 2025
d462a69
💄 Style login button
Yun-Jinwoo Feb 28, 2025
d60c6b2
💄 Style social login section
Yun-Jinwoo Feb 28, 2025
a13ff97
🎨 convert px to rem
Yun-Jinwoo Feb 28, 2025
3014647
💄 Style signup section
Yun-Jinwoo Feb 28, 2025
a1a55e6
💄 Add pointer cursor to buttons
Yun-Jinwoo Feb 28, 2025
6c12b18
🐛 Move img inside <a> tag
Yun-Jinwoo Feb 28, 2025
bd057ae
💄 Center align social-links
Yun-Jinwoo Feb 28, 2025
b37d889
🐛 Resolve typo in ask signup section
Yun-Jinwoo Feb 28, 2025
6f9b1bd
➕ Add signup page HTML structure
Yun-Jinwoo Feb 28, 2025
9ce1df9
💄 Style signup page
Yun-Jinwoo Feb 28, 2025
6698825
💄 Adjust size of logo image
Yun-Jinwoo Feb 28, 2025
c57bfda
🎨 Add padding to input fields
Yun-Jinwoo Feb 28, 2025
d92efce
💄 Add eye icon next to password input
Yun-Jinwoo Feb 28, 2025
2b04065
🎨 Change vw to rem for responsible layout
Yun-Jinwoo Feb 28, 2025
38ca20a
💄 Add media queries and move common styles into `base.css`
Yun-Jinwoo Mar 5, 2025
3fa63fb
♻️ Load CSS with `<link>` tag in HTML instead of `@import`
Yun-Jinwoo Mar 5, 2025
694799f
💄 Adjust nav padding
Yun-Jinwoo Mar 5, 2025
e801bcd
Merge pull request #57 from Yun-Jinwoo/Basic-윤진우-sprint2
GANGYIKIM Mar 7, 2025
12e96fd
🖼️Update image at 2X resolution
Yun-Jinwoo Mar 15, 2025
a51e5e1
🎨 Move inline style to CSS stylesheet
Yun-Jinwoo Mar 15, 2025
b04df3a
🎨 Apply Prettier formatting
Yun-Jinwoo Mar 15, 2025
d590cce
🎨 Change eye img to a button
Yun-Jinwoo Mar 15, 2025
ce31da2
🎨 Add a and button styles to reset.css
Yun-Jinwoo Mar 15, 2025
456623b
♻️ Update individual files for merging login and signup styles
Yun-Jinwoo Mar 15, 2025
b7625d7
♻️ Merge login.css and signup.css into auth.css
Yun-Jinwoo Mar 15, 2025
4bb15af
✨ Add tablet media query & update top-section styles
Yun-Jinwoo Mar 15, 2025
3c4b022
✨ Update main-section styles for tablet
Yun-Jinwoo Mar 15, 2025
fda7367
✨ Update bottom-section styles for tablet
Yun-Jinwoo Mar 15, 2025
c5f18f1
✨ Update footer styles for tablet
Yun-Jinwoo Mar 15, 2025
a8a4a7c
✨ Add Mobile media query & update styles
Yun-Jinwoo Mar 15, 2025
73dacac
♻️ Convert layout units from rem to px
Yun-Jinwoo Mar 15, 2025
5095d1e
✨ Add mobile-specific logo image
Yun-Jinwoo Mar 15, 2025
47e6f38
✨ Update footer styles for mobile
Yun-Jinwoo Mar 15, 2025
71e5ecd
✨ Add mobile media query & update styles
Yun-Jinwoo Mar 15, 2025
d503cad
✨ Add placeholder
Yun-Jinwoo Mar 15, 2025
7596bd0
🖼️Change bottom section img size
Yun-Jinwoo Mar 15, 2025
5d0ef2e
✨ add social media preview meta tags
Yun-Jinwoo Mar 15, 2025
35b3bd1
🐛 Change preview image
Yun-Jinwoo Mar 15, 2025
bdea6ce
🚚 Separate media queries to a new file
Yun-Jinwoo Mar 15, 2025
f3576f2
Merge pull request #88 from Yun-Jinwoo/Basic-윤진우-sprint3
GANGYIKIM Mar 18, 2025
7821260
✨ Update meta tags and add favicon
Yun-Jinwoo Mar 19, 2025
08c6efc
🐛 resolve Prettier formatting issue
Yun-Jinwoo Mar 19, 2025
014754a
🎨 Add and modify CSS variables
Yun-Jinwoo Mar 19, 2025
d76546e
🎨 Style improvements
Yun-Jinwoo Mar 19, 2025
309ca50
✨ Add email validation error message
Yun-Jinwoo Mar 19, 2025
cfd553d
✨ Add password validation error message
Yun-Jinwoo Mar 19, 2025
8390622
✨ Activate login button when inputs are valid
Yun-Jinwoo Mar 19, 2025
27a65ec
🎨 Style error message
Yun-Jinwoo Mar 19, 2025
b4760bb
✨ Add nickname validation error message
Yun-Jinwoo Mar 20, 2025
776fa86
✨ Add password-check validation error message
Yun-Jinwoo Mar 20, 2025
667e5bc
✨ Activate signup button when inputs are valid
Yun-Jinwoo Mar 20, 2025
d0b2a3f
♻️ Split `auth.js` into `login.js` and `signup.js`
Yun-Jinwoo Mar 20, 2025
a2dee6d
🐛 Fix password-check validation to update immediately when password c…
Yun-Jinwoo Mar 20, 2025
4ea66d7
✨ Added redirection to login page after successful signup
Yun-Jinwoo Mar 20, 2025
a155b33
✨ Added redirection to items page after successful login
Yun-Jinwoo Mar 20, 2025
37a693c
✨ Add toggle visibility feature for password input
Yun-Jinwoo Mar 20, 2025
2f524b5
✨ Show validation errors in real-time while typing
Yun-Jinwoo Mar 20, 2025
e002bea
🐛 Fix password-check error showing before input
Yun-Jinwoo Mar 20, 2025
5371f62
♻️ Create togglePasswordVisibility function
Yun-Jinwoo Mar 20, 2025
4d40cfa
♻️ Create redirectToPage function
Yun-Jinwoo Mar 20, 2025
0d8cd24
♻️ Create activateButton function
Yun-Jinwoo Mar 20, 2025
743bfd8
♻️ Refactor event listeners using forEach
Yun-Jinwoo Mar 20, 2025
024729f
♻️ Create wrongInput function
Yun-Jinwoo Mar 20, 2025
c5c40fd
♻️ Reorganize DOM element
Yun-Jinwoo Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added faq.html
Empty file.
Binary file added img/favicon.ico
Binary file not shown.
Binary file added img/home/facebook-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/instagram-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/main-img-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/main-img-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/main-img-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/panda-image-bottom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/panda-image-top.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/twitter-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/home/youtube-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/login/btn_visibility_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/login/btn_visibility_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/login/google_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/login/kakao_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/text-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
186 changes: 186 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
as="style"
crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css"
/>
<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="/style/reset.css" />
<link rel="stylesheet" href="/style/base.css" />
<link rel="stylesheet" href="/style/home.css" />
<link rel="stylesheet" href="/style/home_media.css" />
<!-- HTML Meta Tags -->
<title>판다 마켓</title>
<meta name="description" content="일상의 모든 물건을 거래해보세요" />

<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://jinwoo-sprint3.netlify.app.com" />
<meta property="og:type" content="website" />
<meta property="og:title" content="판다 마켓" />
<meta property="og:description" content="일상의 모든 물건을 거래해보세요" />
<meta
property="og:image"
content="https://opengraph.b-cdn.net/production/images/f331e6c8-51bf-4b4d-8a6d-7a8b1821ab74.jpg?token=EdcETvnVENK1yWIDZdwdSwIsoFp7dAean_BG_EyCWtg&height=612&width=612&expires=33278366876"
/>

<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain" content="jinwoo-sprint3.netlify.app.com" />
<meta
property="twitter:url"
content="https://jinwoo-sprint3.netlify.app.com"
/>
<meta name="twitter:title" content="판다 마켓" />
<meta
name="twitter:description"
content="일상의 모든 물건을 거래해보세요"
/>
<meta
name="twitter:image"
content="https://opengraph.b-cdn.net/production/images/f331e6c8-51bf-4b4d-8a6d-7a8b1821ab74.jpg?token=EdcETvnVENK1yWIDZdwdSwIsoFp7dAean_BG_EyCWtg&height=612&width=612&expires=33278366876"
/>

<!-- Meta Tags Generated via https://www.opengraph.xyz -->
</head>

<body>
<header>
<nav>
<a href="/" class="logo">
<picture>
<source srcset="img/text-logo.png" media="(max-width: 767px)" />
<img class="logo" src="img/logo.png" alt="판다마켓 로고 이미지" />
</picture>
</a>
<a href="/login.html" class="login-link">로그인</a>
</nav>
</header>

<main>
<section class="top-section">
<div class="top-section-container">
<div class="top-section-text">
<p>
일상의 모든 물건을
<br />
거래해 보세요
</p>
<a href="/items.html">구경하러 가기</a>
</div>
<img
src="img/home/panda-image-top.png"
alt="귀여운 판다 한마리가 서있는 이미지"
/>
</div>
</section>
<section class="main-section">
<div class="hot-item">
<img
src="img/home/main-img-1.png"
alt="인기 있는 옷을 바라보는 판다 두마리의 뒷모습"
class="hot-item-img"
/>
<div class="text-container">
<div class="small-text">Hot item</div>
<div class="big-text">
인기 상품을
<br />
확인해 보세요
</div>
<p>
가장 HOT한 중고거래 물품을
<br />
판다 마켓에서 확인해 보세요
</p>
</div>
</div>
</section>
<section class="main-section">
<div class="search">
<div class="text-container">
<div class="small-text">Search</div>
<div class="big-text">
구매를 원하는
<br />
상품을 검색하세요
</div>
<p>
구매하고 싶은 물품은 검색해서
<br />
쉽게 찾아보세요
</p>
</div>
<img
src="img/home/main-img-2.png"
alt="원하는 상품을 검색하는 이미지"
class="search-img"
/>
</div>
</section>
<section class="main-section">
<div class="register">
<img
src="img/home/main-img-3.png"
alt="연필, 필통, 도서, 안경 같은 물건을 등록하는 이미지"
class="register-img"
/>
<div class="text-container">
<div class="small-text">Register</div>
<div class="big-text">
판매를 원하는
<br />
상품을 등록하세요
</div>
<p>
어떤 물건이든 판매하고 싶은 상품을
<br />
쉽게 등록하세요
</p>
</div>
</div>
</section>
<section class="bottom-section">
<div class="bottom-section-container">
<div class="bottom-section-text">
<p>
믿을 수 있는
<br />
판다마켓 중고 거래
</p>
</div>
<img
src="img/home/panda-image-bottom.png"
alt="귀여운 판다 두마리가 중고 거래하는 이미지"
/>
</div>
</section>
</main>

<footer>
<div class="codeit">©codeit - 2024</div>
<div class="footer-center">
<a href="/privacy.html" class="privacy-policy">Privacy Policy</a>
<a href="/faq.html" class="faq">FAQ</a>
</div>
<div class="footer-right">
<a href="https://www.facebook.com" target="_blank">
<img src="img/home/facebook-icon.png" alt="페이스북 로고" />
</a>
<a href="https://www.twitter.com" target="_blank">
<img src="img/home/twitter-icon.png" alt="트위터 로고" />
</a>
<a href="https://www.youtube.com" target="_blank">
<img src="img/home/youtube-icon.png" alt="유튜브 로고" />
</a>
<a href="https://www.instagram.com" target="_blank">
<img src="img/home/instagram-icon.png" alt="인스타그램 로고" />
</a>
</div>
</footer>
</body>
</html>
Empty file added items.html
Empty file.
46 changes: 46 additions & 0 deletions js/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* 에러 메시지 처리 */
function wrongInput(input, span, validateFunction) {
const errorMessage = validateFunction(input);
if (errorMessage) {
input.classList.add("warning");
input.classList.remove("done");
span.textContent = errorMessage;
} else {
input.classList.remove("warning");
input.classList.add("done");
span.textContent = "";
}
input.parentElement.appendChild(span);
if (span.textContent === "") {
input.parentElement.removeChild(span);
}
}

/* 눈모양 버튼 클릭시 비밀번호 보이기 / 가리기 */
function togglePasswordVisibility(button) {
const passwordInput = button.previousElementSibling;
if (passwordInput.type === "password") {
passwordInput.type = "text";
button.classList.add("visible");
} else {
passwordInput.type = "password";
button.classList.remove("visible");
}
}

/* inputs에 모두 done 클래스가 있다면 버튼 활성화 */
function activateButton(button, inputs) {
if (inputs.every((input) => input.classList.contains("done"))) {
button.disabled = false;
} else {
button.disabled = true;
}
}

// 버튼 클릭시 특정 페이지로 이동
function redirectToPage(event, redirectUrl) {
event.preventDefault();
window.location.href = redirectUrl;
}

export { wrongInput, togglePasswordVisibility, activateButton, redirectToPage };
76 changes: 76 additions & 0 deletions js/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import {
wrongInput,
togglePasswordVisibility,
activateButton,
redirectToPage,
} from "./common.js";

const emailInput = document.querySelector("#input-email");
const passwordInput = document.querySelector("#input-password");
const loginButton = document.querySelector(".login-page .submit-button");
const loginForm = document.querySelector(".login-page .form-container");

const wrongEmail = document.createElement("span");
const wrongPassword = document.createElement("span");

const inputArray = [emailInput, passwordInput];

wrongEmail.classList.add("error-message");
wrongPassword.classList.add("error-message");

loginButton.disabled = true;

function validateEmail(input) {
if (input.value === "") {
return "이메일을 입력해주세요.";
} else if (!input.checkValidity()) {
return "잘못된 이메일 형식입니다.";
}
}

function validatePassword(input) {
if (input.value === "") {
return "비밀번호를 입력해주세요.";
} else if (input.value.length < 8) {
return "비밀번호를 8자 이상 입력해주세요.";
}
}

/* email 에러 메시지 처리 */
emailInput.addEventListener("focusout", () =>
wrongInput(emailInput, wrongEmail, validateEmail)
);
emailInput.addEventListener("input", () =>
wrongInput(emailInput, wrongEmail, validateEmail)
);

/* password 에러 메시지 처리 */
passwordInput.addEventListener("focusout", () =>
wrongInput(passwordInput, wrongPassword, validatePassword)
);
passwordInput.addEventListener("input", () =>
wrongInput(passwordInput, wrongPassword, validatePassword)
);

/* email, password에 유효한 값이 입력되면 로그인 페이지 버튼 활성화 */
inputArray.forEach((input) => {
input.addEventListener("input", () =>
activateButton(loginButton, inputArray)
);
});

inputArray.forEach((input) => {
input.addEventListener("focusout", () =>
activateButton(loginButton, inputArray)
);
});

/* 로그인 버튼 클릭시 items 페이지로 이동 */
loginForm.addEventListener("submit", (event) =>
redirectToPage(event, "/items.html")
);

/* 눈모양 버튼 클릭시 */
document.querySelectorAll(".visibility").forEach((button) => {
button.addEventListener("click", () => togglePasswordVisibility(button));
});
Loading
Loading