Enha: split onto more templates

This commit is contained in:
Grail Finder
2025-05-04 08:36:53 +03:00
parent 06203ab39e
commit e335bf9dc8
9 changed files with 111 additions and 103 deletions

18
components/teampew.html Normal file
View File

@ -0,0 +1,18 @@
{{define "teampew"}}
<div class="w-1/4 p-4 border-r">
<h2 class="text-xl mb-4">Join {{.}} Team</h2>
<form hx-post="/join-team" hx-target="#room-content">
<input type="hidden" name="team" value="{{.}}">
<div class="mb-2">
<button type="submit" name="role" value="guesser" class="w-full bg-blue-500 text-white py-2 px-4 rounded">
Join as Guesser
</button>
</div>
<div>
<button type="submit" name="role" value="mime" class="w-full bg-blue-700 text-white py-2 px-4 rounded">
Join as Mime
</button>
</div>
</form>
</div>
{{end}}