Skip to content

Commit

Permalink
style: show more posts per row on term list pages when there is no si…
Browse files Browse the repository at this point in the history
…debar (#441)
  • Loading branch information
razonyang committed Nov 1, 2023
1 parent eb508b2 commit 7459cee
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions layouts/_default/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
<div class="hb-blog-main">
{{ partial "hugopress/functions/render-hooks" (dict "Name" "hb-blog-main-begin" "Page" .) }}
{{ partialCached "hb/modules/blog/term/profile" . . }}
<div class="hb-terms-posts row">
{{- $cols := "row-cols-1 row-cols-md-2" }}
{{- if not (partialCached "hb/modules/blog/functions/has-sidebar" .) }}
{{- $cols = printf "%s row-cols-lg-3" $cols }}
{{- end }}
<div class="hb-terms-posts row {{ $cols }}">
{{- range .Paginator.Pages }}
<div class="col-12 col-md-6 mb-3 mb-lg-4">
<div class="mb-3 mb-lg-4">
{{ partial "hb/modules/blog/post/card" (dict "Page" .) }}
</div>
{{- end }}
Expand Down

0 comments on commit 7459cee

Please sign in to comment.