feat(components): extract anime pending state component
This commit is contained in:
25
web/components/anime/pending.templ
Normal file
25
web/components/anime/pending.templ
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package anime
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"mal/web/templates"
|
||||||
|
)
|
||||||
|
|
||||||
|
templ Pending(id int) {
|
||||||
|
@templates.Layout("mal - anime pending", true) {
|
||||||
|
<div class="grid items-start gap-5 xl:grid-cols-[minmax(0,1fr)_300px]">
|
||||||
|
<div class="grid min-w-0 gap-8">
|
||||||
|
<section>
|
||||||
|
<h1>Anime data is being fetched</h1>
|
||||||
|
<p class="text-sm text-(--text-muted)">We could not load this anime right now. A background worker is retrying data fetch for anime #{ fmt.Sprintf("%d", id) }.</p>
|
||||||
|
<p class="text-sm text-(--text-muted)">Refresh this page in a few seconds.</p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
setTimeout(function() {
|
||||||
|
window.location.reload()
|
||||||
|
}, 10000)
|
||||||
|
</script>
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user