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
Binary file added sprint1/images/Img_home_01.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 sprint1/images/Img_home_02.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 sprint1/images/Img_home_03.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 sprint1/images/Img_home_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 sprint1/images/Img_home_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 sprint1/images/Img_inquiry_empty.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 sprint1/images/Img_reply_empty.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 sprint1/images/ic_facebook.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 sprint1/images/ic_instagram.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 sprint1/images/ic_twitter.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 sprint1/images/ic_youtube.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 sprint1/images/img_default.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 sprint1/images/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 sprint1/images/img_logo_m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions sprint1/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>판다마켓</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<div class="header-inner default-width">
<div class="logo">
<a href="/">
<img class="logo-img" src="images/img_logo.png" alt="img_logo">
<img class="logo-mobile" src="images/img_logo_m.png" alt="img_logo_m">
</a>
Comment on lines +12 to +16
Copy link
Collaborator

Choose a reason for hiding this comment

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

오호 모바일 반응형에서는 판다 로고를 없애고 보이게끔 해주셨군요? 디테일을 볼줄 아시네요 👍

</div>
<a class="btn btn_small btn-color1" href="/login">로그인</a>
</div>
</header>
<main>
<section class="banner-section">

<div class="item">
<h1>일상의 모든 물건을 거래해 보세요</h1>
<a class="btn btn_large btn-color1" href="/items">구경하러 가기</a>
Copy link
Collaborator

Choose a reason for hiding this comment

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

접근성을 고려해 <a href="/" aria-label="홈으로 이동"> 과 같이 aria-label 혹은 role을 추가해볼까요?

</div>
<img src="images/Img_home_top.png" alt="Img_home_top">
Copy link
Collaborator

Choose a reason for hiding this comment

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

귀찮더라도 항상 img태그에는 이미지를 최대한 구체적으로 잘 설명해주는 alt 속성을 추가해주세요.
웹 접근성뿐만 아니라, 이미지 로딩 실패 시 대체 텍스트를 표시하거나 검색엔진최적화에도 도움을 줄 수 있기 때문에 꼭 사용해주시는게 좋습니다.

레퍼런스로 애플 공식 웹사이트에 가서 alt텍스트를 어떻게 사용했는지 참고해보시면:

<img src="/kr/macbook-air/images/overview/design/design_hero_static__e56c1v71mr6u_large.jpg" onload="__lp(event)" alt="열려있는 MacBook Air 13 및 15의 모습. 한 대에는 디자인 작업을 진행 중인 화면이, 다른 한 대에는 이메일과 스프레드시트를 넘나들며 멀티태스킹을 하는 화면이 표시되어 있습니다">

이런식으로 alt 속성에 이미지 설명을 위해 구체적이고 명확한 설명을 제공하는 모습을 확인해보실 수 있습니다 :)

</div>
</section>
<section class="content-section">
<div class="content-box">
<img src="images/Img_home_01.png" alt="Img_home_01">
<div class="item">
<span class="content-badge">Hot item</span>
<h1 class="content-title">인기 상품을 확인해 보세요</h1>
<p>가장 HOT한 중고거래 물품을 판다 마켓에서 확인해 보세요</p>
</div>
</div>
</section>
<section class="content-section">
<div class="content-box reverse">
<img src="images/Img_home_02.png" alt="Img_home_02">
<div class="item">
<span class="content-badge">Search</span>
<h1 class="content-title">구매를 원하는 상품을 검색하세요</h1>
<p>구매하고 싶은 물품은 검색해서 쉽게 찾아보세요</p>
</div>
</div>
</section>
<section class="content-section">
<div class="content-box">
<img src="images/Img_home_03.png" alt="">
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기엔 alt 속성이 빠져있네요!

<div class="item">
<span class="content-badge">Register</span>
<h1 class="content-title">판매를 원하는 상품을 등록하세요</h1>
<p>어떤 물건이든 판매하고 싶은 상품을 쉽게 등록하세요</p>
</div>
</div>
</section>
<section class="banner-section">
<div class="item">
<h1>믿을 수 있는 판다마켓 중고 거래</h1>
</div>
<img src="images/Img_home_bottom.png" alt="Img_home_bottom">
</section>
</main>
<footer>
<div class="default-width">
<p class="copyRight">©codeit - 2024</p>
<div class="btn support-btn">
<a href="/privacy">Privacy Policy</a>
<a href="/FAQ">FAQ</a>
</div>
<div class="btn sns-btn">
<a href="/facebook" target="_blank"><img src="images/ic_facebook.png" alt="facebook"></a>
<a href="/twitter" target="_blank"><img src="images/ic_twitter.png" alt="twitter"></a>
<a href="/youtube" target="_blank"><img src="images/ic_youtube.png" alt="youtube"></a>
<a href="/instagram" target="_blank"><img src="images/ic_instagram.png" alt="instagram"></a>
Comment on lines +76 to +79
Copy link
Collaborator

Choose a reason for hiding this comment

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

외부 링크의 경우, 보안을 위해 rel="noopener noreferrer"를 추가해주세요! :)

noopener: 새 탭에서 열린 페이지가 원본 페이지에 접근하는 것을 방지
noreferrer: 리퍼러 정보가 새 페이지로 전달되는 것을 방지

</div>
</div>
</footer>
</body>
</html>
283 changes: 283 additions & 0 deletions sprint1/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,283 @@
/*
2025.04.01
스프린트 미션 1
박연희
*/

* {
box-sizing: border-box;
margin: 0;
padding: 0;
text-decoration: none;
}
a {
color: inherit;
}
Comment on lines +7 to +15
Copy link
Collaborator

Choose a reason for hiding this comment

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

css를 용도에 맞게 분리해서 사용해볼까요?

  • reset.css (스타일 초기화)
  • common.css (전역 스타일 처리)


/* 폰트 */
@font-face {
font-family: 'Pretendard-Regular';
src: url('https://fastly.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff');
font-weight: 400;
font-style: normal;
}
Comment on lines +18 to +23
Copy link
Collaborator

Choose a reason for hiding this comment

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

폰트를 직접 로컬에서 관리하면 여러가지 최적화를 시도하실수있어요, 아주 잘 하셨어요 :)

아래 추천드린 아티클 보시고
폰트 최적화 방법도 더 알아가시고, 어떤 방식으로 폰트를 보여줄지도 정해보고, 서브셋도 활용해볼까요? :)

폰트 최적화 기법

웹 폰트 최적화가 중요한 이유와 적용 사례


/* 버튼 btn */
.btn {
Copy link
Collaborator

Choose a reason for hiding this comment

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

버튼도 최대한 스타일 중복을 제거하고 variation별로 관리해주고계시네요.
좋은 시도입니다 👍

cursor: pointer;
display: inline-block;
text-align: center;
white-space: nowrap;
}
.btn_large {
padding: 12px 124px;
border-radius: 40px;
font-size: 20px;
}
.btn_medium {
padding: 11px 71px;
border-radius: 40px;
font-size: 18px;
}
.btn_small {
padding: 8px 23px;
border-radius: 8px;
font-size: 16px;
}
.btn-color1 {
color: #ffffff;
background-color: #3692FF;
}

/* 기본넓이 */
.default-width {
max-width: 1920px;
margin: 0 auto;
transition: 0.5s;
}

/* body */
body {
font-family: 'Pretendard-Regular';
background-color: #ffffff;
color: #374151;
font-weight: 400;
}

/* header */
.header-inner {
display: flex;
justify-content: space-between;
align-items: center;
height: 70px;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

73번과 74번째 라인 사이에 띄어쓰기 한칸 해주세요! 포맷팅 신경써봐요 :)

.logo-mobile {
display: none;
}
Comment on lines +74 to +76
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
.logo-mobile {
display: none;
}
.logo-mobile {
display: none;
@media (max-width: 375px) {
display: block;
}
}


/* section */
section {
display: flex;
justify-content: center;
align-items: center;
Comment on lines +80 to +82
Copy link
Collaborator

Choose a reason for hiding this comment

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

이런 스타일 블록들도 여러 군데에서 반복되고있다면 따로 유틸용 클래스를 만들어서 재사용하시면 중복을 줄일 수 있겠죠?

e.g

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

padding: 0 25px;
}
section h1 {
font-size: 40px;
line-height: 1.5;
max-width: 320px;
word-break: keep-all;
}
section img {
min-width: 100px;
max-width: 588px;
width: 100%;
}

/* main > banner-section */
.banner-section {
background-color: #CFE5FF;
Copy link
Collaborator

Choose a reason for hiding this comment

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

자주 사용되는 값들은 css 변수로 만드시면 편하실거예요!

예시)

:root {
  /* Colors */
  --color-primary: #3692ff;
  --color-primary-dark: #1967d6;
  --color-text: #374151;
  --color-text-light: #9ca3af;
  --color-background: #ffffff;
  --color-background-alt: #fcfcfc;
  --color-background-landing: #cfe5ff;
  --color-background-footer: #111827;
  --color-text-light: #f3f4f6;
  --color-text-lighter: #f9fafb;

  /* Typography */
  --font-family-base: pretendard, sans-serif;
  --font-family-heading: "ROKAFSansMedium", sans-serif;

  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;
  --spacing-xxl: 138px;

  /* Layout */
  --container-max-width: 1520px;
  --container-content-width: 1120px;
  --container-section-width: 988px;

  /* Border Radius */
  --border-radius-sm: 8px;
  --border-radius-lg: 40px;
}

}
.banner-section .item {
margin-top: 100px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.banner-section .btn {
margin-top: 32px;
}
.banner-section img {
margin-top: 200px;
}

/* main > content-section */
.content-section {
height: 720px;
}
.content-box {
display: flex;
justify-content: center;
align-items: center;
border-radius: 13px;
background-color: #FCFCFC;
gap: 25px;
}
.content-box.reverse {
flex-direction: row-reverse;
text-align: right;
}
.content-box h1 {
margin-bottom: 24px;
}
.content-box p {
color: #374151;
font-size: 24px;
line-height: 1.3;
max-width: 320px;
word-break: keep-all;
}
.content-badge {
display: inline-block;
margin-bottom: 12px;
color: #3692FF;
font-size: 18px;
font-weight: bold;
}

/* footer */
footer {
height: 160px;
background-color: #111827;
color: #ffffff;
font-size: 16px;
}
footer .default-width {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 20px;
padding-top: 32px;
}
footer .copyRight {
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기서는 갑자기 카멜케이스를 쓰셨네요! 네이밍 케이스, 네이밍 컨벤션 잘 맞춰볼까요?

CSS 네이밍 컨벤션
자주 쓰는 네이밍케이스 정리

두개 참고해보시고, 일관적인 네이밍 규칙을 적용해보시면 좋을 것 같습니다!

color: #9CA3AF;
font-weight: 400;
}
footer .support-btn,
footer .sns-btn {
display: flex;
}
footer .support-btn {
color: #E5E7EB;
gap: 15px;
}
footer .sns-btn {
text-align: right;
gap: 12px;
}

/* 반응형 */
@media (max-width: 1950px) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

요렇게 하시는것보다는 작은 화면에서부터 미디어 쿼리에 의한 재정의를 하는 구조로 바꿔보시는게 불필요한 스타일 오버라이드를 제거하는데 좀 더 유리합니다.

그리고 미디어 쿼리를 사용하실때 공통으로 사용되는 값들을 css 변수로 정의한다음 각 브레이크 포인트에서 변수값만 변경해주는식으로 활용하시면 스타일도 중복 제거하면서 유지보수에도 용이해집니다.

코멘트 참고해보시고 리팩토링해보세요! :)

.default-width {
padding: 0 200px;
}
}
@media (max-width: 1350px) {
.default-width {
padding: 0 25px;
}
}
/* 타블렛 */
@media (max-width: 768px) {
/* section */
section {
background-color: #FCFCFC;
}
section h1 {
max-width: none;
}
/* section > banner-section */
section.banner-section,
.content-box.reverse {
flex-direction: column;
}
section.banner-section h1{
text-align: center;
}
/* section > content-box */
.content-box {
flex-direction: column;
align-items: normal;
}
.content-box h1 {
font-size: 32px;
}
.content-box p {
font-size: 18px;
}
.content-box.reverse p {
float: right;
}
}

@media (max-width: 460px) {
/* footer */
footer p {
order: 3;
}
footer .support-btn {
order: 1;
}
footer .sns-btn {
order: 2;
}
}

@media (max-width: 375px) {
.default-width,
section {
padding: 0 18px;
}
/* header */
.logo-img {
display: none;
}
.logo-mobile {
display: block;
}
/* section > banner-section */
section.banner-section h1 {
font-size: 32px;
max-width: 240px;
}
.banner-section .btn {
margin-top: 18px;
}
.banner-section img {
margin-top: 120px;
}
/* section > content-section */
.content-section {
height: 450px;
}
.btn_large {
padding: 11px 71px;
border-radius: 40px;
font-size: 18px;
}
.content-box h1 {
font-size: 24px;
margin-bottom: 16px;
}
.content-badge,
.content-box p {
font-size: 16px;
}
.content-badge {
margin-bottom: 8px;
}
.content-box p {
max-width: 200px;
}
}
Loading