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

[권주현] Week2 #18

Merged
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
12 changes: 12 additions & 0 deletions css/_variables.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:root {
--primary: #6d5afe;
--red: #ff5b56;
--black: #111322;
--white: #ffffff;
--primary-gradient: linear-gradient(to right, var(--primary), #6ae3fe);
--gray-darker: #3e3e43;
--gray-dark: #9fa6b2;
--gray: #ccd5e3;
--gray-light: #e7effb;
--gray-lighter: #f0f6ff;
Comment on lines +7 to +11
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

~~er 형태의 스타일 variant도 좋지만
디자이너가 갑자기 darker와 dark사이에 색 하나 더 추가할게요~ 하면 이거 네이밍 뭐라할지 골떄리잖아요 ㅋㅋ
그래서 실무에서는 gray-### 와 같이 숫자를 적용하는 형태를 많이 활용해요
한번 그렇게 변경해보는건 어떨까요?

}
285 changes: 285 additions & 0 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,285 @@
* {
box-sizing: border-box;
}

body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
color: var(--black);
}

header {
width: 100%;
background-color: var(--gray-lighter);
display: flex;
flex-direction: column;
align-items: center;
}

footer {
width: 100%;
display: grid;
grid-template: auto / 1fr 1fr 1fr;
padding: 40px;
margin-top: 70px;
background-color: var(--black);
}

nav {
width: 100%;
max-width: 1920px;
position: fixed;
top: 0;
height: 110px;
display: flex;
align-items: center;
justify-content: space-between;
z-index: 1;
}
Comment on lines +15 to +42
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

header와 footer, 그리고 Nav가 여러 페이지에서 다양한 콤포넌트에서 활용될 수 있을텐데요
이렇게 글로벌 선언을 해두는건 위험해보입니다.
해당 스타일이 적용 될 클래스 이름을 만들어 관리해보는건 어떨까요?


@media (max-width: 1920px) {
nav {
width: 100%;
padding: 0 200px;
}

footer {
width: 100%;
padding: 40px 104px;
}
}

a {
text-decoration: none;
color: var(--white);
padding: 10px 30px;
}
Comment on lines +56 to +60
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

a태그는 인라인 요소지요
따라서 a태그에 패딩값이 적용되기 위해서는 inline-block요소로 표현되도록 수정되어야 할 거에요


/* 메인 홈페이지 스타일 */
/*-----------------------------------------------*/

.sign__button {
background: var(--primary-gradient);
border-radius: 8px;
display: flex;
justify-content: center;
align-items: center;
font-size: 22px;
font-weight: 600;
}

.sign__button,
.home__button :hover {
cursor: pointer;
}
Comment on lines +75 to +78
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

  1. button태그를 사용한다면 기본적으로 마우스 호버 시 cursor pointer가 적용될텐데 굳이 따로 명시하신 이유가 있을까요?
  2. :hover와 같이 수도 스타일링을 하고자 한다면 클래스이름과 붙어서 활용되어야 합니다! .home-button:hover 처럼요
  3. sign_button 의 호버 스타일도 하고자 했다면, sign_button:hover 처럼 여기에도 호버가 붙어야 해요


.header__content {
width: 1920px;
margin-top: 140px;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
}

.header__content h1 {
font-size: 65px;
text-align: center;
}

.header__content span {
background: linear-gradient(to right, var(--primary), #ff9f9f);
background-clip: text;
color: transparent;
}

.header__content img {
position: relative;
top: 10px;
}

.header__content a {
margin-bottom: 20px;
background: var(--primary-gradient);
border-radius: 8px;
font-size: 20px;
font-weight: 600;
display: flex;
justify-content: center;
align-items: center;
}
Comment on lines +80 to +114
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

여기서 Header가 무엇일까요?
UI 개발에서 보통 페이지 레벨의 헤더라고 칭함은 GNB 또는 최 상단에 있는 네비게이션 바를 칭합니다.
만약 hero섹션을 뜻한거라면 네이밍이 변경되어야 할 것 같아요.

Copy link
Collaborator

Choose a reason for hiding this comment

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

또한 이 구조를 잡아본다면 다음과 같이 정리를 해볼 수 있겠네요!
image


.main__card {
display: flex;
align-items: center;
justify-content: space-between;
margin: 60px auto;
gap: 160px;
}

.main__card:nth-child(even) {
flex-direction: row-reverse;
}
Comment on lines +124 to +126
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

엄청 기발한데요!! ㅋㅋ 좋습니다


.main__card--text {
width: 280px;
}

.main__card--text h2 {
font-size: 50px;
}

.main__card--text p {
color: var(--gray-darker);
}

.main__card img {
width: 500px;
height: 400px;
}
Comment on lines +116 to +143
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

요녀석도 이런 식으로 구조를 가져가보면 어떨까요?
image


#special-text-first {
background: linear-gradient(to right, #fe8a8a, #a4ceff);
background-clip: text;
color: transparent;
}

#special-text-second {
background: linear-gradient(to right, #6fbaff, #ffd88b);
background-clip: text;
color: transparent;
}

#special-text-third {
background: linear-gradient(to right, #6d7ccd, #528885);
background-clip: text;
color: transparent;
}

#special-text-fourth {
background: linear-gradient(to right, #a4ceff, #fe8a8a);
background-clip: text;
color: transparent;
}
Comment on lines +145 to +167
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

조금 더 이해가능한 네이밍을 활용해보면 어떨까요?
예를 들어

.text-gradient-pink-to-purple

처럼요!


.company-name {
color: var(--gray-dark);
}

.for-customer {
text-align: center;
}

.social-media {
text-align: end;
}

.social-media a {
padding: 10px;
}

/* 로그인/회원가입 페이지 스타일 */
/*-----------------------------------------------*/

Comment on lines +185 to +187
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97
로그인과 회원가입 각각 활용될 스타일들은 해당 폴더를 만들어 활용하는게 좋아보입니다!

index.html
/styles
- reset.css
- ui.css
- common.css
/login
- index.html
- style.css
/signup
- index.hml
- style.css

위와 같은 구조로요!

.sign__container {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: var(--gray-lighter);
}

.sign__container .logo {
width: 220px;
}

.sign__container--header {
margin-bottom: 30px;
}
Comment on lines +188 to +204
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

디자인 시안을 보면 이렇게 그룹으로 묶여있지요?
image

이거에 맞춰서 구조를 나눠보면 좋겠습니다!

.login-form {}
.login-form__header {}
.login-form__header--title(logo img) {}
.login-form__header--description {}

.login-form__body (form body) {}
.form-group {}
.form-group .label {}
.form-group .input {}
.form-group .error {}


.goto__sign {
margin-left: 30px;
color: var(--primary);
padding: 0;
font-weight: 600;
}

.form__container {
display: flex;
flex-direction: column;
align-items: center;
gap: 30px;
}

form {
display: flex;
flex-direction: column;
gap: 15px;
}

input {
width: 400px;
height: 60px;
border-radius: 8px;
border: 1px solid var(--gray);
padding-left: 10px;
}
Comment on lines +220 to +232
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

global하게 html element에 대한 스타일링을 피하는게 좋아보여요!


#email :focus,
#password :focus {
border-color: var(--primary);
}

#submit {
color: var(--white);
}
Comment on lines +234 to +241
Copy link
Collaborator

Choose a reason for hiding this comment

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

@kuum97

id가 선언될 필요는 없어보입니다!
input의 타입을 선택할 수 있는데요
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email

요 링크를 참고해 한번 해보면 어떨까요?


.social-login__container {
width: 400px;
height: 60px;
background-color: var(--gray-light);
border: 1px solid var(--gray);
border-radius: 8px;
padding: 0 10px;
display: flex;
justify-content: space-between;
align-items: center;
}

.social-login {
display: flex;
}

.social-login__button {
padding: 5px;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
margin-right: 5px;
box-shadow: 1px 2px 2px var(--gray);
}

.google {
background-color: var(--white);
}

.kakao {
background-color: #f5e14b;
}
Comment on lines +255 to +275
Copy link
Collaborator

@1005hoon 1005hoon Feb 28, 2024

Choose a reason for hiding this comment

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

@kuum97

로그인 폼 구조도 이런식으로 활용해보면 어떨까요?

/* Block */
.login-button {
  ...
}

/* pseudo-classes */
.login-button:hover {
...
}

.login-button:disabled {
...
}


.password__box {
position: relative;
}

.password_eye {
position: absolute;
right: 20px;
top: 23px;
}
9 changes: 9 additions & 0 deletions image/google_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions image/img1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions image/img2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions image/img3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions image/img4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions image/kakao_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions image/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions image/main_img.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions image/password_eye.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading