|
16 | 16 | 'border-success': example.solved == 'solved', |
17 | 17 | 'border-error': example.solved != 'solved' && example.solved != 'pending', |
18 | 18 | }"> |
| 19 | + <div class="flex justify-between mb-4"> |
| 20 | + <p class="text-heading">{{ t("Headings.Example") }}: {{ i + 1 }}</p> |
| 21 | + <div v-if="example.solved == 'solved' && !example.loading" |
| 22 | + class="flex items-center bg-primary py-1.5 px-2 rounded-md shadow-md"> |
| 23 | + <CheckCircleIcon class="h-5 w-5 text-accent mr-2" /> |
| 24 | + <p class="text-sm text-success"> |
| 25 | + {{ t("Headings.Solved") }} |
| 26 | + </p> |
| 27 | + </div> |
| 28 | + <InputBtn v-else secondary :icon="PlayIcon" :loading="example.loading" @click="testExample(example.id)" sm |
| 29 | + class="text-white"> |
| 30 | + {{ t("Buttons.Test") }} |
| 31 | + </InputBtn> |
| 32 | + </div> |
19 | 33 | <div class="sm:flex max-sm:space-y-2 sm:space-x-4 mb-4"> |
20 | 34 | <div class="w-full text-sm bg-secondary py-2 px-4 rounded-md"> |
21 | 35 | <p class="text-white"> |
|
54 | 68 | <p class="whitespace-pre-wrap"> {{ example?.stderr ?? '' }} </p> |
55 | 69 | </div> |
56 | 70 |
|
57 | | - <div class="text-sm bg-primary py-2 px-4 rounded-md my-4" v-if="!!example?.stdout && example.solved != 'solved' && !example.loading"> |
| 71 | + <div class="text-sm bg-primary py-2 px-4 rounded-md my-4" |
| 72 | + v-if="!!example?.stdout && example.solved != 'solved' && !example.loading"> |
58 | 73 | <p class="text-success mb-2">{{ t("Headings.ActualOutput") }}:</p> |
59 | 74 | <p class="whitespace-pre-wrap"> {{ example?.stdout ?? '' }} </p> |
60 | 75 | </div> |
|
64 | 79 | <p class="whitespace-pre-wrap"> {{ example?.explanation ?? '' }} </p> |
65 | 80 | </div> |
66 | 81 |
|
67 | | - <div class="flex justify-end"> |
68 | | - <div v-if="example.solved == 'solved' && !example.loading" |
69 | | - class="flex items-center bg-primary py-1.5 px-2 rounded-md shadow-md"> |
70 | | - <CheckCircleIcon class="h-5 w-5 text-accent mr-2" /> |
71 | | - <p class="text-sm text-success"> |
72 | | - {{ t("Headings.Solved") }} |
73 | | - </p> |
74 | | - </div> |
75 | | - <InputBtn v-else secondary :icon="PlayIcon" :loading="example.loading" @click="testExample(example.id)" sm |
76 | | - class="text-white"> |
77 | | - {{ t("Buttons.Test") }} |
78 | | - </InputBtn> |
79 | | - </div> |
| 82 | + |
80 | 83 | </div> |
81 | 84 | </section> |
82 | 85 | </div> |
|
0 commit comments