added 3 things: min 2 max 8 options in quetion, the quetion and awnser in the host panle too, clour coded and symbol for awnsers.

This commit is contained in:
RezHackXYZ 2025-05-24 07:26:49 +05:30
parent 2a4102438a
commit ad959266a5
No known key found for this signature in database
24 changed files with 259 additions and 45 deletions

View file

@ -0,0 +1,23 @@
<script>
import { CurrentQuestionDetails } from "../../../logic/HostsData.svelte.js";
import config from "$lib/config.json";
</script>
<div class="mt-5 grid grid-cols-2 gap-5 gap-x-3">
{#each CurrentQuestionDetails.v.answers as answer, index}
<div class="flex">
<input type="radio" name="question" class="sr-only" />
<label
for="O{index}"
style="
--border-color: {config.AnswersSymbolAndColor[index].Color};
--bg-color: {config.AnswersSymbolAndColor[index].Color};
"
class="w-full rounded-lg border-[5px] border-[var(--border-color)] bg-[var(--bg-color)] pt-1 pr-2 pb-1 pl-2 text-center text-3xl transition-all"
>
<i class="nf {config.AnswersSymbolAndColor[index].Symbol}"></i>
{answer}
</label>
</div>
{/each}
</div>