diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0445a66 --- /dev/null +++ b/.gitignore @@ -0,0 +1,138 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# env +.env +.env.production +env.js + +# pem +*.pem \ No newline at end of file diff --git a/board/board.css b/board/board.css new file mode 100644 index 0000000..f06bf12 --- /dev/null +++ b/board/board.css @@ -0,0 +1,102 @@ +.article { + display: flex; + flex-direction: column; + gap: 24px; +} + +.article__inner { + width: 1200px; + display: flex; + flex-direction: column; + gap: 40px; +} + +.article__list--best { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 24px; +} + +.article__image-container { + display: flex; + width: 72px; + height: 72px; + padding: 13.713px 12px 13.715px 12px; + justify-content: center; + align-items: center; + border-radius: 6px; + border: 1px solid var(--Cool-Gray-200, #e5e7eb); + background: var(--white); +} + +.article__image { + width: 48px; + height: 44px; + flex-shrink: 0; +} + +.article__list { + display: flex; + flex-direction: column; + gap: 24px; +} + +.article__item { + display: flex; + flex-direction: column; + gap: 16px; +} + +.article__item--best { + width: 384px; + height: 169px; + border-radius: 8px; + background: var(--gray50); + padding: 0 24px 16px 24px; + position: relative; + display: block; +} + +.article__link { + display: flex; + gap: 16px; + align-items: center; + color: var(--gray800); + font-family: Pretendard; + font-size: 20px; + font-weight: 500; + justify-content: space-between; +} + +.article__info { + display: flex; + gap: 8px; + color: var(--gray600); + font-family: Pretendard; + font-size: 14px; + font-weight: 400; + justify-content: space-between; + height: 24px; +} + +.article__info--best { + position: absolute; + bottom: 16px; + left: 24px; + right: 24px; +} + +.article__author { + display: flex; + gap: 8px; + color: var(--gray600); +} + +.like-button--article { + font-size: 14px; + color: var(--gray500); +} + +.article__date { + color: var(--gray400); +} diff --git a/board/free.html b/board/free.html new file mode 100644 index 0000000..300b34e --- /dev/null +++ b/board/free.html @@ -0,0 +1,128 @@ + + + + + + + + + + + 자유게시판 + + + +
+
+
+ + + + +
+
+ +
+
+
+
+

+ 베스트 게시글 +

+ +
+
+

+ 게시글 +

+ +
+
+ +
+ + + + \ No newline at end of file diff --git a/common.css b/common.css new file mode 100644 index 0000000..8c43f35 --- /dev/null +++ b/common.css @@ -0,0 +1,145 @@ +:root { + --gray900: #111827; + --gray800: #1f2937; + --gray700: #374151; + --gray600: #4b5563; + --gray500: #6b7280; + --gray400: #9ca3af; + --gray200: #e5e7eb; + --gray100: #f3f4f6; + --gray50: #f9fafb; + --blue: #3692ff; + --error-red: #f74747; + --skyblue: #cfe5ff; + --white: #fff; + --gray-header: #dfdfdf; +} + +html, +body { + margin: 0; + padding: 0; + width: 100%; + height: 100%; +} + +.background-white { + display: flex; + justify-content: center; + padding: 24px 0 113px 0; + min-height: 100vh; +} + +.main { + width: 1200px; + display: flex; + flex-direction: column; + gap: 40px; +} + +li { + list-style: none; +} + +.header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 200px; + height: 70px; + border-bottom: 1px solid var(--gray-header); +} +@media screen and (max-width: 1199px) { + .header { + padding: 34px; + } +} +.header__inner { + display: flex; + max-width: 95rem; + align-items: center; +} + +.header__left { + display: flex; + gap: 32px; + align-items: center; +} + +.header__logo { + display: flex; + width: 153px; + height: 51px; +} + +.header__menu { + display: flex; + align-items: center; +} + +.header__menu-item { + display: flex; + width: 109px; + height: 69px; + padding: 24px 16px 24px 15px; + justify-content: center; + align-items: center; +} + +.header__menu-link { + color: var(--Gray-600); + text-align: center; + font-family: Pretendard; + font-size: 18px; + font-style: normal; + font-weight: 700; + line-height: normal; +} + +.button { + display: flex; + justify-content: center; + align-items: center; + width: 88px; + height: 42px; + border-radius: 8px; + background-color: var(--blue); + color: #fff; + border: 0px; +} + +.header__button { + display: flex; + flex-shrink: 0; + justify-content: center; + align-items: center; + width: 88px; + height: 42px; + border-radius: 8px; + background-color: var(--blue); + color: #fff; + border: 0px; +} + +.like-button { + display: flex; + background: #fff; + align-items: center; + gap: 4px; + height: 48px; + height: 16px; + color: var(--gray600); + font-family: Pretendard; + font-size: 12px; + font-weight: 500; + border: none; +} + +.category__title { + color: var(--gray900); + font-family: Pretendard; + font-size: 20px; + font-weight: 700; + line-height: 140%; /* 28px */ + letter-spacing: 0.4px; +} diff --git a/icons/arrow_left.svg b/icons/arrow_left.svg new file mode 100644 index 0000000..94a66b5 --- /dev/null +++ b/icons/arrow_left.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/icons/arrow_right.svg b/icons/arrow_right.svg new file mode 100644 index 0000000..87a6017 --- /dev/null +++ b/icons/arrow_right.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/icons/heart.svg b/icons/heart.svg new file mode 100644 index 0000000..4e5761e --- /dev/null +++ b/icons/heart.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/images/1.png b/images/1.png new file mode 100644 index 0000000..5cbe46a Binary files /dev/null and b/images/1.png differ diff --git a/images/2.png b/images/2.png new file mode 100644 index 0000000..e0b3c26 Binary files /dev/null and b/images/2.png differ diff --git a/images/3.png b/images/3.png new file mode 100644 index 0000000..b3c1042 Binary files /dev/null and b/images/3.png differ diff --git a/images/bottom.png b/images/bottom.png new file mode 100644 index 0000000..8b8a4c7 Binary files /dev/null and b/images/bottom.png differ diff --git a/images/hero.png b/images/hero.png new file mode 100644 index 0000000..0a900cd Binary files /dev/null and b/images/hero.png differ diff --git a/images/img_badge.png b/images/img_badge.png new file mode 100644 index 0000000..1f105a6 Binary files /dev/null and b/images/img_badge.png differ diff --git a/images/logo.png b/images/logo.png new file mode 100644 index 0000000..2def828 Binary files /dev/null and b/images/logo.png differ diff --git a/images/product_default.png b/images/product_default.png new file mode 100644 index 0000000..d744957 Binary files /dev/null and b/images/product_default.png differ diff --git a/images/typo.png b/images/typo.png new file mode 100644 index 0000000..da1a10f Binary files /dev/null and b/images/typo.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..17413cf --- /dev/null +++ b/index.html @@ -0,0 +1,125 @@ + + + + + + + + + + + 판다마켓 + + + +
+
+
+ + + + +
+
+ +
+
+
+
+

+ 일상의 모든 물건을
+ 거래해 보세요 +

+ +
+
+ +
+
+
+
+
+ +
+

+ Hot item +

+
+

+ 인기 상품을
+ 확인해 보세요 +

+

+ 가장 HOT한 중고거래 물품을
+ 판다 마켓에서 확인해 보세요 +

+
+
+
+
+ +
+

+ Search +

+
+

+ 구매를 원하는
+ 상품을 검색하세요 +

+

+ 구매하고 싶은 물품은 검색해서
+ 쉽게 찾아보세요 +

+
+
+
+
+ +
+

+ Register +

+
+

+ 판매를 원하는
+ 상품을 등록하세요 +

+

+ 어떤 물건이든 판매하고 싶은 상품을
+ 쉽게 등록하세요 +

+
+
+
+ +
+
+
+
+

+ 믿을 수 있는
+ 판다마켓 중고거래 +

+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/main.js b/main.js new file mode 100644 index 0000000..b4562c2 --- /dev/null +++ b/main.js @@ -0,0 +1,72 @@ +import * as ArticleService from "./market/ArticleService.js"; +import * as ProductService from "./market/ProductService.js"; + +await ProductService.getProducts(); +await ArticleService.getArticles(); +await ProductService.getProductList({ orderBy: "recent", page: 2, pageSize: 5 }); +await ArticleService.getArticleList({ orderBy: "recent" }); +await ArticleService.getArticleList({ orderBy: "like" }); +await ProductService.getProduct(12); +await ArticleService.getArticle(1); +// await ProductService.createProduct({ +// name: "판다 인형", +// description: "귀여운 판다 인형입니다.", +// price: 20000, +// tags: ["판다", "인형", "귀엽다", "포근하다", "흑백"], +// ownerId: 5, +// favoriteCount: 70, +// }); + +document.addEventListener("DOMContentLoaded", async () => { + try { + const data = await ProductService.getProductList({ orderBy: "favorite", page: 1, pageSize: 4 }); + displayProductList(data.list, "best-products"); + } catch (error) { + console.error("Error fetching products:", error); + } + try { + const data = await ProductService.getProductList({ orderBy: "recent", page: 1, pageSize: 10 }); + displayProductList(data.list, "all-products"); + } catch (error) { + console.error("Error fetching products:", error); + } +}); + +function displayProductList(products, targetElement) { + const productListElement = document.querySelector(`.${targetElement}__list`); + + if (!productListElement) { + console.error("Error!"); + return; + } + + productListElement.innerHTML = ""; + + products.forEach((product) => { + const productItem = document.createElement("li"); + productItem.className = `product__item ${targetElement}__item`; + + const productImage = document.createElement("img"); + productImage.src = product.images[0] || "../images/product_default.png"; + productImage.className = `product__image ${targetElement}__image`; + + const productName = document.createElement("p"); + productName.className = "products__name"; + productName.innerText = product.description; + + const productPrice = document.createElement("p"); + productPrice.className = "products__price"; + productPrice.innerText = `${product.price}원`; + + const likeButton = document.createElement("button"); + likeButton.className = "like-button"; + likeButton.innerHTML = ` ${product.favoriteCount}`; + + productItem.appendChild(productImage); + productItem.appendChild(productName); + productItem.appendChild(productPrice); + productItem.appendChild(likeButton); + + productListElement.appendChild(productItem); + }); +} diff --git a/market/ArticleService.js b/market/ArticleService.js new file mode 100644 index 0000000..b09d399 --- /dev/null +++ b/market/ArticleService.js @@ -0,0 +1,87 @@ +const API_URL_ARTICLE = "https://panda-market-api.vercel.app/articles"; + +export const getArticles = () => { + return fetch(API_URL_ARTICLE) + .then((response) => { + return response.json().then((data) => { + console.log("상태코드:", response.status, "Data:", data); + return data; + }); + }) + .catch((error) => { + console.error("Error fetching articles:", error); + }); +}; + +export const getArticleList = async ({ page = 1, pageSize = 10, orderBy = "recent" } = {}) => { + let query = ""; + if (page) query += `page=${page}&`; + if (pageSize) query += `pageSize=${pageSize}&`; + if (orderBy) query += `orderBy=${orderBy}&`; + try { + const response = await axios.get(`${API_URL_ARTICLE}?${query}`); + const data = response.data; + console.log("상태코드:", response.status, "Data:", data); + return data; + } catch (err) { + console.error("Error fetching articles:", err); + } +}; + +export const getArticle = async (articleId) => { + try { + const response = await fetch(`${API_URL_ARTICLE}/${articleId}`); + const data = await response.json(); + console.log("상태코드:", response.status, "Data:", data); + return data; + } catch (err) { + console.error("Error fetching article:", err); + } +}; + +export const createArticle = async (article) => { + try { + const response = await fetch(API_URL_ARTICLE, { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(article), + }); + const data = await response.json(); + console.log("상태코드:", response.status, "Data:", data); + return data; + } catch (err) { + console.error("Error creating article:", err); + } +}; + +export const patchArticle = async (articleId, article) => { + try { + const response = await fetch(`${API_URL_ARTICLE}/${articleId}`, { + method: "PATCH", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(article), + }); + const data = await response.json(); + console.log("상태코드:", response.status, "Data:", data); + return data; + } catch (err) { + console.error("Error updating article:", err); + } +}; + +export const deleteArticle = async (articleId) => { + try { + const response = await fetch(`${API_URL_ARTICLE}/${articleId}`, { + method: "DELETE", + }); + const data = await response.json(); + console.log("상태코드:", response.status, "Data:", data); + return data; + } catch (err) { + console.error("Error deleting article:", err); + } +}; diff --git a/market/ProductService.js b/market/ProductService.js new file mode 100644 index 0000000..1d527ef --- /dev/null +++ b/market/ProductService.js @@ -0,0 +1,83 @@ +const API_URL_PRODUCT = "https://panda-market-api.vercel.app/products"; +export const getProducts = async () => { + try { + const response = await fetch(API_URL_PRODUCT); + const data = await response.json(); + console.log("상태코드:", response.status, "Data:", data); + return data; + } catch (err) { + console.error("Error!"); + } + + return data; +}; + +export const getProductList = async ({ page = 1, pageSize = 10, orderBy = "recent" } = {}) => { + let query = ""; + if (page) query += `page=${page}&`; + if (pageSize) query += `pageSize=${pageSize}&`; + if (orderBy) query += `orderBy=${orderBy}`; + try { + const response = await axios.get(`${API_URL_PRODUCT}?${query}`); + console.log("상태코드:", response.status, "Data:", response.data); + return response.data; + } catch (err) { + console.error("Error!", err.message); + } +}; + +export const getProduct = async (productId) => { + try { + const response = await axios.get(`${API_URL_PRODUCT}/${productId}`); + console.log("상태코드:", response.status, "Data:", response.data); + return response.data; + } catch (err) { + if (err.response) { + console.error("상태코드:", err.response.status, "Data:", err.response.data); + } else { + console.error("Error!", err.message); + } + } +}; + +export const createProduct = async (product) => { + try { + const response = await axios.post(API_URL_PRODUCT, product); + console.log("상태코드:", response.status, "Data:", response.data); + return response.data; + } catch (err) { + if (err.response) { + console.error("상태코드:", err.response.status, "Data:", err.response.data); + } else { + console.error("Error!", err.message); + } + } +}; + +export const patchProduct = async (productId, product) => { + try { + const response = await axios.patch(`${API_URL_PRODUCT}/${productId}`, product); + console.log("상태코드:", response.status, "Data:", response.data); + return response.data; + } catch (err) { + if (err.response) { + console.error("상태코드:", err.response.status, "Data:", err.response.data); + } else { + console.error("Error!", err.message); + } + } +}; + +export const deleteProduct = async (productId) => { + try { + const response = await axios.delete(`${API_URL_PRODUCT}/${productId}`); + console.log("상태코드:", response.status, "Data:", response.data); + return response.data; + } catch (err) { + if (err.response) { + console.error("상태코드:", err.response.status, "Data:", err.response.data); + } else { + console.error("Error!", err.message); + } + } +}; diff --git a/market/product.css b/market/product.css new file mode 100644 index 0000000..4eed9d7 --- /dev/null +++ b/market/product.css @@ -0,0 +1,99 @@ +.products { + display: flex; + justify-content: center; + padding: 24px 0 113px 0; + min-height: 100vh; +} + +.products__inner { + width: 1200px; + display: flex; + flex-direction: column; + gap: 40px; +} + +.products__name { + color: var(--gray800); + font-family: Pretendard; + font-size: 14px; + font-weight: 500; + text-overflow: ellipsis; +} + +.products__price { + color: var(--gray800); + font-family: Pretendard; + font-size: 16px; + font-weight: 700; +} + +.products__list { + display: grid; +} + +.best-products { + display: flex; + flex-direction: column; + gap: 16px; +} + +.best-products__list { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 24px; +} + +.all-products__list { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 24px; + row-gap: 40px; +} + +.product__item { + display: flex; + flex-direction: column; + gap: 6px; + min-height: 301px; +} + +.best-products__item { + min-height: 362px; +} + +.product__image { + width: 219px; + height: 219px; + border-radius: 16px; + flex-shrink: 0; +} + +.best-products__image { + width: 282px; + height: 282px; +} + +.pagination { + display: flex; + justify-content: center; + gap: 8px; +} + +.pagination__button { + display: flex; + justify-content: center; + align-items: center; + width: 40px; + height: 40px; + border-radius: 40px; + background-color: var(--white); + border: 1px solid var(--gray200); + font-family: Pretendard; + font-size: 14px; + font-weight: 500; +} + +.pagination__button:hover { + background-color: var(--blue); + color: var(--white); +} diff --git a/market/product.html b/market/product.html new file mode 100644 index 0000000..79b0a23 --- /dev/null +++ b/market/product.html @@ -0,0 +1,76 @@ + + + + + + + + + + + + + 판다마켓 + + + +
+
+
+ + + + +
+
+ +
+
+
+
+

베스트 상품

+
    + +
  • 상품 2
  • +
  • 상품 3
  • +
  • 상품 3
  • +
+
+ +
+

전체 상품

+
    +
  • 상품 A
  • +
  • 상품 B
  • +
  • 상품 C
  • +
  • 상품 C
  • +
  • 상품 C
  • +
+
+ +
+
+ + + \ No newline at end of file diff --git a/normalize.css b/normalize.css new file mode 100644 index 0000000..1de9f45 --- /dev/null +++ b/normalize.css @@ -0,0 +1,358 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +* { + margin: 0; + box-sizing: border-box; + padding: 0; +} + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0 auto; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; + text-decoration: none; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { + /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { + /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type="button"], +[type="reset"], +[type="submit"] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type="button"]:-moz-focusring, +[type="reset"]:-moz-focusring, +[type="submit"]:-moz-focusring { + outline: 0.1rem dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], +[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -0.2rem; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/style.css b/style.css new file mode 100644 index 0000000..551f618 --- /dev/null +++ b/style.css @@ -0,0 +1,140 @@ +.background-skyblue { + padding-top: 123px; + background-color: var(--skyblue); + display: flex; + justify-content: center; +} + +.hero { + width: 1200px; + display: flex; + justify-content: space-between; + align-items: center; +} + +.hero__inner { + width: 357px; + display: flex; + flex-direction: column; + gap: 32px; + height: 200px; +} + +.hero__title { + color: var(--Gray-700); + font-family: Pretendard; + font-size: 40px; + font-style: normal; + font-weight: 700; + line-height: 140%; /* 56px */ + text-wrap: nowrap; +} + +.hero__button { + display: flex; + font-size: 20px; + justify-content: center; + align-items: center; + width: 357px; + height: 56px; + border-radius: 40px; + background-color: var(--blue); + color: #fff; +} + +.hero__image-container { + width: 100%; + max-width: 996px; + display: flex; + justify-content: center; +} + +.hero__image { + width: 100%; + height: auto; + display: block; + max-width: 996px; +} + +.background-white { + background-color: var(--white); + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.article { + max-width: 1200px; + display: flex; + justify-content: flex-start; + align-items: center; + gap: 64px; + padding: 138px 0px; +} + +.article--even { + flex-direction: row-reverse; + text-align: right; +} + +.article__badge { + color: var(--blue); + font-family: Pretendard; + font-size: 18px; + font-style: normal; + font-weight: 700; + line-height: 140%; /* 25.2px */ +} + +.article__image { + height: 444px; +} + +.article__text { + display: flex; + flex-direction: column; + gap: 24px; +} + +.article__contents { + display: flex; + flex-direction: column; + gap: 24px; +} + +.article__title { + color: var(--gray-700); + font-family: Pretendard; + font-size: 40px; + font-weight: 700; + line-height: 140%; /* 56px */ + letter-spacing: 0.8px; +} + +@media screen and (max-width: 1200px) { + .article__title { + font-size: 32px; + } +} + +.article__description { + color: var(--gray-700); + font-family: Pretendard; + font-size: 24px; + font-weight: 500; + line-height: 120%; /* 28.8px */ + letter-spacing: 1.92px; +} + +@media screen and (max-width: 1919px) { + .article__description { + font-size: 18px; + } +} + +@media screen and (max-width: 1919px) { + .article__badge { + font-size: 18px; + } +}