Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 14 additions & 2 deletions global.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
:root {
--gray900: #111827;
--gray800: #1f2937;
--gray700: #374151;
--gray600: #4b5563;
--gray500: #6b7280;
--gray400: #9ca3af;
--gray300: #e5e7eb;
--gray200: #f3f4f6;
--gray100: #f9fafb;

--primary-color: #3692ff;
}

body {
font-family: "Pretendard-Regular", Arial, Helvetica, sans-serif;
padding: 0;
margin: 0;
}


Binary file added image/Component 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 image/Component 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 image/btn_visibility_off_24px.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 image/logo_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<a href="/">
<img src="image/logo.png" alt="판다마켓 로고" />
</a>
<a href="/login">
<a href="login.html">
<button class="login-button">로그인</button>
</a>
</nav>
Expand Down
94 changes: 94 additions & 0 deletions login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

header {
margin-top: 231px;
}

main {
display: flex;
flex-direction: column;
gap: 24px;
}

form,
label {
width: 640px;
display: flex;
flex-direction: column;
gap: 16px;
}

label {
font-weight: 700;
}

input {
height: 36px;
background-color: var(--gray100);
border: 0;
border-radius: 12px;
padding: 10px 24px;
font-size: 16px;
flex-grow: 1;
}

form button {
padding: 16px 0px;
border: 0;
border-radius: 40px;
background-color: var(--primary-color);
color: #fff;
font-size: 20px;
font-weight: 600;
cursor: pointer;
}

.password-container {
display: inline-flex;
position: relative;
}

.password-container>button {
position: absolute;
background-color: transparent;
right: 20px;
top: 0px;
z-index: 1;
}

.easy-login-container {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #e6f2ff;
border-radius: 8px;
padding: 16px 23px;
font-size: 16px;
font-weight: 500;
}

.easy-login-icon {
display: flex;
gap: 16px;
}

.easy-login-icon>button {
background-color: transparent;
border: 0;
padding: 0;
margin: 0;
cursor: pointer;
}

footer {
margin-top: 16px;
}

footer>a {
color: var(--primary-color);
}
56 changes: 56 additions & 0 deletions login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="ko">

Copy link
Collaborator

@addiescode-sj addiescode-sj Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: CSS를 연결하는 방식 차이에서도 비교할점이 있다는 것을 알고계실까요?

지금과 같이 HTML에서 여러개의 CSS파일을 import하게되면: CSS 파일을 병렬로 로드하기때문에 큰 CSS 파일이나 많은 CSS파일이 있는 경우 성능적으로 유리합니다. 다만, 모든 html 파일마다 import문을 반복해야하고 css파일간 의존성이 있다면 html단에서 관리해야하는 단점이 생겨 파일이 많아질수록 관리가 어려워집니다.

CSS에서 @import를 사용해 로드하게되면: @import는 병렬적으로 로드되는게아니라, 순차적으로 로드되므로 파일이 많으면 다소 성능이 저하될수있습니다. 하지만 CSS 파일 간의 의존성을 CSS 내부에서 관리할 수 있어 모듈화에 용이합니다. 따라서 작은 CSS 파일이 많고 의존성이 복잡할 경우 이 방식을 채택하시는게 좋습니다.

지금과 같이 파일 크기가 크지않다면 CSS 파일안에서 @import를 사용하시는게 구조화에는 더 도움이 될 거예요.

CSS 전처리기 (Sass, Less)나 번들러를 사용하면 두 방식을 장점을 합친 방식으로 관리하면서도 스타일 충돌과 중복을 줄일 수 있기때문에,
지금은 global.css, reset.css와 같이 명확하게 용도를 나눠 의존성을 관리하는것을 목표로 잡고
다음 단계로 넘어가기전에 병렬 처리를 하면 왜 성능에 도움이 된다는건지 미리 학습해보시면 좋을 듯합니다 :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global.css 하나를 html문서 안에서 link하고, global.css안에서 style.css나 login.css를 @import로 가져오면 되는걸까요?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전부 @import로 가져오는 방식으로 지금은 통일하시는게 좋을것같아요~!

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="login.css" />
<link rel="stylesheet" href="global.css" />
<title>판다마켓</title>
</head>

<body>
<div id="wrapper">
<header>
<a href="index.html">
<img src="image/logo_big.png" width="396px" alt="판다마켓 로고">
</a>
</header>
<main>
<section>
<form>
<label for="email">
<span>이메일</span>
<input type="email" name="email" placeholder="codeit@email.com" autocomplete="on">
</label>
<label for="password">
<span>비밀번호</span>
<div class="password-container">
<input type="password" name="password" placeholder="비밀번호">
<button type="button" id="pw-visible">
<img src="image/btn_visibility_off_24px.png" alt="비밀번호 가리기">
</button>
</div>
</label>
<button type="submit">로그인</button>
</form>
</section>
<section class="easy-login-container">
<span>간편 로그인하기</span>
<div class="easy-login-icon">
<a href="https://www.google.com/" target="_blank" rel="noopener noreferrer"><img src="image/Component 2.png"
alt="간편로그인 구글"></a>

<a href="https://www.kakaocorp.com/page/" target="_blank" rel="noopener noreferrer"><img
src="image/Component 3.png" alt="간편로그인 카카오"></a>
</div>
</section>
</main>
<footer>
<span>판다마켓이 처음이신가요?</span>
<a href="signup.html">회원가입</a>
</footer>
</div>
</body>

</html>
69 changes: 69 additions & 0 deletions signup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="ko">

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="login.css" />
<link rel="stylesheet" href="global.css" />
<title>판다마켓</title>
</head>

<body>
<div id="wrapper">
<header>
<a href="index.html">
<img src="image/logo_big.png" width="396px" alt="판다마켓 로고">
</a>
</header>
<main>
<section>
<form>
<label for="email">
<span>이메일</span>
<input type="email" name="email" placeholder="codeit@email.com" autocomplete="on">
</label>
<label for="nickname">
<span>닉네임</span>
<input type="text" name="nickname" placeholder="판다" autocomplete="on">
</label>
<label for="password">
<span>비밀번호</span>
<div class="password-container">
<input type="password" name="password" placeholder="비밀번호">
<button type="button" id="pw-visible" aria-label="비밀번호 표시/숨기기">
<img src="image/btn_visibility_off_24px.png" alt="비밀번호 가리기">
</button>
</div>
</label>
<label for="password-confirm">
<span>비밀번호 확인</span>
<div class="password-container">
<input type="password" name="password-confirm" placeholder="비밀번호">
<button type="button" id="pw-visible" aria-label="비밀번호 표시/숨기기">
<img src="image/btn_visibility_off_24px.png" alt="비밀번호 가리기">
</button>
</div>
</label>
<button type="submit">회원가입</button>
</form>
</section>
<section class="easy-login-container">
<span>간편 로그인하기</span>
<div class="easy-login-icon">
<a href="https://www.google.com/" target="_blank" rel="noopener noreferrer"><img src="image/Component 2.png"
alt="간편로그인 구글"></a>
<a href="https://www.kakaocorp.com/page/" target="_blank" rel="noopener noreferrer"><img
src="image/Component 3.png" alt="간편로그인 카카오"></a>
</div>
</section>
</main>
<footer>
<span>이미 회원이신가요?</span>
<a href="login.html">로그인</a>
</footer>
</div>
</body>


</html>
7 changes: 3 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
src: url("https://fastly.jsdelivr.net/gh/Project-Noonnu/noonfonts_2107@1.1/Pretendard-Regular.woff") format("woff");
}

:root {
--primary-color: #3692ff;
}

header {
background-color: #fff;
width: 100%;
height: 70px;
padding: 9px;
display: flex;
justify-content: center;
position: fixed;
top: 0;
}

header img {
Expand Down
Loading