Handle quote of the day

This commit is contained in:
nemunaire 2022-10-04 12:29:16 +02:00
commit 5799eb32ef
2 changed files with 61 additions and 8 deletions

View file

@ -3,17 +3,27 @@
Container,
Icon,
} from 'sveltestrap';
import { quotes } from '../stores/quotes';
</script>
<Container class="flex-fill d-flex flex-column justify-content-center text-center">
<figure>
<blockquote class="blockquote text-muted">
<p class="display-6">A well-known quote, contained in a blockquote element.</p>
</blockquote>
<figcaption class="blockquote-footer">
Someone famous in <cite title="Source Title">Source Title</cite>
</figcaption>
</figure>
{#if $quotes.quoteOfTheDay}
<figure>
<blockquote class="blockquote text-muted">
<p class="display-6">{$quotes.quoteOfTheDay.content}</p>
</blockquote>
<figcaption class="blockquote-footer">
{$quotes.quoteOfTheDay.author}
</figcaption>
</figure>
{:else}
{#await quotes.refreshQOTD()}
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
{/await}
{/if}
<div class="display-5 mb-4">
Prochain réveil&nbsp;: demain matin à 7h10 (dans 5 cycles)
</div>