Initial File Commit

This commit is contained in:
Mario Lurig
2025-12-09 00:09:08 -07:00
committed by GitHub
parent 93dfb03453
commit bf8ffbea9d
2 changed files with 2194 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TRMNL YML Form Builder - Web Component Test</title>
<script src="https://cdn.jsdelivr.net/npm/tailwindcss@4.1.17/dist/lib.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@4.1.17/index.min.css " rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
/* font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif; */
}
trmnl-yaml-form {
display: block;
width: 100%;
height: 100vh;
}
</style>
</head>
<body>
<!-- The Web Component -->
<trmnl-form-builder accent-color="#F8654B" theme="light"></trmnl-form-builder>
<!-- Load the Web Component -->
<script src="trmnl-form-builder.js"></script>
<!-- Example: Access the component programmatically -->
<script>
// Wait for the component to be ready
customElements.whenDefined('trmnl-form-builder').then(() => {
const form = document.querySelector('trmnl-form-builder');
// You can access the component's public API:
// form.getYaml() - Get the generated YAML
// form.getFields() - Get the current fields array
// form.setFields(fields) - Load fields from an array
// form.clear() - Clear all fields
console.log('TRMNL YML Form Builder Web Component loaded');
});
</script>
</body>
</html>
File diff suppressed because it is too large Load Diff