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 @@
- 코드리뷰를 통해 새로운 관점을 배울 수 있어요 - 디스코드 참여하기

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