Skip to content

Commit

Permalink
Initial frontend commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-nicklaus committed Mar 24, 2024
1 parent ccf7729 commit 4574eb2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
27 changes: 25 additions & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,35 @@
<script type="text/javascript">
document.addEventListener("alpine:init", () => {
Alpine.data("state", () => ({
"test": "Hello World!"
"task": "entscheid-zsfg",
"fields": {
"entscheid-zsfg": {
"display_name": "Entscheid zusammenfassen",
"inputs": [
{
"name": "fundstelle",
"display_name": "Fundstelle",
"type": "text"
},
{
"name": "rolle",
"display_name": "Was ist Ihre Rolle?",
"type": "text"
}
]
}
},
async getTaskSelectHTML() {
return `<select>
${Object.keys(this.fields).map(t => "<option")}
</select>`
}
}))
});
</script>
<div x-data="state" id="basediv">
<h1 class="text-red-400" x-text="test"></h1>
<h1 class="text-2xl">Legal Prompt Builder v0.1</h1>
<div x-html="getTaskSelectHTML"></div>
</div>
</body>
</html>
5 changes: 5 additions & 0 deletions frontend/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,11 @@ video {
--tw-backdrop-sepia: ;
}

.text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}

.text-red-400 {
--tw-text-opacity: 1;
color: rgb(248 113 113 / var(--tw-text-opacity));
Expand Down

0 comments on commit 4574eb2

Please sign in to comment.