generated from mathias/template-go-web
Initial commit
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package web
|
||||
|
||||
templ Index() {
|
||||
@Layout("hostexecutor") {
|
||||
<h1 class="text-3xl font-semibold mb-6">hostexecutor</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>
|
||||
}
|
||||
Reference in New Issue
Block a user