From 5c1a3d4a61616fa698b05f871e214bfb96a10b24 Mon Sep 17 00:00:00 2001 From: Dale Seo <5466341+DaleSeo@users.noreply.github.com> Date: Sat, 22 Jun 2024 07:12:44 -0400 Subject: [PATCH] Revert "feat : made hero component responsive" --- components/hero.js | 42 ---------------------------------------- components/hero/hero.css | 4 ++++ components/hero/hero.js | 17 ++++++++++++++++ index.html | 2 -- main.js | 4 ++-- 5 files changed, 23 insertions(+), 46 deletions(-) delete mode 100644 components/hero.js create mode 100644 components/hero/hero.css create mode 100644 components/hero/hero.js diff --git a/components/hero.js b/components/hero.js deleted file mode 100644 index 0568770..0000000 --- a/components/hero.js +++ /dev/null @@ -1,42 +0,0 @@ -const css = ` - -`; - -const html = ` -

- -

-`; - -class Hero extends HTMLElement { - constructor() { - super(); - this.attachShadow({ mode: 'open' }); - this.shadowRoot.innerHTML = css + html; - } -} - -customElements.define('ds-hero', Hero); diff --git a/components/hero/hero.css b/components/hero/hero.css new file mode 100644 index 0000000..a94d1e5 --- /dev/null +++ b/components/hero/hero.css @@ -0,0 +1,4 @@ +.hero-description { + font-size: 5rem; + font-weight: medium; +} diff --git a/components/hero/hero.js b/components/hero/hero.js new file mode 100644 index 0000000..391a468 --- /dev/null +++ b/components/hero/hero.js @@ -0,0 +1,17 @@ +const template = document.createElement('template'); +template.innerHTML = ` + +

+ +

+`; + +class Hero extends HTMLElement { + constructor() { + super(); + this.attachShadow({ mode: 'open' }); + this.shadowRoot.appendChild(template.content.cloneNode(true)); + } +} + +window.customElements.define('hero-component', Hero); diff --git a/index.html b/index.html index 7b6d190..81db82c 100644 --- a/index.html +++ b/index.html @@ -270,8 +270,6 @@
- 코드리뷰를 통해 새로운 관점을 배울 수 있어요 - 디스코드 참여하기

코드리뷰를 통해 새로운 관점을 배울 수 있어요