arefamer's picture
ุงุนุทูŠู†ูŠ ุงู„ู‡ูŠูƒู„ ุจุดูƒู„ ุฎุฑุงููŠ
7630f5a verified
Raw History Blame Contribute Delete
883 Bytes
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);