🐛 Fixed content shift(s) in editor

This commit is contained in:
Mawoka
2023-02-09 16:36:47 +01:00
parent 6e9d614f3f
commit abf1583a1d
5 changed files with 10 additions and 10 deletions
@@ -43,7 +43,7 @@
{#if Array.isArray(data.questions[selected_question].answers)} {#if Array.isArray(data.questions[selected_question].answers)}
{#each data.questions[selected_question].answers as answer, index} {#each data.questions[selected_question].answers as answer, index}
<div <div
out:fade={{ duration: 150 }} out:fade|local={{ duration: 150 }}
class="p-4 rounded-lg flex justify-center w-full transition relative" class="p-4 rounded-lg flex justify-center w-full transition relative"
class:bg-red-500={!answer.right} class:bg-red-500={!answer.right}
class:bg-green-500={answer.right} class:bg-green-500={answer.right}
@@ -136,7 +136,7 @@
<button <button
class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600" class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600"
type="button" type="button"
in:fade={{ duration: 150 }} in:fade|local={{ duration: 150 }}
on:click={() => { on:click={() => {
data.questions[selected_question].answers = [ data.questions[selected_question].answers = [
...data.questions[selected_question].answers, ...data.questions[selected_question].answers,
@@ -57,7 +57,7 @@
{#each data.questions[selected_question].answers as answer, i (answer.id)} {#each data.questions[selected_question].answers as answer, i (answer.id)}
<div <div
animate:flip={{ duration: 200 }} animate:flip={{ duration: 200 }}
out:fade={{ duration: 150 }} out:fade|local={{ duration: 150 }}
class="p-4 rounded-lg flex justify-center w-full transition relative border border-gray-600 flex-row gap-4 m-2" class="p-4 rounded-lg flex justify-center w-full transition relative border border-gray-600 flex-row gap-4 m-2"
> >
<button <button
@@ -160,7 +160,7 @@
<button <button
class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600 m-2 w-full" class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600 m-2 w-full"
type="button" type="button"
in:fade={{ duration: 150 }} in:fade|local={{ duration: 150 }}
on:click={() => { on:click={() => {
data.questions[selected_question].answers = [ data.questions[selected_question].answers = [
...data.questions[selected_question].answers, ...data.questions[selected_question].answers,
@@ -38,7 +38,7 @@
{#if Array.isArray(data.questions[selected_question].answers)} {#if Array.isArray(data.questions[selected_question].answers)}
{#each data.questions[selected_question].answers as answer, index} {#each data.questions[selected_question].answers as answer, index}
<div <div
out:fade={{ duration: 150 }} out:fade|local={{ duration: 150 }}
class="p-4 rounded-lg flex justify-center w-full transition relative" class="p-4 rounded-lg flex justify-center w-full transition relative"
class:dark:bg-gray-500={answer.answer} class:dark:bg-gray-500={answer.answer}
class:bg-gray-300={answer.answer} class:bg-gray-300={answer.answer}
@@ -122,7 +122,7 @@
<button <button
class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600" class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600"
type="button" type="button"
in:fade={{ duration: 150 }} in:fade|local={{ duration: 150 }}
on:click={() => { on:click={() => {
data.questions[selected_question].answers = [ data.questions[selected_question].answers = [
...data.questions[selected_question].answers, ...data.questions[selected_question].answers,
@@ -42,7 +42,7 @@
{#if Array.isArray(data.questions[selected_question].answers)} {#if Array.isArray(data.questions[selected_question].answers)}
{#each data.questions[selected_question].answers as answer, index} {#each data.questions[selected_question].answers as answer, index}
<div <div
out:fade={{ duration: 150 }} out:fade|local={{ duration: 150 }}
class="p-4 rounded-lg flex justify-center w-full transition relative" class="p-4 rounded-lg flex justify-center w-full transition relative"
class:bg-yellow-500={!reach(VotingQuestionSchema, 'answer').isValidSync( class:bg-yellow-500={!reach(VotingQuestionSchema, 'answer').isValidSync(
answer.answer answer.answer
@@ -96,7 +96,7 @@
<button <button
class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600" class="p-4 rounded-lg bg-transparent border-gray-500 border-2 hover:bg-gray-300 transition dark:hover:bg-gray-600"
type="button" type="button"
in:fade={{ duration: 150 }} in:fade|local={{ duration: 150 }}
on:click={() => { on:click={() => {
data.questions[selected_question].answers = [ data.questions[selected_question].answers = [
...data.questions[selected_question].answers, ...data.questions[selected_question].answers,
+2 -2
View File
@@ -83,7 +83,7 @@
{#if modalOpen} {#if modalOpen}
<div <div
class="w-full h-full absolute top-0 left-0 bg-opacity-60 z-20 flex justify-center" class="w-full h-full absolute top-0 left-0 bg-opacity-60 z-20 flex justify-center"
transition:fade transition:fade|local
> >
<div> <div>
<button <button
@@ -100,7 +100,7 @@
</div> </div>
</div> </div>
{/if} {/if}
<div class="flex justify-center w-full pt-10" transition:fade> <div class="flex justify-center w-full pt-10" transition:fade|local>
<button <button
class="rounded-lg p-4 flex justify-center bg-transparent border-gray-500 border-2 w-1/2 hover:bg-gray-300 dark:hover:bg-gray-600 transition" class="rounded-lg p-4 flex justify-center bg-transparent border-gray-500 border-2 w-1/2 hover:bg-gray-300 dark:hover:bg-gray-600 transition"
type="button" type="button"