Feat: clue template for mime

This commit is contained in:
Grail Finder
2025-05-09 15:29:49 +03:00
parent 6c9c86f02b
commit 2f4891473b
2 changed files with 21 additions and 0 deletions

17
components/mimeclue.html Normal file
View File

@ -0,0 +1,17 @@
{{define "mimeclue"}}
<div class="flex gap-4 w-full">
<input type="text"
class="flex-1 px-4 py-2 text-lg border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Enter clue..."
required>
<input type="number"
class="w-24 px-4 py-2 text-lg border-2 border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Number"
min="1"
max="9"
required>
<button type="submit" class="px-6 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors">
Send
</button>
</div>
{{end}}

View File

@ -35,6 +35,10 @@
{{template "cardtable" .Room}}
</div>
<div>
{{if eq .State.Role "guesser"}}
<button hx-get="/end-turn" hx-target="#room" class="bg-amber-100 text-black px-4 py-2 rounded">End Turn</button>
{{else if eq .State.Role "mime"}}
{{template "mimeclue"}}
{{end}}
</div>
{{end}}