fix: initial commit
This commit is contained in:
35
js/components/site-content.js
Normal file
35
js/components/site-content.js
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Site Content Component
|
||||
* Main content area wrapper with slot for page content
|
||||
*/
|
||||
class SiteContent extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.attachShadow({ mode: 'open' });
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
this.render();
|
||||
}
|
||||
|
||||
render() {
|
||||
this.shadowRoot.innerHTML = `
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: var(--spacing-md, 1rem);
|
||||
}
|
||||
</style>
|
||||
<main class="content">
|
||||
<slot></slot>
|
||||
</main>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define('site-content', SiteContent);
|
||||
Reference in New Issue
Block a user