Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
sebousan committed Feb 5, 2025
1 parent 0f49721 commit f2d5994
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 1 addition & 5 deletions layouts/partials/persons_statutes/items.html
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
{{ $dict := . }}
{{ if reflect.IsMap . }}
{{ $dict = (dict "pages" .pages "abovethefold" .abovethefold) }}
{{ end }}
{{ partial "commons/items" $dict }}
{{ partial "commons/items" . }}
7 changes: 2 additions & 5 deletions layouts/partials/persons_statutes/paginator.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{{ $paginator := .Paginator.Pages }}
{{ $atf := true }}
{{ if partial "func/HasImageHero" . }}
{{ $atf = false }}
{{ end }}
{{- $paginator := .Paginator.Pages -}}
{{- $atf := cond (partial "func/HasImageHero" .) false true -}}
{{ partial "persons_statutes/items" (dict "pages" $paginator "abovethefold" $atf) }}
{{ partial "nav/pagination.html" . }}

0 comments on commit f2d5994

Please sign in to comment.