diff --git a/internal/theme/twentyseventeen/twentyseventeen.go b/internal/theme/twentyseventeen/twentyseventeen.go
index fea710a..67bc3f6 100644
--- a/internal/theme/twentyseventeen/twentyseventeen.go
+++ b/internal/theme/twentyseventeen/twentyseventeen.go
@@ -30,6 +30,16 @@ type ImageData struct {
Width int64 `json:"width,omitempty"`
}
+var paginate = func() plugins.PageEle {
+ p := plugins.TwentyFifteenPagination()
+ p.PrevEle = `
+上一页`
+ p.NextEle = strings.Replace(p.NextEle, "下一页", `下一页
+`, 1)
+ return p
+}()
+
func Hook(status int, c *gin.Context, h gin.H, scene int) {
templ := "twentyseventeen/posts/index.gohtml"
if _, ok := plugins.IndexSceneMap[scene]; ok {
@@ -38,13 +48,7 @@ func Hook(status int, c *gin.Context, h gin.H, scene int) {
if ok {
pp, ok := p.(pagination.ParsePagination)
if ok {
- f := plugins.TwentyFifteenPagination()
- f.PrevEle = `
-上一页`
- f.NextEle = strings.Replace(f.NextEle, "下一页", `下一页
-`, 1)
- h["pagination"] = pagination.Paginate(f, pp)
+ h["pagination"] = pagination.Paginate(paginate, pp)
}
}
} else if _, ok := plugins.DetailSceneMap[scene]; ok {