add initial project for frontend

Signed-off-by: Tobias Erbshäußer <tobias@tesoft.dev>
This commit is contained in:
2026-05-24 09:30:31 +02:00
commit b4b06bfa42
15 changed files with 3236 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
<template id="tesoft-button-template">
<style>
@import "src/styles/default.css";
</style>
<button>
<slot></slot>
</button>
</template>
<script src="/src/components/button.ts" type="module"></script>
+15
View File
@@ -0,0 +1,15 @@
import {TesoftComponent} from "../scripts/main.ts";
export class TesoftButton extends TesoftComponent {
constructor() {
super();
const template = document.getElementById("tesoft-button-template") as HTMLTemplateElement;
const templateContent = template.content;
const shadowRoot = this.attachShadow({mode: "open"});
shadowRoot.appendChild(templateContent.cloneNode(true));
}
}
customElements.define("tesoft-button", TesoftButton);