Skip to content

Commit

Permalink
refactor website away from lightMode config
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jun 5, 2022
1 parent 74d18fe commit 655b766
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 20 deletions.
4 changes: 1 addition & 3 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ async function init() {
const distRoot = './dist';
const pagesRoot = './docs/pages';
const pages = await fs.readdir(new URL(pagesRoot, import.meta.url));
const { html } = await renderToString(new URL('./docs/index.js', import.meta.url), {
lightMode: true
});
const { html } = await renderToString(new URL('./docs/index.js', import.meta.url));

await fs.rm(distRoot, { recursive: true, force: true });
await fs.mkdir(distRoot, { recursive: true });
Expand Down
5 changes: 1 addition & 4 deletions docs/components/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ template.innerHTML = `

class Footer extends HTMLElement {
connectedCallback() {
if (!this.shadowRoot) {
this.attachShadow({ mode: 'open' });
this.shadowRoot.appendChild(template.content.cloneNode(true));
}
this.appendChild(template.content.cloneNode(true));
}
}

Expand Down
5 changes: 1 addition & 4 deletions docs/components/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ template.innerHTML = `

class Header extends HTMLElement {
connectedCallback() {
if (!this.shadowRoot) {
this.attachShadow({ mode: 'open' });
this.shadowRoot.appendChild(template.content.cloneNode(true));
}
this.appendChild(template.content.cloneNode(true));
}
}

Expand Down
6 changes: 1 addition & 5 deletions docs/components/navigation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// intentionally nested in the assets/ directory to test wcc nested dependency resolution logic
const template = document.createElement('template');

template.innerHTML = `
Expand Down Expand Up @@ -34,10 +33,7 @@ template.innerHTML = `

class Navigation extends HTMLElement {
connectedCallback() {
if (!this.shadowRoot) {
this.attachShadow({ mode: 'open' });
this.shadowRoot.appendChild(template.content.cloneNode(true));
}
this.appendChild(template.content.cloneNode(true));
}
}

Expand Down
5 changes: 1 addition & 4 deletions docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ template.innerHTML = `
class Home extends HTMLElement {

connectedCallback() {
if (!this.shadowRoot) {
this.attachShadow({ mode: 'open' });
this.shadowRoot.appendChild(template.content.cloneNode(true));
}
this.appendChild(template.content.cloneNode(true));
}
}

Expand Down

0 comments on commit 655b766

Please sign in to comment.