Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions themes/powershell-community/layouts/podcast/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,24 @@ <h2 class="text-xl lg:text-2xl font-bold text-gray-900 mb-3">
</a>
{{ end }}

{{ $currentPage := $paginator.PageNumber }}
{{ $totalPages := $paginator.TotalPages }}

{{ range $paginator.Pagers }}
{{ if eq . $paginator }}
<span class="px-3 py-2 bg-purple-600 text-white rounded-lg font-medium">
{{ .PageNumber }}
</span>
{{ else }}
<a href="{{ .URL }}"
class="px-3 py-2 text-purple-600 hover:bg-purple-50 rounded-lg transition-colors duration-200">
{{ .PageNumber }}
</a>
{{ $pageNumber := .PageNumber }}
{{ if or (le $pageNumber 2) (ge $pageNumber (sub $totalPages 1)) (and (ge $pageNumber (sub $currentPage 1)) (le $pageNumber (add $currentPage 1))) }}
{{ if eq . $paginator }}
<span class="px-3 py-2 bg-purple-600 text-white rounded-lg font-medium">
{{ .PageNumber }}
</span>
{{ else }}
<a href="{{ .URL }}"
class="px-3 py-2 text-purple-600 hover:bg-purple-50 rounded-lg transition-colors duration-200">
{{ .PageNumber }}
</a>
{{ end }}
{{ else if or (eq $pageNumber 3) (eq $pageNumber (sub $totalPages 2)) }}
<span class="px-2 py-2 text-gray-400">...</span>
{{ end }}
{{ end }}

Expand Down
26 changes: 17 additions & 9 deletions themes/powershell-community/layouts/taxonomy/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,24 @@ <h2 class="text-xl lg:text-2xl font-bold text-gray-900 mb-3">
</a>
{{ end }}

{{ $currentPage := $paginator.PageNumber }}
{{ $totalPages := $paginator.TotalPages }}

{{ range $paginator.Pagers }}
{{ if eq . $paginator }}
<span class="px-3 py-2 bg-blue-600 text-white rounded-lg font-medium">
{{ .PageNumber }}
</span>
{{ else }}
<a href="{{ .URL }}"
class="px-3 py-2 text-blue-600 hover:bg-blue-50 rounded-lg transition-colors duration-200">
{{ .PageNumber }}
</a>
{{ $pageNumber := .PageNumber }}
{{ if or (le $pageNumber 2) (ge $pageNumber (sub $totalPages 1)) (and (ge $pageNumber (sub $currentPage 1)) (le $pageNumber (add $currentPage 1))) }}
{{ if eq . $paginator }}
<span class="px-3 py-2 bg-blue-600 text-white rounded-lg font-medium">
{{ .PageNumber }}
</span>
{{ else }}
<a href="{{ .URL }}"
class="px-3 py-2 text-blue-600 hover:bg-blue-50 rounded-lg transition-colors duration-200">
{{ .PageNumber }}
</a>
{{ end }}
{{ else if or (eq $pageNumber 3) (eq $pageNumber (sub $totalPages 2)) }}
<span class="px-2 py-2 text-gray-400">...</span>
{{ end }}
{{ end }}

Expand Down
Loading