Подгрузка страниц аяксом

This commit is contained in:
Александр Кирюхин 2024-10-07 04:23:59 +03:00
parent 895c7905f9
commit 3ee654f6fb
Signed by: neonxp
SSH key fingerprint: SHA256:SVt7TjxbVc87m1QYaQziOJ0N3OCFURv2g76gD/UTTXI
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ templ Index(quotes []model.Quote, page, count int) {
@Quote(&q)
}
<nav>
<ul>
<ul hx-boost="true">
if page > 0 {
<li><a href={ templ.URL(fmt.Sprintf("/?page=%d", page-1)) }>&larr;</a></li>
}

View file

@ -53,7 +53,7 @@ func Index(quotes []model.Quote, page, count int) templ.Component {
return templ_7745c5c3_Err
}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <nav><ul>")
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <nav><ul hx-boost=\"true\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}