Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f6fc55c
feat : 큰 섹션 나누기
hxeonxins Jul 6, 2024
d1a10cb
chore : 마진 중복 요소 제거
hxeonxins Jul 6, 2024
47e684b
feat : 헤더 내용 추가
hxeonxins Jul 7, 2024
4cdf2bc
refactor : 가독성 향상
hxeonxins Jul 7, 2024
01158af
chore : 당근 로고 assets 추가
hxeonxins Jul 7, 2024
c645f08
chore : assets 당근이 추가
hxeonxins Jul 7, 2024
a52673e
feat : main 페이지 내용 추가
hxeonxins Jul 8, 2024
68c607e
chore : 아무런 기능 없는 코드 삭제
hxeonxins Jul 8, 2024
5e5690b
feat : 메인 기능 추가
hxeonxins Jul 8, 2024
fcb7c82
chore : 버튼 위치 수정
hxeonxins Jul 8, 2024
7b9b218
fix : 버튼 로고 위치 수정
hxeonxins Jul 8, 2024
24d17cd
feat : 중고거래 페이지 추가
hxeonxins Jul 8, 2024
f6510a5
feat : 중고거래 페이지 헤더 기능 추가
hxeonxins Jul 9, 2024
d0034e5
refactor : index페이지 main태그 클래스 수정
hxeonxins Jul 9, 2024
e4c3bb1
feat : page헤더 이미지 기능 추가
hxeonxins Jul 9, 2024
262dd70
feat : 헤더 내용 추가
hxeonxins Jul 9, 2024
401f338
fix : 메인 페이지 요소 정렬
hxeonxins Jul 9, 2024
e55d9ef
feat : 중고거래 페이지 기능 추가
hxeonxins Jul 11, 2024
c55273c
feat : 중고거래 페이지 이미지 설명 추가
hxeonxins Jul 11, 2024
403e418
chore : 스타일 정렬
hxeonxins Jul 11, 2024
84b69d7
remove : .DS_Store 삭제
hxeonxins Jul 25, 2024
0742608
.DS_Store is banished
hxeonxins Jul 25, 2024
d03767b
refactor : width, height 단위 변경
hxeonxins Jul 26, 2024
86883f2
refactor : self-closing 태그 사용
hxeonxins Jul 26, 2024
24c9241
refactor : width, height 단위 수정
hxeonxins Jul 26, 2024
ce0894b
refactor : 무의미한 section태그 제거
hxeonxins Jul 26, 2024
e0e8b34
refactor : self-closing 태그 사용
hxeonxins Jul 26, 2024
36c66f2
refactor : 픽셀 단위 변경
hxeonxins Jul 26, 2024
e8a2787
refactor : br태그 사용 지양
hxeonxins Jul 26, 2024
29f0348
fix : 버튼 위치 수정
hxeonxins Jul 26, 2024
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 .DS_Store
Binary file not shown.
Binary file added assets/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions assets/apple_store.svg
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 assets/daangnee.png
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 assets/google_play.svg
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 assets/headerImg.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 assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 42 additions & 1 deletion mission/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,47 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>당근마켓 클론</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="script.js"></script>
</head>
<body>
</html>
<header>
Copy link
Contributor

Choose a reason for hiding this comment

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

시멘틱 태그 사용 너무 좋습니다!!

<div class="bigBox1">
<nav id="wrapLogo">
<a href="index.html">
<img id="logo" src="../assets/logo.png" alt="당근 로고" />
</a>
</nav>
<div id="center">
<ul class="menu">
<a href="page.html"><li>중고거래</li></a><li>동네업체</li><li>알바</li><li>부동산</li><li>중고차 직거래</li>
</ul>
</div>
<aside id="wrapInputText">
<input type="text" placeholder="물품이나 동네를 검색해 보세요"></input>
Copy link
Contributor

Choose a reason for hiding this comment

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

<input type="text" placeholder="물품이나 동네를 검색해 보세요" />

위와 같이 셀프 클로징 태그를 사용해주세용!!

<button>채팅하기</button>
</aside>
</div>
</header>

<main class="indexMain">
<div id="test">
<h1 class="font">당신 근처의<br/>지역 생활 커뮤니티</h1>
Copy link
Contributor

Choose a reason for hiding this comment

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

br사용을 지양해주세요!!

<p id="indexP">동네라서 가능한 모든 것<br/>당근에서 가까운 이웃과 함께해요.</p>
</div>
<img id="daangnee" src="../assets/daangnee.png" alt="당근이 캐릭터">
<nav id="buttonSort">
<button class="mainButton">
<img class="buttonLogoImgGP" src="../assets/google_play.svg">
Copy link
Contributor

Choose a reason for hiding this comment

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

여기도!

 <img class="buttonLogoImgGP" src="../assets/google_play.svg" />

위와 같이 셀프 클로징태그를 사용해주세요. 밑에 링크도 참고해주세요~
https://jake-seo-dev.tistory.com/461

<span class="GPtext"><b>Google Play</b></span>
</button>
<button class="mainButton">
<img class="buttonLogoImgAS" src="../assets/apple_store.svg">
<span class="AStext"><b>App Store</b></span>
</button>
</nav>
</main>
<section id="section1">
</section>
Copy link

Choose a reason for hiding this comment

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

제일 아래 부분에 색상?을 주기 위해

태그를 사용하는 것을 효율적이지 않는 코드인 것 같습니다

메인에다가 height를 주고 기본 배경에 색을 주면 훨씬 나은 코드가 될 것 같습니다

</body>
</html>
48 changes: 48 additions & 0 deletions mission/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>중고거래</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="script.js"></script>
</head>
<body>
<header>
<div class="bigBox1">
<nav id="wrapLogo">
<a href="index.html">
<img id="logo" src="../assets/logo.png" alt="당근 로고" />
</a>
</nav>
<div id="center">
<ul class="menu">
<a href="page.html" id="textColor"><li>중고거래</li></a><li>동네업체</li><li>알바</li><li>부동산</li><li>중고차 직거래</li>
</ul>
</div>
<aside id="wrapInputText">
<input type="text" placeholder="물품이나 동네를 검색해 보세요"></input>
<button>채팅하기</button>
</aside>
</div>
</header>

<main id="banner">
<h1 id="pageText">믿을만한<br />이웃 간 중고거래</h1>
<p id="pagePtext">동네 주민들과 가깝고 따뜻한 거래를<br />지금 경험해보세요.</p>
<img src="../assets/headerImg.png" id="headerBanner"/>
</main>

<section id="product">
<h1>중고거래 인기매물</h1>
</section>

<footer id="wrapFooter">
<div class="list">
<div class="item">

</div>
</div>
</footer>
</body>
</html>
15 changes: 14 additions & 1 deletion mission/script.js
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
// 화이팅..
fetch('../data.json')
.then((response) => {
return response.json();
})
.then((data) => {
data.data.map((item) => {
document.querySelector('.item').innerHTML += `<article>
<img class="productImg" src=".${item.img}" alt="${item.name}"><br />
<span>${item.name}</span></br>
<p><b>123004원</b></p>
<p>${item.address}</p>
</article>`;
})
});
268 changes: 268 additions & 0 deletions mission/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,271 @@
padding: 0;
box-sizing: border-box;
}

header {
display: flex;
justify-content: space-around;
position: fixed;
z-index: 5;
top: 0px; /* 도달했을때 고정시킬 위치 */
height: 70px;
Copy link
Contributor

Choose a reason for hiding this comment

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

어제 말했듯이 px는 절대적인 단위라 width나 height에서는 이 단위를 잘 사용하지 않습니다!
다른 상대적인 단위인 %, rem, em 도 알아보시면 좋을 것 같아요

width: 100%;
background-color: #ffffff;
}
#wrapLogo {
width: 103px;
height: 38px;
}
#logo {
width: 63px;
height: 33px;
}
a {
text-align: center;
color:black;
}
a:visited {
color: black;
}
a:hover{
color: #868b94;
}
a:active {
color: #fe6f0f;
}

#textColor{
color: #fe6f0f;
}

.bigBox1 {
width: 1400px;
height: 64px;
display: flex;
justify-content: center;
align-items: center;
}

#center {
display: flex;
justify-content: flex-start;
align-items: end;
width: 900px;
height: 25px;
margin: 0 auto;
}

#wrapInputText {
display: flex;
justify-content: flex-end;
align-items: center;
width: 389.37px;
height: 38px;
}

.menu {
display: flex;
float:left;
gap: 29px;
}
.menu li {
font-weight: 30%;
font-size: 113%;
display:inline-block;
text-align:center;
}

input[type=text] {
width: 140%;
height: 105%;
margin: 10px;
padding: 13px;
font-size: 16px;
background: #f2f3f6;
border-radius: 5px;
outline: none;
border: 0;
color: #868b94;
}
input[type=text]:focus {
color: black;
}

button {
width: 180px;
height: 105%;
border: 0.6px solid #a3a1a1;
border-radius: 5px;
background-color: #ffffff;
color: black;
font-size: 16px;
}


#section1{
height: 750px;
}

.indexMain {
width: 100%;
height: 900px;
background-color: #fffae0;
padding-bottom: 200px;
padding-left: 100px;
Copy link
Contributor

Choose a reason for hiding this comment

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

이렇게 두 줄로 나눠서 사용하기보다는
padding: 0 0 100px 200px;
로 한 줄로 간결하게 써주는 방법도 좋은 것 같습니다!

}
.font {
font-size: 48px;
line-height: 70px;
width: 1024px;
height: 137px;
padding-left: 20px;
padding-top: 40px;
}
#indexP{
padding-left: 20px;
padding-top: 65px;
font-size: 20px;
line-height: 32px;
color: #7c7c7c;
height: 60px;
}
#daangnee {
margin-left: 800px;
margin-top: -630px;
width: 680px;
height: 825px;
}
#test {
display: flex;
padding: 14%;
flex-direction: column;
}

.mainButton {
width: 180px;
height: 56px;
border-radius: 10px;
border-style: none;
background-color: #fe6f0f;
color: #ffffff;
font-size: 16px;
}

.buttonLogoImgGP {
position: relative;
left: -5px;
top: 3px;
}

.buttonLogoImgAS {
position: relative;
left: -7px;
top: 0.4px;
}

.AStext {
position: relative;
bottom: 4px;
}
.GPtext {
position: relative;
bottom: 3px;
}

.mainButton > span{
margin-bottom: 10px;
}

span {
text-align: center;
}

#buttonSort{
width: 22%;
height: 56px;
display: flex;
justify-content: space-between;
margin-left: 250px;
margin-top: -340px;
}

#section1 {
background-color: #f9f9f9;
}

footer {
height: 647.52px;
background-color: #ffffff;
}

#banner {
width: 100%;
height: 380px;
padding-right: 37%;
padding-left: 30%;
background-color: #FFF1AA;
}

#headerBanner {
width: 416px;
height: 318px;
position: relative;
bottom: 116px;
left: 355px;
}

#pageText {
font-size: 33px;
width: 768px;
height: 130px;
line-height: 50px;
position: relative;
bottom: -120px;
}

#pagePtext {
width: 768px;
height: 47.52px;
color: #212529;
position: relative;
bottom: -105px;
left: 3px;
}

#product > h1 {
font-size: 32px;
text-align: center;
padding-top: 70px;
}

.list{
height: 1542px;
width: 757px;
}
.item {
display: grid;
grid-template-columns: repeat(3,1fr);
}
article{
margin-bottom: 50px;
margin-right: 50px;
}
.productImg {
width: 223px;
height: 230px;
border-radius: 20px;
border: 1px solid;
border-color: #a3a1a1;
Copy link
Contributor

Choose a reason for hiding this comment

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

border: 1px solid 
border-color: #a3a1a1

이 코드를

border: 1px solid #a3a1a1

이렇게 한 줄로 더 간결하게 쓸 수 있습니당.

margin-bottom: 20px;
}

#wrapFooter {
display: flex;
justify-content:center;
margin-top: 50px;
}

p {
line-height: 30px;
font-size: 16px;
}