feat: use random image from the set

This commit is contained in:
Guz
2024-12-13 21:13:23 -03:00
parent 8c4c39fc9c
commit 0e5c00fc89

View File

@@ -2,10 +2,13 @@ package pages
import (
"net/http"
"fmt"
"time"
"forge.capytal.company/capytalcode/project-comicverse/lib/router/rerrors"
"keikos.work/templates/layouts"
"time"
"math/rand/v2"
)
type Home struct{}
@@ -28,7 +31,7 @@ templ (p *Home) page() {
class="-translate-x-20% sm:translate-x-0 md:translate-x-0 block md:flex md:justify-center"
>
<img
src="/assets/img/2024-09-02.png"
src={ fmt.Sprintf("/assets/img/%d.png", rand.IntN(4-1)+1) }
class="h-100vh md:h-50vh animate-fade-in-right md:animate-fade-in-up animate-ease-out md:animate-ease-out md:rounded-2xl"
/>
</span>