File size: 883 Bytes
7630f5a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | class AppLayout extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: flex;
flex-direction: column;
min-height: 100vh;
}
main {
flex: 1;
padding-top: 80px;
padding-bottom: 2rem;
}
.content-wrapper {
max-width: 1400px;
margin: 0 auto;
width: 100%;
padding: 0 2rem;
}
@media (max-width: 768px) {
.content-wrapper {
padding: 0 1rem;
}
}
</style>
<custom-navbar></custom-navbar>
<main>
<div class="content-wrapper">
<slot></slot>
</div>
</main>
<custom-footer></custom-footer>
`;
}
}
customElements.define('app-layout', AppLayout); |