Skip to content
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

Jihykim2 HTML + CSS, JS 제출 #12

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
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.
37 changes: 37 additions & 0 deletions v1/frontend/HTML+CSS_LV_0_아무것도_모르는데요/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Login Page</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<div id="loginPage">
<section class="leftLoginPage">
<div class="serviceTitle">
<p>42서울 캐비닛 서비스</p>
<p class="fontPurple">여러분의 일상을 가볍게</p>
</div>
<div class="serviceImage">
<img src="images/undraw_work_in_progress_re_byic 1.svg"/>
</div>
<div class="serviceSubtitle">
<p><span class="fontPurple">Cabi</span>로</p>
<p>일상의 무게를 덜어보세요.</p>
</div>
</section>
<section class="rightLoginPage">
<div class="loginModal">
<div class="logoImage">
<img src="images/logo.svg"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

로고가 70px * 70px 여야 요청사항에 부합합니다!

</div>
<div class="logoTitle">
<p>42Cabi</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Cabi 입니당!

Copy link
Author

Choose a reason for hiding this comment

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

아니,, 온보딩 피그마가 달랐어요,,,, 억울합니다,,,

<p class="subTitle fontPurple">여러분의 일상을 가볍게</p>
</div>
<button class="loginButton">L O G I N</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

font-weight: 300; 으로 하시면 원본 페이지와 더 동일할 것 같습니다!

</div>
</section>
</div>
</body>
</html>
64 changes: 64 additions & 0 deletions v1/frontend/HTML+CSS_LV_0_아무것도_모르는데요/reset.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

/* Button reset */
button {
background: none;
border: none;
padding: 0;
box-shadow: none;
border-radius: 0;
cursor: pointer;
font: inherit;
color: inherit;
outline: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
116 changes: 116 additions & 0 deletions v1/frontend/HTML+CSS_LV_0_아무것도_모르는데요/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:[email protected]&display=swap");
@import url("reset.css");

/* all */
html, body, #loginPage {
width: 100vw;
height: 100vh;
font-family: "Noto Sans KR";
Copy link
Contributor

Choose a reason for hiding this comment

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

font-family 에 family-name으로 지정된 글꼴 (Noto Sans KR)을 사용할 수 없을 경우를 대비해서 브라우저가 대체할 수 있는 폰트를 설정해주는 것이 좋습니다!

font-family: 'Noto Sans KR', sans-serif;

}

#loginPage {
display: flex;
flex-direction: row;
}

/* colors */
.fontPurple {
color: #B18CFF;
Copy link
Contributor

Choose a reason for hiding this comment

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

색깔은 CSS 변수를 사용해서 관리하는 것이 좋습니다!
만약 font 색깔을 class 로 관리한다면, 먼저 변수를 만들고 class 를 쓰는 방법도 있을 것 같습니다.

:root {
  --white: #FFFFFF
  --primary-color: #9747FF;
  --secondary-color: #B18CFF;
  --bg-color: var(--white);
 }

.text-main {
  color: var(--primary-color);
}

.text-sub {
  color: var(--secondary-color);
}

}

/* margin, padding */
div p {
padding: 10px 0;
}

/* contents */
.leftLoginPage {
display: flex;
flex-direction: column;
justify-content: center;

width: 50%;
height: 100%;
padding-left: 7%;
box-sizing: border-box;

.serviceTitle {
font-size: 32px;
font-weight: 700;
}

.serviceImage {
width: 446px;
height: 388px;
padding: 10% 10%;
Copy link
Contributor

Choose a reason for hiding this comment

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

padding: 10% 0; 이여야 원본 페이지와 이미지 위치가 맞습니다!

}

.serviceSubtitle {
font-size: 28px;
font-weight: 700;

.fontPurple {
color: #9747FF;
Copy link
Contributor

Choose a reason for hiding this comment

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

.fontPurple 이 두개인데 둘의 색깔이 다릅니다! 이대로 유지하신다면, Purple 과 LightPurple 로 이름에 구분을 주셔야 할 것 같아요

}
}
}

.rightLoginPage {
display: flex;
justify-content: center;
align-items: center;

width: 50%;
height: 100%;
background-color: #9747FF;

.loginModal {
Copy link
Contributor

Choose a reason for hiding this comment

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

BEM 네이밍 컨벤션을 적용하면 재사용성과 가독성을 더 높힐 수 있어 보입니다!

이름을 유지하면서 BEM (Block Element Modifier) 컨벤션을 적용하면 아래처럼 될 것 같아요:

.login-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 360px;
  height: 500px;
  background-color: #FFFFFF;
  border-radius: 20px;
  box-sizing: border-box;
  padding: 85px 0;
  box-shadow: 10px 10px 40px 0px #00000040;
}

.login-modal__logo-image {
  width: 70px;
  height: 70px;
}

.login-modal__logo-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 40px;
}

.login-modal__sub-title {
  font-size: 16px;
}

.login-modal__login-button {
  width: 200px;
  height: 60px;
  border-radius: 6px;
  background-color: #9747FF;
  color:#FFFFFF;
  font-size: 18px;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

추가적으로, 이름에 login 이 두번 붙으면 클래스명이 너무 길어질 수 있으니 .login-modal 들을 .card .card__logo, .card__title 등으로 바꾸는 것도 좋아보입니다!

display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
width: 360px;
height: 500px;
background-color: #FFFFFF;
Copy link
Contributor

Choose a reason for hiding this comment

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

background-color 도 CSS 변수로 관리하시는게 깔끔하고 좋습니다!

border-radius: 20px;
Copy link
Contributor

Choose a reason for hiding this comment

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

border-radius: 10px; 로 하셔야 원본 페이지에 더 부합합니다!

box-sizing: border-box;
padding: 85px 0;
box-shadow: 10px 10px 40px 0px #00000040;
Copy link
Contributor

Choose a reason for hiding this comment

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

box-shadow 의 색깔도 CSS 변수로 관리하시는게 깔끔하고 좋습니다!


.logoImage {
width: 70px;
height: 70px;
}

.logoTitle {
display: flex;
flex-direction: column;
align-items: center;
font-size: 40px;

.subTitle {
font-size: 16px;
}
}

.loginButton {
width: 200px;
height: 60px;
border-radius: 6px;
background-color: #9747FF;
color:#FFFFFF;
font-size: 18px;
}
}
}

/* bonus */
@media (max-width: 768px) {
.leftLoginPage {
display: none;
}

.rightLoginPage {
width: 100%;
}
}
Loading