Skip to content

Conversation

@ozen0718
Copy link
Collaborator

@ozen0718 ozen0718 commented Jan 13, 2025

요구사항

기본

  • - 브라우저에 현재 보이는 화면의 영역(viewport) 너비를 기준으로 분기되는 반응형 디자인을 적용합니다.
    -PC: 1200px 이상
    -Tablet: 768px 이상 ~ 1199px 이하
    -Mobile: 375px 이상 ~ 767px 이하
    -375px 미만 사이즈의 디자인은 고려하지 않습니다.

랜딩 페이지

  • - Tablet 사이즈로 작아질 때 “판다마켓” 로고의 왼쪽에 여백 24px, “로그인” 버튼 오른쪽 여백 24px을 유지할 수 있도록 “판다마켓” 로고와 “로그인" 버튼의 간격이 가까워집니다.
  • - Mobile 사이즈로 작아질 때 “판다마켓” 로고의 왼쪽에 여백 16px, “로그인” 버튼 오른쪽 여백 16px을 유지할 수 있도록 “판다마켓” 로고와 “로그인" 버튼의 간격이 가까워집니다.
  • -화면 영역이 줄어들면 “Privacy Policy”, “FAQ”, “codeit-2024”이 있는 영역과 SNS 아이콘들이 있는 영역의 간격이 줄어듭니다.

로그인, 회원가입 페이지 공통

  • -Tablet 사이즈에서 내부 디자인은 PC사이즈와 동일합니다.“https://www.kakaocorp.com/page/”
  • - Mobile 사이즈에서 좌우 여백 16px 제외하고 내부 요소들이 너비를 모두 차지합니다.
  • - Mobile 사이즈에서 내부 요소들의 너비는 기기의 너비가 커지는 만큼 커지지만 400px을 넘지 않습니다.

심화

  • - 페이스북, 카카오톡, 디스코드, 트위터 등 SNS에서 Linkbrary 랜딩 페이지(“/”) 공유 시 좌측 예시와 같은 미리보기를 볼 수 있도록 랜딩 페이지 메타 태그를 설정해 주세요.
  • - 미리보기에서 제목은 “판다 마켓”, 설명은 “일상의 모든 물건을 거래해보세요”로 설정합니다.
  • - 주소와 이미지는 자유롭게 설정하세요.

주요 변경사항

스크린샷

멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

@ozen0718 ozen0718 added the 매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다. label Jan 13, 2025
@ozen0718 ozen0718 changed the base branch from main to React-임용균 January 13, 2025 04:52
@ozen0718 ozen0718 changed the base branch from React-임용균 to Basic-임용균 January 13, 2025 04:52
@ozen0718 ozen0718 changed the title Basic 임용균 sprint3 [임용균] Sprint3 Jan 17, 2025
@kiJu2
Copy link
Collaborator

kiJu2 commented Jan 18, 2025

스프리트 미션 하시느라 수고 많으셨어요.
학습에 도움 되실 수 있게 꼼꼼히 리뷰 하도록 해보겠습니다. 😊

Comment on lines +48 to +55
<div class="feature">
<img src="images/home/feature2-image.png"/>
<div class="feature-content">
<h2>Search</h2>
<h1>구매를 원하는 <span class="break-on-desktop"><br /></span>상품을 검색하세요</h1>
<p class="feature-description">
구매하고 싶은 물품은 검색해서<br />쉽게 찾아보세요
</p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

<h1> 태그는 문서에 하나만 넣는게 어떨까요?

Suggested change
<div class="feature">
<img src="images/home/feature2-image.png"/>
<div class="feature-content">
<h2>Search</h2>
<h1>구매를 원하는 <span class="break-on-desktop"><br /></span>상품을 검색하세요</h1>
<p class="feature-description">
구매하고 싶은 물품은 검색해서<br />쉽게 찾아보세요
</p>
<div class="feature">
<img src="images/home/feature2-image.png"/>
<div class="feature-content">
<h2>Search</h2>
<h3>구매를 원하는 <span class="break-on-desktop"><br /></span>상품을 검색하세요</h3>
<p class="feature-description">
구매하고 싶은 물품은 검색해서<br />쉽게 찾아보세요
</p>

이하 MDN 발췌

페이지 당 하나의 <h1>만 사용하세요. 여러 개를 써도 오류는 나지 않겠지만, 단일 <h1>이 모범 사례로 꼽힙니다. 논리적으로 생각했을 때도, <h1>은 가장 중요한 제목이므로 전체 페이지의 목적을 설명해야 할 것입니다. 두 개의 제목을 가진 책이나, 여러 개의 이름을 가진 영화는 볼 수 없죠! 또한 스크린 리더 사용자와 SEO에도 더 적합합니다.

MDN <h1>-<h6>: HTML 구획 제목 요소

Comment on lines +84 to +97
<div id="socialMedia">
<a href="https://www.facebook.com/" target="_blank" rel="noopener noreferrer">
<img src="images/social/facebook-logo.svg" width="20" />
</a>
<a href="https://twitter.com/" target="_blank" rel="noopener noreferrer">
<img src="images/social/twitter-logo.svg" width="20" />
</a>
<a href="https://www.youtube.com/" target="_blank" rel="noopener noreferrer">
<img src="images/social/youtube-logo.svg" width="20" />
</a>
<a href="https://www.instagram.com/" target="_blank" rel="noopener noreferrer">
<img src="images/social/instagram-logo.svg" width="20" />
</a>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

(제안/선택)요소들이 순서 없는 목록을 의미한다면 <ul><li>로도 나타낼 수 있습니다 !

<ul class="footer-social">
  <li>
	<a target="_blank" href="https://www.facebook.com/">
	  <img src="images/ic_facebook.svg" alt="페이스북" />
	</a>
  </li>
  <li>
	<a target="_blank" href="https://www.twitter.com/">
	  <img src="images/ic_twitter.svg" alt="트위터" />
	</a>
  </li>
  <li>
	<a target="_blank" href="https://www.youtube.com/">
	  <img src="images/ic_youtube.svg" alt="유튜브" />
	</a>
  </li>
  <li>
	<a target="_blank" href="https://www.instagram.com/">
	  <img src="images/ic_instagram.svg" alt="인스타그램" />
	</a>
  <li>
</ul>

MDN: HTML <ul> 요소는 정렬되지 않은 목록을 나타냅니다. 보통 불릿으로 표현합니다.

li 태그의 기본 스타일을 제거하고 싶다면 다음과 같이 작성할 수 있습니다 ! { list-style: none; }

<img src="images/logo/logo.svg" />
</a>

<form method="post">
Copy link
Collaborator

Choose a reason for hiding this comment

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

굿굿 ! form 태그로 잘 감싸셨군요 👍

Comment on lines +23 to +24
<label for="email">이메일</label>
<input id="email" name="email" type="email" placeholder="이메일을 입력해 주세요" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

inputlabel이 적절하게 연결되었습니다 👍

Comment on lines +23 to +24
<label for="email">이메일</label>
<input id="email" name="email" type="email" placeholder="이메일을 입력해 주세요" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

프로퍼티들도 적절하군요 !

고려해볼 수 있을만한 것은 namerequired도 고려해볼 수 있겠네요 ㅎㅎ

  • name: name<form>을 사용해서 추 후 submit을 사용하여 접근할 때 사용될 수 있습니다.
  • required: required<form> 내부에서 서식을 작성하지 않았을 때 브라우저에서 유저에게 피드백을 줄 수 있습니다.

Copy link
Collaborator

Choose a reason for hiding this comment

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

또한 <input>에 대한 속성과 관련하여

<input>에는 용이한 속성들이 상당히 많습니다 !

  • 숫자의 범위를 지정하는 max, min
  • 글자 수를 제한하는 maxLenght, minLenght
  • 그 외 의외의 typedate, email, file, image ...
    제공되는 유용한 속성들을 모르고 개발하게 되면 자바스크립트로 만들게 되는 경우도 있어요.

예를 들어서 max라는 속성을 모르면 input 값이 입력되었을 때 값에 대한 유효성 검사를 하고 input에 값을 넣어주는 번거로운 일도 할 수도 있어요.
(제가 처음 개발할 때 그랬습니다... 🥲)

특히 리액트로 넘어가게되면 javascript가 html 접근하는 허들이 낮아지면서 위와 같은 사례가 종종 보여요.

그래서 **특히 input과 관련하여서는 꼭 한번 즈음 mdn 공식 문서를 처음부터 끝까지 러프하게라도 읽어보시는걸 추천드려요.

Comment on lines 2 to 15
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>판다마켓 - 회원가입</title>
<link rel="icon" href="images/logo/favicon.ico" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css"
/>
<link rel="stylesheet" href="styles/global.css" />
<link rel="stylesheet" href="styles/sign.css" />
</head>
<body>
Copy link
Collaborator

Choose a reason for hiding this comment

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

프리티어를 사용해보시는거 어떨까요 ?

Suggested change
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>판다마켓 - 회원가입</title>
<link rel="icon" href="images/logo/favicon.ico" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css"
/>
<link rel="stylesheet" href="styles/global.css" />
<link rel="stylesheet" href="styles/sign.css" />
</head>
<body>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>판다마켓 - 회원가입</title>
<link rel="icon" href="images/logo/favicon.ico" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css"
/>
<link rel="stylesheet" href="styles/global.css" />
<link rel="stylesheet" href="styles/sign.css" />
</head>
<body>

사소한 줄바꿈, 띄어쓰기 등 코드를 작성하시다보면 자연스럽게 불규칙해지는 경우가 많아요.
이를 돕기 위해서 개발 커뮤니티에서는 개발 경험 향상을 위한 여러가지 도구들이 있는데요.

보편적으로 많이 사용되는 툴은 prettier입니다 !

Prettier: https://prettier.io/

prettier는 vscode plugin에서 install하고 실행할 수 있습니다 ! 🤗

macos 경우 option + shift + f
windows의 경우 alt + shift + f

Comment on lines +48 to +62
#copyright {
order: 3;
flex-basis: 100%;
color: #9ca3af;
text-align: center;
}

#footerMenu, #socialMedia {
display: flex;
gap: 30px;
}

#socialMedia {
gap: 12px;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

(제안) 단순히 스타일을 위한 선택자라면 id보다는 class를 추천드립니다 ! 📌

클래스는 재사용이 가능하며, 자유롭게 태그에 스타일을 붙일 수 있어서 유지보수에 용이하므로 단순히 스타일을 위해서라면 class를 추천드려요 !

그래서 왜 ? 🤔

id는 고유해요.

  • HTML 문서에서 동일한 id를 가진 요소는 존재할 수 없습니다. 따라서 같은 스타일을 여러 요소에 적용하려면 class를 사용하는 것이 더 적합합니다.
  • class는 여러 요소에 재사용 가능하기 때문에 반복적인 스타일에 적합합니다.

id의 CSS 우선순위가 높습니다.

  • id 선택자의 우선순위는 class보다 높아요.
    이는 CSS를 유지보수하거나 재정의할 때 예기치 않은 문제를 일으킬 수 있어요.
    • id: 우선순위 100
    • class: 우선순위 10
  • 필요 이상으로 높은 우선순위를 가진 id를 사용하면, 나중에 스타일을 덮어쓰기가 어려워질 수 있지요.

재사용성 및 유지보수성

  • class는 재사용 가능하므로 동일한 스타일을 여러 요소에 쉽게 적용할 수 있습니다.
  • id는 특정 요소에만 적용되므로 유연성이 떨어지고, 재사용을 하지 못합니다.

Comment on lines +79 to +86
button {
background: none;
border: none;
cursor: pointer;
font: inherit;
color: inherit;
appearance: none;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

혹시 스타일을 reset 시키기 위한 용도일까요?

그렇다면 reset.css를 적용해볼 수 있습니다:

(제안/선택) 기본 스타일을 초기화하고 싶다면 reset.css도 좋은 방법이 될 수 있어요 ! 😊

브라우저마다 기본 스타일이 미묘하게 다른거 알고 계셨나요?

https://stackoverflow.com/questions/11578819/css-reset-what-exactly-does-it-do

이처럼 브라우저마다 스타일이 다른 경우 일관된 스타일을 제공할 수 있도록 reset.css를 작성하기도 한답니다 !
그대로 사용하셔도 좋고, 참고해도 좋은 Eric meyer의 reset.css는 다음과 같습니다:

/* 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;
}

원문 보기

@kiJu2
Copy link
Collaborator

kiJu2 commented Jan 18, 2025

수고하셨습니다 용균님 !
혼자서 차근차근 문제를 풀어나간게 확 느껴집니다 ㅎㅎㅎ
제 피드백이 꼭 도움이 되었으면 하네요.
global.css 내에 있는 피드백은 찬찬히 보시고 혹시 prettier를 사용하지 않으셨다면 한 번 이번 기회에 적용해보시는걸 추천드립니다 !
리액트하실 때 프리티어 정말 많이 사용될거예요 ㅎㅎㅎ

@ozen0718 ozen0718 force-pushed the Basic-임용균-sprint3 branch from dcf80db to da928f9 Compare January 20, 2025 08:02
@kiJu2 kiJu2 merged commit 2cde398 into codeit-bootcamp-frontend:Basic-임용균 Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

매운맛🔥 뒤는 없습니다. 그냥 필터 없이 말해주세요. 책임은 제가 집니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants