Skip to content

Commit

Permalink
chore: use github.com/hbstack/pagination module to generate pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed May 13, 2023
1 parent 5c16643 commit cae6598
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 39 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ require (
github.com/hbstack/base v0.1.5 // indirect
github.com/hbstack/carousel v0.2.1 // indirect
github.com/hbstack/hb v0.5.0 // indirect
github.com/hbstack/pagination v0.1.0 // indirect
github.com/hbstack/socials v0.1.3 // indirect
github.com/hugomods/gravatar v0.2.0 // indirect
github.com/hugomods/icons/vendors/bootstrap v0.5.0 // indirect
Expand Down
25 changes: 8 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 h1:GZxx4Hc+yb0/t3/rau1j8XlAxLE4CyXns2fqQbyqWfs=
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI=
github.com/hbstack/base v0.1.3 h1:h868EZ54SzQHdGO+3aeoninXkUhUSqWC4ZPkivC5THo=
github.com/hbstack/base v0.1.3/go.mod h1:tein3kLAihnlcXe+xAprntZNjCvA/hRDkrxmZHOyelI=
github.com/hbstack/base v0.1.5 h1:koVBFGU2PBTrQEAtKmceoEGYzaGWuqlj1Zj+6uNH7BU=
github.com/hbstack/base v0.1.5/go.mod h1:HPH5RBlYR8QvGH/Qo5Do1uRd+1u4K2OmoD9zb3fsytQ=
github.com/hbstack/carousel v0.2.0 h1:NMWvhg8kJ8RCq6pwmDupIg3mzbkgvjypKNh7B/idXSI=
github.com/hbstack/carousel v0.2.0/go.mod h1:qUmtQEgnnNrnNumiCbAV9hgiitlW4KrQs1W7b2TlAqI=
github.com/hbstack/carousel v0.2.1 h1:H9hEZ/ea+D/ztllHPQFhZljta2D9tIQHWdNKceMTatU=
github.com/hbstack/carousel v0.2.1/go.mod h1:ygxbeQDgxnDcu6FPdJzS/aacSyn+exgRpjpsRhsMVU0=
github.com/hbstack/hb v0.2.0 h1:fWwFoFKTAoreLqcBpquZzPrxy7tLj46SKcvSOeE7fc4=
github.com/hbstack/hb v0.2.0/go.mod h1:37E1uTMQx1Hix+VdwlWkW74fi3ct5+KlCCBywv9l3Ac=
github.com/hbstack/hb v0.3.0/go.mod h1:37E1uTMQx1Hix+VdwlWkW74fi3ct5+KlCCBywv9l3Ac=
github.com/hbstack/hb v0.4.0/go.mod h1:37E1uTMQx1Hix+VdwlWkW74fi3ct5+KlCCBywv9l3Ac=
github.com/hbstack/hb v0.5.0 h1:5KopgFbczqA1PKcWS1X8YWMjMq698MlasTF8FxH5E4U=
github.com/hbstack/hb v0.5.0/go.mod h1:37E1uTMQx1Hix+VdwlWkW74fi3ct5+KlCCBywv9l3Ac=
github.com/hbstack/socials v0.1.1 h1:nuUaI5wnBdh6naPYouM2PPnZwI5lgM1OPctrLRyJfWY=
github.com/hbstack/socials v0.1.1/go.mod h1:OfycksJfdtZtOvSW1bM6BzepwLHxe3pExV5MBrKoW7I=
github.com/hbstack/socials v0.1.2/go.mod h1:87Y5TtS8zWxEVsGCIG0PAldUetXNNs50viVd5dJJv8Q=
github.com/hbstack/pagination v0.1.0 h1:vsTkGdUq9g0sEX/J+cSzdaSYVZiCf5yndG3d0x7r/dE=
github.com/hbstack/pagination v0.1.0/go.mod h1:IwCFgkfkXMVjudqJ8nHcwQLlXmwx0MRtNFOCd+0I3Vw=
github.com/hbstack/socials v0.1.3 h1:Y4Rh9KMNdcy4CFgdyef42mgc0p1yz7dGLOQwTy9z5PU=
github.com/hbstack/socials v0.1.3/go.mod h1:87Y5TtS8zWxEVsGCIG0PAldUetXNNs50viVd5dJJv8Q=
github.com/hugomods/gravatar v0.2.0 h1:642HNhGN7Mw7qefNcUFJKzLoT2zJKt4IQkrS53mIUfA=
github.com/hugomods/gravatar v0.2.0/go.mod h1:oATWuh5u2XUK/ZKzOD0VEP5I/TZfVZwplTyhT61Q4Fc=
github.com/hugomods/icons v0.6.0 h1:G6RU93okhPPRDh/jqcew9gwkcYpSpg0rCBv4S6yUAFw=
github.com/hugomods/icons/vendors/bootstrap v0.4.1 h1:E6yhi52RF2M7p7Z3nuubf77YC9PSUbWDAtqNFK4TfXE=
github.com/hugomods/icons/vendors/bootstrap v0.4.1/go.mod h1:3fXUsXdGZa+f31OEKUMDGsrCq1XZwhLvUys8XT63AZM=
github.com/hugomods/icons/vendors/bootstrap v0.5.0 h1:CHEGk677heq2kJZa7XsGHRc3Hwizl9NFkmNw146OVm0=
github.com/hugomods/icons/vendors/bootstrap v0.5.0/go.mod h1:kfC17VWV+tNi6PGF4AY7CJBBa1/HEgWxCYq2kNOdcdI=
github.com/hugomods/images v0.5.1 h1:nu5Rn993nsyHUS4k0Y+347nbKv2QhMPVkSNMggztk9A=
github.com/hugomods/images v0.5.1/go.mod h1:U6Gwj16LKvk66rOMyGFrnF6f0aV8lT89lqOsckOAjYY=
github.com/hugomods/simple-icons v8.10.0+incompatible h1:aQsNlSZPBNndL4RjGlQVWxosvKup7QC3Hur7qb7vNa8=
github.com/hugomods/simple-icons v8.10.0+incompatible/go.mod h1:1Lvymol7AMVY7ji/o88jMoDHHZIJ5Wc+WwNe5hjmk+U=
github.com/hugomods/simple-icons v8.11.0+incompatible/go.mod h1:1Lvymol7AMVY7ji/o88jMoDHHZIJ5Wc+WwNe5hjmk+U=
github.com/hugomods/simple-icons v8.12.0+incompatible/go.mod h1:1Lvymol7AMVY7ji/o88jMoDHHZIJ5Wc+WwNe5hjmk+U=
github.com/hugomods/simple-icons v8.13.0+incompatible h1:3X1riXcJcsYx+zzdwIL/P3dSm+d/Esm7AkPTwfNwR34=
github.com/hugomods/simple-icons v8.13.0+incompatible/go.mod h1:1Lvymol7AMVY7ji/o88jMoDHHZIJ5Wc+WwNe5hjmk+U=
3 changes: 3 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ path = "github.com/hbstack/base"
[[module.imports]]
path = "github.com/hbstack/carousel"

[[module.imports]]
path = "github.com/hbstack/pagination"

[[module.imports]]
path = "github.com/hbstack/socials"

Expand Down
6 changes: 0 additions & 6 deletions i18n/en.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
[on_this_page]
other = "On this page"

[pagination_next]
other = "Next"

[pagination_prev]
other = "Prev"

[reading_time]
other = "{{ .Count }} min read"
6 changes: 0 additions & 6 deletions i18n/zh-hans.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
[on_this_page]
other = "本页内容"

[pagination_next]
other = "下一页"

[pagination_prev]
other = "前一页"

[reading_time]
other = "{{ .Count }} 分钟阅读"
6 changes: 0 additions & 6 deletions i18n/zh-hant.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
[on_this_page]
other = "本頁內容"

[pagination_next]
other = "下一頁"

[pagination_prev]
other = "前一頁"

[reading_time]
other = "{{ .Count }} 分鐘閱讀"
2 changes: 1 addition & 1 deletion layouts/_default/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
</div>
{{- end }}
</div>
{{ partial "hb/modules/blog/post/pagination" .Paginator }}
{{ partial "hb/modules/pagination/index" .Paginator }}
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-end" "Page" .) }}
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/partials/hb/modules/blog/archives/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="archives border-start border-5 ps-4 pt-3 position-relative hb-module">
{{ partial "hb/modules/blog/archives/posts" .Paginator.Pages }}
<div class="border-1">
{{ partial "hb/modules/blog/post/pagination" .Paginator }}
{{ partial "hb/modules/pagination/index" .Paginator }}
</div>
</div>
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-end" "Page" .) }}
2 changes: 1 addition & 1 deletion layouts/partials/hb/modules/blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
{{ partialCached "hb/modules/blog/home/taxonomies" . }}
{{- with .Paginator }}
{{ partial "hb/modules/blog/posts" (dict "Pages" .Pages "Cols" "row-cols-1 row-cols-md-2 row-cols-lg-3") }}
{{ partial "hb/modules/blog/post/pagination" . }}
{{ partial "hb/modules/pagination/index" . }}
{{- end }}
2 changes: 1 addition & 1 deletion layouts/partials/hb/modules/blog/list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-begin" "Page" .) }}
{{ partial "hb/modules/blog/posts" (dict "Pages" .Paginator.Pages) }}
{{ partial "hb/modules/blog/post/pagination" .Paginator }}
{{ partial "hb/modules/pagination/index" .Paginator }}
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-end" "Page" .) }}

0 comments on commit cae6598

Please sign in to comment.