-
Notifications
You must be signed in to change notification settings - Fork 15
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
[Jace] Amazon W3 PR #67
base: jace
Are you sure you want to change the base?
Conversation
</nav> | ||
</header> | ||
<main id="content-wrap"></main> | ||
<aside id="side-bar"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด ๋ถ๋ถ๋ง id์ธ ์ด์ ๊ฐ ์์๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํฌ๋กค๋งํ ๋ id๊ฐ์ ๊ฐ์ง ๊ฒ์ ์ฐ์ ์์๊ฐ ๋์๊ฑด ์ฒ์ ์์๋ค์! ๐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ํํ ๋ด์ฉ์ธ์ง๋ ๋๋ธ์ฒดํฌํด์ ๋ค์ ๋ง์๋๋ฆฌ๊ฒ ์ต๋๋ค~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณต๋ถํ ๊ฒ๋ค์ ๋ฐํ์ผ๋ก ๋ ์ด์์์ ๋น ๋ฅด๊ฒ ์ก์๊ฐ๊ณ ๊ณ์ ๊ฒ ๊ฐ์์!
์ง๋ฌธํ์ ๋ ํ๋ค๋ฆผ์์ด ๋๋ตํ์๋ ๋ชจ์ต ์ธ์ ๊น์์ต๋๋ค. ๋จ์ ๋ฏธ์
๋ ํ์ดํ
!
<div class="shipping-address"> | ||
<div class="shipping-address__label"> | ||
<img src="./src/assets/location.svg" /> | ||
<p>๋ฐฐ์ก์ฒ</p> | ||
</div> | ||
<div class="shipping-address"> | ||
<div class="shipping-address__label"> | ||
<img src="./src/assets/location.svg" /> | ||
<p>๋ฐฐ์ก์ฒ</p> | ||
<div class="shipping-address__country"> | ||
<p>๋ํ๋ฏผ๊ตญ</p> | ||
</div> | ||
<div class="shipping-address__modal"> | ||
<div class="shipping-modal-content__msg"> | ||
<p>KR๋ก ๋ฐฐ์กํ ํ๋ชฉ์ ํ์ํ๊ฒ ์ต๋๋ค. ๋ค๋ฅธ ๊ตญ๊ฐ๋ก ๋ฐฐ์ก๋๋ ํ๋ชฉ์ ๋ณด๋ ค๋ฉด ๋ฐฐ์ก ์ฃผ์๋ฅผ ๋ณ๊ฒฝํ์ญ์์ค.</p> | ||
</div> | ||
<div class="shipping-address__country"> | ||
<p>๋ํ๋ฏผ๊ตญ</p> | ||
<div class="shipping-modal-content__btn"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BEM ์ ์ฉํ์
จ๋ค์! ์ธ์ ๊ฐ Sass๋ ๊ฐ์ด ์ฌ์ฉํด๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
๊ฐ์ธ์ ์ผ๋ก ์คํ์ผ ์ฝ๋๊ฐ ์ปดํฉํธํ๊ฒ ์ ๋ฆฌ๋ ๊ฒฝํ์ด ์์ด์ ์ถ์ฒํฉ๋๋ค. ๐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BEM์ ์์ง ์ ๋๋ก ์์งํ์ง๋ ๋ชปํด์ ์ต๋ํ ์ ์ง์ ๋ถ๋ค ์ฝ๋ ๋ณด๋ฉด์ ๋ฐ๋ผํด๋ณด๊ณ ์์๋ค์. ์ ค๋ก์ ์ฝ๋๋ฅผ ๊ฐ์ธ์ ์ผ๋ก ์ข์ํด์ ์์ฃผ ์ฐธ๊ณ ํ๊ฒ ์ต๋๋ค :)
<div class="menu__your-list"> | ||
<p>๊ทํ์ ๋ชฉ๋ก</p> | ||
<p>๋ชฉ๋ก ์์ฑ</p> | ||
<p>๋ชฉ๋ก ๋๋ ๋ ์ง์คํธ๋ฆฌ ์ฐพ๊ธฐ</p> | ||
<p>AmazonSmile ์์ ํ๋ชฉ ๋ชฉ๋ก</p> | ||
</div> | ||
<div class="menu__account"> | ||
<p>๊ณ์ </p> | ||
<p>๊ณ์ </p> | ||
<p>์ฃผ๋ฌธ</p> | ||
<p>๊ถ์ฅ ์ฌํญ</p> | ||
<p>๊ฒ์ ๊ธฐ๋ก</p> | ||
<p>์์น๋ฆฌ์คํธ</p> | ||
<p>๋น๋์ค ๊ตฌ๋งค ๋ฐ ๋์ฌ</p> | ||
<p>Kindle ์ธ๋ฆฌ๋ฏธํฐ๋</p> | ||
<p>์ฝํ ์ธ ๋ฐ ๊ธฐ๊ธฐ</p> | ||
<p>ํญ๋ชฉ ๊ตฌ๋ ๋ฐ ์ ์ฅ</p> | ||
<p>๋ฉค๋ฒ์ญ ๋ฐ ๊ตฌ๋ </p> | ||
<p>์์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ</p> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ฐ์ดํฐ๊ฐ์ ๊ด๊ณ๋ฅผ ์๊ฐํด์ ul ํ๊ทธ๋ฅผ ์ฌ์ฉํด๋ณด์๋๊ฑด ์ด๋จ๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ต ๊ทธ๋ ๊ฒ ํ๊ฒ ์ต๋๋ค! ์ ๋๋ ์๋ฌด ์๊ฐ ์์ด ๊ธํ๊ฒ ์ง๋๋ผ ๊ณ ๋ ค์น ๋ชปํ๋ ๋ถ๋ถ์ด๋ค์! ์ง์ด์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค
.logo, | ||
.shipping-address__label, | ||
.shipping-address__country, | ||
.nation, | ||
.login__label p, | ||
.my-page, | ||
.cart, | ||
.sub-menu__left, | ||
.sub-menu__right, | ||
.search-bar__expand-auto, | ||
.recommend-items, | ||
.category-digita, | ||
.category-section, | ||
.category-section__default { | ||
cursor: pointer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ปค์๋ฅผ ํฌ์ธํฐ๋ก ๋ณด์ด๊ฒํด์ผํ๋ ์์๊ฐ ๊ณ์ ๋์ด๋๋ฉด ๊ด๋ฆฌํ๊ธฐ๊ฐ ์ด๋ ค์์ง ๊ฒ ๊ฐ์์ ๐ข
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ทธ๋๋ ๋ค๋ฅธ ๋ถ๋ค์ ์ด๋ป๊ฒ ์ด ๋ถ๋ถ์ ์ฒ๋ฆฌํ๋์ง ๊ณ ๋ฏผ ๋์๋ค์. ์ค์ ๋ก ์ด๋ค ์์๋ค์ ํฌ์ธํฐ๋ก ๋ณด์ด๊ฒ ํ๋์ง ๊ธฐ์ต๋ ์ ์๋ฌ๊ตฌ์.. ํน์ ๊ทธ๋ผ ๊ฐ ์์์ ์คํ์ผ๋ง ์์ ๋งค๋ฒ ์ปค์ - ํฌ์ธํฐ ์ง์ ํด์ฃผ๋๊ฑด ๊ด์ฐฎ์ ๋ฐฉ๋ฒ์ผ๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ฐ์ธ์ ์ผ๋ก ์๊ฐํ๋ ๋ฐฉ์์ ์ด๋ฐ ๋ฐฉ์์ด์์.
.clickable {
cursor: pointer;
}
์ด๋ฐ ์
๋ ํฐ๋ฅผ ํ๋ ๋ง๋ค์ด์ ํฌ์ธํฐ๋ก ๋ณํ์ด ํ์ํ ์์์ ํด๋์ค์ ์ถ๊ฐํด์ฃผ๋ ๋ฐฉ์์
๋๋ค.
๋ถํธ์คํธ๋ฉ ๊ฐ์ ํ๋ ์์ํฌ์์ ๋ง์ด ์ฌ์ฉํ๋ ๋ฐฉ์์ธ๋ฐ, ์ข์ ๋ฐฉ์์ธ์ง๋ ์ ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ํด๋์ค ์ด๋ฆ์ด ๊ธธ์ด์ง๊ฑฐ๋ ์.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ค์ ๋ก ๊ฐ์ธ ์์ ๊ณผ ํ์ ์ ๋ฌด์์ด ๋ ํธ๋ฆฌํ ์ง ์ฌ์ฉํด ๋ณด๊ณ ํ๋จํด๋ณผ ์ ์๊ฒ ๋ค์. ์ผ๋จ ์ปค์ ํฌ์ธํฐ๊ฐ ํ์ํ ์์๋ค๋ง ๋ฐ๋ก ๋นผ์ ๊ด๋ฆฌํ๋ ๊ธฐ์กด ๋ฐฉ๋ฒ์ด ์ค์ ๋ก ํธ๋ฆฌํ์ง ์์๋ ๊ฑฐ ๊ฐ์ต๋๋ค. ์ ๋ ํฐ๋ฅผ ๋ฐ๋ก ํ๋ ๋นผ์ ์ฌ์ฉํด๋ณด๋ ๋ฐฉ์์ผ๋ก ์ด๋ฒ์ ๊ณ ์ณ๋ด์ผ๊ฒ ์ด์! ํด๋ณด๊ณ ํ๊ธฐ ๋ค๋ ค๋๋ฆด๊ฒ์!
height: 0; | ||
border-right: 20.15px solid transparent; | ||
border-left: 20.15px solid transparent; | ||
border-bottom: calc(20.15px * 1.732) solid var(--color-white); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฐ์ฐ์ด ํ์ํ ์์ฑ๊ฐ์ด ์ฌ๋ฌ๊ตฐ๋ฐ์์ ๋ณด์ด๋ค์. ์ด๋ฌ๋ฉด ๋งค๋ฒ ๊ณ์ฐ์ด ๋์ง ์์๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ค... ๊ทธ ๋ถ๋ถ์ ์๊ฐํ์ง ๋ชปํ๋ค์. ์์ ์ฐ์ฐ์ ํด๋ฒ๋ฆฐ์ฑ๋ก ๊ณ ์ ๊ฐ์ ๋ฃ์ด์ผ๊ฒ ์ต๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ฝ๋์ ์ค๋ณต์ ์ค์ผ ์ ์๋ ๋ฐฉ๋ฒ์ ์ ์ฉํด๋ด๋ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์ต๋๋ค.
๋ณ์ํ๋ผ๊ฑฐ๋...
๐ ๊ณํ
๐ ๊ธฐ๋ฅ ์๊ตฌ์ฌํญ
โ Side-bar
[๋ชจ๋]
๋ฒํผ ํด๋ฆญ ์ ์ข์ธก์์ ์ฌ์ด๋๋ฐ๊ฐ ์ ๋๋ฉ์ด์ ๊ณผ ํจ๊ป ๋ํ๋๋ฉฐ ๋ฐฐ๊ฒฝ์ ๋ค์ฒ๋ฆฌ([X]
๋ฒํผ ํด๋ฆญ ์ ์ฌ์ด๋๋ฐ close)[๋ชจ๋ ๋ณด๊ธฐ]
๋ฒํผ ํด๋ฆญ ์ ์ ๋๋ฉ์ด์ ๊ณผ ํจ๊ป ๋ชจ๋ ์นดํ ๊ณ ๋ฆฌ ๋ฉ๋ด๊ฐ unfold๋๋ฉฐ[๋ชจ๋ ๋ณด๊ธฐ]
๋ฒํผ์[๊ฐ๋ตํ ๋ณด๊ธฐ]
๋ก ๋ณ๊ฒฝ(๋ฐ๋๋ก,[๊ฐ๋ตํ ๋ณด๊ธฐ]
๋ฒํผ ํด๋ฆญ ์ ๋ชจ๋ ์นดํ ๊ณ ๋ฆฌ ๋ฉ๋ด fold)[์ฃผ๋ฉ๋ด]
์์ญ ํด๋ฆญ ์ ์ ๋๋ฉ์ด์ ๊ณผ ํจ๊ป ์ข์ธก์์ ์ฐ์ธก์ผ๋ก ํด๋น ๋ ์ด์ด ์ ๊ฑฐโ Search-input
[โ, โ, โ, โ]
๋ฐฉํฅํค๋ฅผ ํตํด ์ถ์ฒ ๊ฒ์์ด ๋ชฉ๋ก ๊ฐ ์ด๋ ๊ธฐ๋ฅ ๋ฐ ๋ชฉ๋ก ๋ฐฐ๊ฒฝ์ ํฌ์ปค์ฑ ์์ ํ์[โ, โ, โ, โ]
๋ฐฉํฅํค๋ฅผ ํตํด ์๋์์ฑ ๊ฒ์์ด ๋ชฉ๋ก ๊ฐ ์ด๋ ๊ธฐ๋ฅ ๋ฐ ๋ชฉ๋ก ๋ฐฐ๊ฒฝ์ ํฌ์ปค์ฑ ์์ ํ์[X]
๋ฒํผ ํด๋ฆญ ์ ๋ชฉ๋ก์์ ํด๋น ๊ฒ์์ด ์ญ์ [โ, โ, โ, โ]
๋ฐฉํฅํค๋ฅผ ํตํด ๊ฒ์ ๋ด์ญ & ์ถ์ฒ ๊ฒ์์ด ๋ชฉ๋ก ๊ฐ ์ด๋ ๊ธฐ๋ฅ ๋ฐ ๋ชฉ๋ก ๋ฐฐ๊ฒฝ์ ํฌ์ปค์ฑ ์์ ํ์โ Modal
[๋ก๊ทธ์ธ]
๋ฒํผ ์ฒ์ฒํ ํ์([๋ก๊ทธ์ธ]
์์ญ ๋ง์ฐ์ค ํธ๋ฒ ์ ๊น์ง ์ ์ง)[๋ก๊ทธ์ธ]
์์ญ ๋ง์ฐ์ค ํธ๋ฒ ์ ๊ณ์ ๊ด๋ จ ํ์ฅ ๋ ์ด์ด๊ฐ ๋ํ๋๊ณ ๋ฐฐ๊ฒฝ์ ๋ค์ฒ๋ฆฌ(๋ง์ฐ์ค out ์ ๋ ์ด์ด & ๋ค์ฒ๋ฆฌ ํจ๊ณผ ์ ๊ฑฐ)[๋ฐฐ์ก์ฒ]
์์ญ ๋ง์ฐ์ค ํธ๋ฒ ์ ์ฃผ์ ๊ด๋ จ ํ์ฅ ๋ ์ด์ด๊ฐ ๋ํ๋๊ณ ๋ฐฐ๊ฒฝ์ ๋ค์ฒ๋ฆฌ(๋ง์ฐ์ค out ์ ๋ ์ด์ด & ๋ค์ฒ๋ฆฌ ํจ๊ณผ ์ ๊ฑฐ)๐ ํ๋ก๊ทธ๋๋ฐ ์๊ตฌ์ฌํญ
json-server
์ ์ฐ๋ํด์ getfetch API
๋ฅผ ํ์ฉํ ๋ฐ์ดํฐ ํต์ ๋ฐฉ์์ผ๋ก ๊ฐ๋ฐ(XHR
,axios
์ฌ์ฉ ๊ธ์ง)promise
ํจํด์ ๋ํ ์ดํด๊ฐ ์๋ค๋ฉดthen
๋ฉ์๋ ํ์ฉ