add next button

This commit is contained in:
Daniel Bulant 2022-08-22 15:00:22 +02:00
parent 9821fc74c1
commit 768bd7daf5

View file

@ -143,6 +143,7 @@
var textElement; var textElement;
$: { $: {
if(textElement) { if(textElement) {
// don't try to fix this animation, svelte transitions won't help.
d; // everytime d is changed d; // everytime d is changed
textElement.classList.remove("animate"); textElement.classList.remove("animate");
void textElement.offsetWidth; void textElement.offsetWidth;
@ -179,6 +180,7 @@
<h1>???</h1> <h1>???</h1>
{/if} {/if}
{#if d.text} {#if d.text}
<!-- Don't try to fix this animation. I tried. Multiple times. Using svelte transitions won't help. -->
<p class="animate" bind:this={textElement}> <p class="animate" bind:this={textElement}>
{#if d.flags && d.flags.includes("chapters") && chaptersDone.length === 0} {#if d.flags && d.flags.includes("chapters") && chaptersDone.length === 0}
{d.alt} {d.alt}
@ -201,8 +203,10 @@
</div> </div>
{/each} {/each}
</div> </div>
{:else} {:else if !success}
<div class="next-center">
<img src="/images/button/next.webp" alt="">
</div>
{/if} {/if}
</div> </div>
{#if success} {#if success}
@ -346,4 +350,14 @@
height: 100%; height: 100%;
bottom: 0px; bottom: 0px;
} }
.next-center {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.next-center img {
width: 60px;
height: 60px;
}
</style> </style>