aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-10-07 04:23:59 +0300
committerAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-10-07 04:25:41 +0300
commit3ee654f6fb3cdf119630bfba8066c96ec26428c3 (patch)
treefa009ec77254d7ca59ebeb9bf1641b4ddd34856f
parent895c7905f9e39bbb046c130a3a94e4044bf6c989 (diff)
Подгрузка страниц аяксом
-rw-r--r--pkg/tpl/index.templ2
-rw-r--r--pkg/tpl/index_templ.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tpl/index.templ b/pkg/tpl/index.templ
index b405f3e..3655531 100644
--- a/pkg/tpl/index.templ
+++ b/pkg/tpl/index.templ
@@ -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>
}
diff --git a/pkg/tpl/index_templ.go b/pkg/tpl/index_templ.go
index 4d249ab..eabd30d 100644
--- a/pkg/tpl/index_templ.go
+++ b/pkg/tpl/index_templ.go
@@ -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
}