This commit is contained in:
2023-03-10 16:34:28 +08:00
parent 35aea309f4
commit f61b726ca8
2 changed files with 13 additions and 7 deletions
+4 -4
View File
@@ -14,7 +14,7 @@ func Index(c *gin.Context) {
if p < 1 {
p = 1
}
limit := 100
limit := 5
start := (p - 1) * limit
list := make([]*Article, 0)
@@ -44,9 +44,9 @@ func Index(c *gin.Context) {
nextPage = p + 1
}
prevPage := 1
if p > 2 {
prevPage = p + 1
prevPage := 0
if p >= 2 {
prevPage = p - 1
}
title := os.Getenv("HOME_TITLE")