feat: random image from assets
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package pages
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"math/rand/v2"
|
||||
"time"
|
||||
|
||||
"forge.capytal.company/capytalcode/project-comicverse/lib/router/rerrors"
|
||||
@@ -35,7 +37,7 @@ templ (p *Home) page() {
|
||||
></div>
|
||||
<img
|
||||
class="absolute z-1 top-0 left-0 -translate-x-15% h-100% md:relative md:h-70% md:translate-x-0 md:rounded-xl"
|
||||
src="/assets/img/2.png"
|
||||
src={ fmt.Sprintf("/assets/img/%d.png", rand.IntN(4-1)+1) }
|
||||
/>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user