From 5516b76901003a5bfbb62ecafe1cff8f3c476b57 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 4 Sep 2024 09:06:20 -0400 Subject: [PATCH] remove demo code --- greenwood.config.js | 4 --- www/components/hero/hero.css | 18 ------------- www/components/hero/hero.js | 50 ----------------------------------- www/components/hero/hero.json | 3 --- www/pages/index.html | 2 -- 5 files changed, 77 deletions(-) delete mode 100644 www/components/hero/hero.css delete mode 100644 www/components/hero/hero.js delete mode 100644 www/components/hero/hero.json diff --git a/greenwood.config.js b/greenwood.config.js index c27b10fb2..216952137 100644 --- a/greenwood.config.js +++ b/greenwood.config.js @@ -11,10 +11,6 @@ export default { optimization: 'inline', staticRouter: true, interpolateFrontmatter: true, - polyfills: { - // importMaps: true, - importAttributes: ['css', 'json'] - }, plugins: [ greenwoodPluginGraphQL(), greenwoodPluginPolyfills({ diff --git a/www/components/hero/hero.css b/www/components/hero/hero.css deleted file mode 100644 index 86fb17fc3..000000000 --- a/www/components/hero/hero.css +++ /dev/null @@ -1,18 +0,0 @@ -:host { - text-align: center; - margin-bottom: 40px; -} - -:host h2 { - font-size: 3em; -} - -:host button { - display: inline-block; - background-color: var(--color-primary); - color: var(--color-white); - font-size: 1.5em; - padding: 14px; - border-radius: 10px; - cursor: pointer; -} \ No newline at end of file diff --git a/www/components/hero/hero.js b/www/components/hero/hero.js deleted file mode 100644 index f91045cc9..000000000 --- a/www/components/hero/hero.js +++ /dev/null @@ -1,50 +0,0 @@ -import sheet from './hero.css' with { type: 'css' }; -import json from './hero.json' with { type: 'json' }; - -const template = document.createElement('template'); - -template.innerHTML = ` -
-

Welcome to my website

- - - - - - - - -
-`; - -export default class HeroBanner extends HTMLElement { - clickButton(el) { - const content = el.textContent; - const buttonClickedEvent = new CustomEvent('update-modal', { - detail: { - content: `You selected "${content}"` - } - }); - - console.log('clicked button =>', content); - - window.dispatchEvent(buttonClickedEvent); - } - - connectedCallback() { - console.log({ sheet, json }); - - if (!this.shadowRoot) { - this.attachShadow({ mode: 'open' }); - this.shadowRoot.appendChild(template.content.cloneNode(true)); - } - - this.shadowRoot.adoptedStyleSheets = [sheet]; - this.shadowRoot.querySelectorAll('button') - .forEach(button => { - button.addEventListener('click', () => this.clickButton(button)); - }); - } -} - -customElements.define('app-hero', HeroBanner); \ No newline at end of file diff --git a/www/components/hero/hero.json b/www/components/hero/hero.json deleted file mode 100644 index 45437a894..000000000 --- a/www/components/hero/hero.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "msg": "Hello World" -} \ No newline at end of file diff --git a/www/pages/index.html b/www/pages/index.html index 20df1a9bf..9f6d5450d 100644 --- a/www/pages/index.html +++ b/www/pages/index.html @@ -7,7 +7,6 @@ - @@ -16,7 +15,6 @@
-