Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 Frame 2608833.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 Group 19.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 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 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 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 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 Vector.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 desktop_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 face.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 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.
120 changes: 120 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>판다마켓</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/pretendard.css" />
</head>


<body>

<header>
<a href="/">
<img class="title" src="Group 19.png">
</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을 추가해볼까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

모든 a태그에 적절히 적용하였습니다



Copy link
Collaborator

Choose a reason for hiding this comment

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

여기 불필요한 공백은 없애주셔도됩니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

불필요한 공백은 지웠습니다

<a href="/login" class="goToLogin">로그인</a>
</header>


<div class="skyBlue">
Copy link
Collaborator

Choose a reason for hiding this comment

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

시맨틱 HTML 태그 사용을 늘려볼까요? (<main>, <section>, <nav> 등)
아래 아티클을 읽어보시면 시맨틱 태그를 왜 사용해야하는지 잘 참고하실수있을거예요!

참고

Copy link
Collaborator Author

@minji9029 minji9029 Apr 9, 2025

Choose a reason for hiding this comment

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

위 아래 배경이 하늘색인부분을 시맨틱태그 < section>로 수정했습니다

<div class="upAndDown">
Copy link
Collaborator

Choose a reason for hiding this comment

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

클래스이름을 지을때는 UI의 색상, 위치, 순서등이 포함되어있으면 디자인 변경 시 대응하기도 어려워지고 유지보수에 좋지 않아요. 이런 정보들을 포함하기보다는 항상 엘리먼트의 역할을 명확하게 나타낼수있는 네이밍을 써볼까요? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

skyBlue를 용도에 맞게 highlightBox로 수정하였습니다.

<div class="top">
<div class="imgPlusWord">
Copy link
Collaborator

Choose a reason for hiding this comment

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

요런 네이밍도 디자인 변경에 따라 변경될 가능성이 보이고 의미가 명확하지않은것같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

upAndDown도 highlightBoxContent로 변경해보았습니다

<div class="words">
<h1>일상의 모든 물건을<br>거래해 보세요</h1>
<a href="/items">
<button>구경하러가기</button>
</a>

</div>
<img style="width: 746px;" src="Img_home_top.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.

오호, width 값을 style 속성을 통해 넣어주셨군요.
style 속성으로 width만 지정하면, 이미지 로딩 전까지 높이를 알 수 없어 레이아웃이 변할 수 있어요. 대신 width와 height 속성을 직접 지정하면 브라우저가 이미지의 종횡비를 즉시 계산할 수 있어 최적화에 도움이 됩니다.

앞으로 이미지 최적화도 조금 더 신경써볼까요?

웹페이지 성능 측정 지표중 CLS(Cumulative Layout Shift) 라는 지표가 있는데요,
현재 보고 있는 페이지에 갑자기 발생하는 레이아웃의 변경이 발생하면 사용자 입장에서 불편함을 겪을 수 있기때문에 레이아웃 이동(layout shift) 빈도를 측정해 성능을 평가한다고 보시면 됩니다. 보통 이미지 및 비디오 요소를 삽입할때 이런 현상이 자주 발생될수있겠죠?

따라서 레이아웃 시프트를 방지해주려면 이미지 및 비디오 요소에 width 와 height 속성을 항상 포함하거나 또는 CSS를 사용하여 필요한 공간(aspect-ratio-box)을 잡는 방법이 있습니다.

해당 이미지의 사이즈가 어느정도는 고정적이라면 width와 height를 직접적으로 넣는 방법이 있고, 반응형을 고려해 비율을 지키며 변해야한다면 aspect-ratio를 사용하는 방법도 있습니다.

이미지 최적화는 제가 제안드린 방법말고도 webp, avif 같은 차세대 확장자를 사용한다던지
srcSet을 사용해 각 스크린사이즈에 맞는 이미지파일을 로드한다던지
우선순위를 낮춰 레이지 로딩하는 등 여러가지 기법들이 있습니다.

차차 학습해보시면 좋을것같네요 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

따로 학습해보겠습니다!

</div>
</div>

</div>
</div>

<section>
<div class="imgPlusWord">
<img src="Frame 2608833.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.

img에 명확한 alt text 사용은 항상 필수적입니다!
웹 접근성뿐만 아니라, 이미지 로딩 실패 시 대체 텍스트를 표시하거나 검색엔진최적화에도 도움을 줄 수 있기 때문에 꼭 사용해주시는게 좋고, 명확하게 이미지를 드러내는 텍스트를 써주세요.

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

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

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

더욱 명확한 alt 작성을 위해서 "판다마켓의 마스코트인 판다가 손을 흔들고 있는 이미지입니다." 로 수정하였고 나머지 이미지들도 비슷하게 수정하였습니다.


<div class="words">
<div class="feature">Hot item</div>
<h1>인기 상품을<br>확인해 보세요</h1>
<p>가장 HOT한 중고거래 물품을<br>판다 마켓에서 확인해 보세요</p>
</div>

</div>
</section>

<section>
<div class="imgPlusWord">
<div class="words R">
Copy link
Collaborator

Choose a reason for hiding this comment

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

'words R' 등도 지금은 그럴 일이 없겠지만 나중에 다른 개발자가 이 파일을 수정한다고 생각하다면.. 질문이 들어올만한 네이밍이겠죠? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

R을 center로 변경하였습니다.

<div class="feature">Search</div>
<h1>구매를 원하는<br>상품을 검색해 보세요</h1>
<p>구매하고 싶은 물품은 검색해서<br>쉽게 찾아보세요</p>
</div>
<img class="bodyImg" src="Img_home_02.png" alt="검색이미지">
</div>
</section>

<section>
<div class="imgPlusWord">

Copy link
Collaborator

Choose a reason for hiding this comment

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

불필요한 공백은 없애주세요!
하지만 일괄적으로 바꾸시기가 힘드니 일단 지금은 냅두고, 나중에 prettier 플러그인을 설치해 일관적으로 포맷팅을 자동화할수있게끔 시도해봐요 :)

prettier가 어떤 도구이고 무엇을 할수있는지 소개해드릴게요!
참고

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CSS와 HTML에 있는 불필요한 공백을 지웠습니다.

<img src="Img_home_03.png" alt="검색이미지">

<div class="words">
<div class="feature">Register</div>
<h1>판매를 원하는<br>상품을 등록하세요</h1>
<p>어떤 물건이든 판매하고 싶은 상품을<br>쉽게 등록하세요</p>
</div>

</div>


</section>


<div class="skyBlue">
<div class="upAndDown">
<div class="imgPlusWord">
<h1>믿을 수 있는<br>판다마켓 중고 거래</h1>
<img src="Img_home_bottom.png" alt="판다가 대화하는 이미지">
</div>

</div>
</div>

<footer>
<div class="ffooter">
Copy link
Collaborator

Choose a reason for hiding this comment

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

'ffooter' 오타도 났는데, 불필요한 div 중첩으로 보여요 :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ffooter는 풋터의 내용을 묶어서 가운데로 놓아주려는 변수였는데 의미전달이 불가능한 변수로 판단되어 footerContainer로 변경하였습니다.

©codeit - 2024
<div class="linkNearing">
<a href="/privacy">Privacy Policy</a>
<a href="/faq">FAQ</a>
</div>

<div class="icons">
<a href="https://www.facebook.com/?locale=ko_KR">
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: 리퍼러 정보가 새 페이지로 전달되는 것을 방지

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

외부 링크로 연결되는 4가지 링크에 모두 적용하였습니다

<img src="face.png" alt="페이스북 아이콘">
</a>
<a href="https://x.com/home?lang=ko">
<img src="ic_twitter.png" alt="트위터 아이콘">
</a>
<a href="https://www.youtube.com/">
<img src="youyube.png" alt="유투브 아이콘">
</a>
<a href="https://www.instagram.com/">
<img src="Vector.png" alt="인스타 아이콘">
</a>

</div>
</div>
</footer>

</body>
</html>
189 changes: 189 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
*{
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: CSS 초기화
  • common.css: 전역 스타일

이렇게 용도에 따라 파일을 나눠 관리하는건 어떤 이점을 가져다줄수있는지 한번 더 생각해볼수있어요.

  • 역할 분리가 되어 관리가 쉬움: 각 파일의 목적이 명확해서 수정이나 유지보수가 쉬워질거예요.
  • 사용성과 확장성 증가: 여러 페이지 혹은 프로젝트에서 거의 동일하게 재사용이 가능해요.
  • 스타일 우선순위가 더 예측 가능해짐: reset.css → common.css → 페이지나 컴포넌트별 스타일 순으로 로딩하면 우선순위가 명확해지고 스타일 충돌을 줄일 수 있어요.

Copy link
Collaborator Author

@minji9029 minji9029 Apr 9, 2025

Choose a reason for hiding this comment

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

common.css: 전역 스타일 파일을 추가하였고

html에도 < link rel="stylesheet" href="common.css">를 추가해 주었습니다

box-sizing: border-box;
}

body{
font-family: 'Pretendard', sans-serif;
color: #374151;
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 {
  --primary-color: #3692FF;
  --text-color: #374151;
  --background-color: #ffffff;
  --secondary-background: #FCFCFC;
  --footer-background: #111827;
  --footer-text: #9CA3AF;
  --hero-background: #CFE5FF;
  --container-width: 1920px;
  --section-padding: 100px 0;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

미션 2부터 적용해보겠습니다 ㅎㅎ

width: 100%;
margin: 0;
background-color: #ffffff
}

header{
width: 100%;
max-width: 1920px;
height: 70px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 1rem;
margin: 0 auto;
}

img {
max-width: 100%;
height: auto;
}

.top{
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기서도 .top 뒤에 공백 한칸 띄워주세요! 다음부터는 포맷팅 꼭 신경써봐요 :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

CSS에서 클래스/태그와 대괄호 사이에 띄어쓰기를 추가했습니다

margin-top: 57px;
}

.upAndDown{
width: 1920px;
margin: 0 auto;
padding: 143px 405px 0;
}

.imgPlusWord{
display: flex;
align-items: center;
gap: 7px;
}

.words{
display: flex;
flex-direction: column;
justify-content: center;
text-align: left;
}

.R{
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-end;
text-align: right;
}

.title{
margin: 0 200px;

}

.goToLogin{
font-size: clamp(14px, 1.2vw, 16px);
font-weight: 600;
line-height: 26px;
margin: 0;
border: 1px solid #3692FF;
background-color: #3692FF;
border-radius: 8px;
color: #F9FAFB;
padding: 0.7rem 1.2rem;
display: flex;
justify-content: center;
align-items: center;
Comment on lines +77 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.

요렇게 자주 반복되는 스타일 블락들도 유틸리티 클래스로 만들어서 재사용해줄 수 있어요!

예시)

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이것도 미션 2부터 고려해서 적용해보겠습니다

text-decoration: none;
}

button{
border: 1px solid #3692FF;
background-color: #3692FF;
border-radius: 40px;
color: #F9FAFB;
padding: 16px 124px;
}

section{
background-color: #FCFCFC;
width: 988px;
height: 444px;
margin: 100px auto;

}

.bodyImg{
width: 579px;
height: 444px;
}

.feature{
font-size: 18px;
font-weight: 700;
line-height: 26px;
color: #3692FF;
}

h1{
font-size: 40px;
font-weight: 700;
line-height: 140%;
}

p{
font-size: 24px;
font-weight: 500;
line-height: 32px;
}

.skyBlue{
background-color: #CFE5FF;
width: 100%;
height: 540px;
margin: 0 auto;
}


footer{
margin: 0 auto;
font-size: 16px;
font-weight: 400;
line-height: 100%;
height: 160px;
color: #9CA3AF;
background-color: #111827;
display: flex;
justify-content: center;
align-items: flex-start;
padding: 32px 0;
}

.ffooter{
display: flex;
justify-content: space-between;
align-items: center;
width: 1920px;
margin: 0 auto;

}

a{
text-decoration: none;
color: #9CA3AF;
}

.linkNearing{
width: 159px;
display: flex;
justify-content: space-between;
gap: 30px;
}

.icons{
display: flex;
gap: 12px;
}

@media (max-width: 768px) {
.imgPlusWord {
flex-direction: column;
text-align: center;
}

.R {
align-items: center;
text-align: center;
}

.ffooter {
flex-direction: column;
align-items: center;
}

footer {
height: auto;
padding: 2rem;
}
}
Binary file added youyube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.