feat: initial template (Go + Templ + HTMX + CDN Tailwind)
Some checks failed
CD / Lint / Test / Vet (push) Failing after 5s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped

This commit is contained in:
Mathias Bergqvist
2026-05-05 08:19:04 +02:00
parent 57c1e460b7
commit a25120cd1d
11 changed files with 270 additions and 2 deletions

16
internal/web/index.templ Normal file
View File

@@ -0,0 +1,16 @@
package web
templ Index() {
@Layout("__PROJECT_NAME__") {
<h1 class="text-3xl font-semibold mb-6">__PROJECT_NAME__</h1>
<button hx-get="/api/hello" hx-target="#out"
class="px-4 py-2 bg-slate-900 text-white rounded-md hover:bg-slate-700">
Say hello
</button>
<div id="out" class="mt-6 text-slate-700"></div>
}
}
templ Hello(name string) {
<p>Hello, { name }!</p>
}