Schätzfunktion( (mit Schieberegler) #148
This commit is contained in:
@@ -115,10 +115,41 @@
|
||||
<div class="flex gap-2">
|
||||
<button id="send_order"
|
||||
onclick="submitOrderAnswer()"
|
||||
class="mt-2 text-center p-2 bg-gray-100 hover:bg-blue-100 rounded-lg transition-colors duration-200 answer-option dark:bg-transparent dark:text-white dark:hover:bg-[#2a2f3a] ">
|
||||
abschicken
|
||||
class="px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg transition-colors duration-200 answer-option "
|
||||
>
|
||||
Abschicken
|
||||
</button>
|
||||
|
||||
{% elif question_data.type == "guess" %}
|
||||
<form class="flex flex-col items-center gap-4 mt-4">
|
||||
<!-- Slider mit Beschriftung -->
|
||||
<div class="w-full max-w-xl text-center">
|
||||
<input
|
||||
id="textanswer"
|
||||
type="range"
|
||||
min="{{ question_data.min }}"
|
||||
max="{{ question_data.max }}"
|
||||
value="{{ question_data.min }}"
|
||||
step="1"
|
||||
oninput="document.getElementById('range-value').textContent = 'Wert: ' + this.value;"
|
||||
class="w-full answer-option bg-gray-100 hover:bg-blue-100 rounded-lg transition-colors duration-200 dark:bg-transparent dark:text-white dark:hover:bg-[#2a2f3a]"
|
||||
>
|
||||
<p id="range-value" class="mt-2 font-bold text-gray-800 dark:text-white">Wert: {{ question_data.min }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Abschicken-Button -->
|
||||
<button
|
||||
|
||||
onclick="submitAnswer(-1);"
|
||||
|
||||
class="px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg transition-colors duration-200 answer-option "
|
||||
>
|
||||
Abschicken
|
||||
</button>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -126,14 +157,15 @@
|
||||
|
||||
|
||||
|
||||
{% else %}
|
||||
{% elif question_data.type == "input" %}
|
||||
<form action="">
|
||||
<input id="textanswer" type="text" placeholder="DEINE ANTWORT"
|
||||
class="answer-option text-center p-2 bg-gray-100 hover:bg-blue-100 rounded-lg transition-colors duration-200 answer-option lg:w-80 dark:bg-transparent dark:text-white dark:hover:bg-[#2a2f3a]">
|
||||
<button
|
||||
onclick="submitAnswer( -1 );"
|
||||
class="mt-2 text-center p-2 bg-gray-100 hover:bg-blue-100 rounded-lg transition-colors duration-200 answer-option dark:bg-transparent dark:text-white dark:hover:bg-[#2a2f3a]">
|
||||
abschicken
|
||||
class="px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white font-semibold rounded-lg transition-colors duration-200 answer-option "
|
||||
>
|
||||
Abschicken
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user