feat: use random image from the set
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user