diff --git a/components/layout.js b/components/layout.js index cf125d0..4665841 100644 --- a/components/layout.js +++ b/components/layout.js @@ -3,12 +3,6 @@ export class Layout extends HTMLElement { super() this.attachShadow({mode: 'open'}) this.header = document.createElement('m-header') - this.editing = false - this.header.editing = this.editing - this.header.addEventListener('click-edit', () => { - this.editing = !this.editing - this.header.editing = this.editing - }) this.shadowRoot.appendChild(this.header) this.load() addEventListener('hashchange', () => { @@ -45,6 +39,9 @@ export class Layout extends HTMLElement { } get path() { - return '/hello' + return new URL( + window.location.hash.slice(1) || '/', + window.location + ).pathname } } \ No newline at end of file