diff --git a/src/App.js b/src/App.js index c4e409b..6aa0c94 100644 --- a/src/App.js +++ b/src/App.js @@ -1,6 +1,11 @@ -import { LitElement } from 'lit' +import { LitElement, css, html, unsafeCSS } from 'lit' import Router from './api/Router.js' +import MainCSS from './assets/styles/main.scss?inline' + +import './components/Header.js' +import './components/Footer.js' + // global reset import './assets/styles/main.scss' @@ -26,9 +31,20 @@ export class App extends LitElement { } render() { - return Router.render() + return html` + ${Router.route.path == '/' ? '' : html``} + ${Router.render()} + ${Router.route.path == '/' ? '' : html``} + ` } + static styles = [ css`${unsafeCSS(MainCSS)}`, css` + :host { + display: flex; + flex-direction: column; + height: 100vh; + } +` ] } customElements.define('mm-app', App) diff --git a/src/components/Footer.js b/src/components/Footer.js index a770bfa..ebfbaa4 100644 --- a/src/components/Footer.js +++ b/src/components/Footer.js @@ -5,10 +5,16 @@ import MainCSS from '../assets/styles/main.scss?inline' import './SvgIcon.js' class Footer extends LitElement { - static properties = {} + static properties = { + path: { type: String } + } constructor() { super() + this.path = '' + } + + firstUpdated() { } render() { @@ -16,7 +22,7 @@ class Footer extends LitElement {