-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a30f353
commit dc150b1
Showing
4 changed files
with
56 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
{{- define "main" -}} | ||
<div class="page-blog relative px-6 md:px-10"> | ||
<div> | ||
<div class="article-list mx-auto"> | ||
<div class="flex items-center py-6 text-xl"> | ||
<i class="eva eva-folder-remove-outline mr-2"></i> | ||
{{- if eq .Data.Plural "tags" -}} | ||
{{- T "taxonomy.tag" (dict "Count" (len .Pages) "Title" .Title) | safeHTML -}} | ||
{{- else -}} | ||
{{- T "taxonomy.category" (dict "Count" (len .Pages) "Title" .Title) | safeHTML -}} | ||
{{- end -}} | ||
</div> | ||
<div> | ||
{{- range .Pages -}} | ||
{{- partial "article-list/article" . -}} | ||
{{- end -}} | ||
</div> | ||
<div class="article-list mx-auto"> | ||
<div class="flex items-center py-6 text-xl"> | ||
<i class="eva eva-folder-remove-outline mr-2"></i> | ||
{{- if eq .Data.Plural "tags" -}} | ||
{{- T "taxonomy.tag" (dict "Count" (len .Pages) "Title" .Title) | safeHTML -}} | ||
{{- else -}} | ||
{{- T "taxonomy.category" (dict "Count" (len .Pages) "Title" .Title) | safeHTML -}} | ||
{{- end -}} | ||
</div> | ||
<div> | ||
{{- $paginator := .Paginate (where .Pages "Type" "in" (slice "posts" "status")) -}} | ||
{{- range $paginator.Pages -}} | ||
{{- partial "article-list/article" . -}} | ||
{{- end -}} | ||
</div> | ||
</div> | ||
|
||
{{- partial "article-list/components/pagination" . -}} | ||
</div> | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<nav role="navigation" class="pagination bottom-0 left-0 flex w-full items-center justify-between pb-10 text-gray-600 dark:text-darkTextPlaceholder"> | ||
<a | ||
href="{{- if .Paginator.HasPrev -}} | ||
{{- .Paginator.Prev.URL -}} | ||
{{- else -}} | ||
/ | ||
{{- end -}}" | ||
title="{{- T "page.prev" -}}" | ||
class="{{- if not .Paginator.HasPrev -}} | ||
opacity-0 pointer-events-none | ||
{{- end -}} flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border bg-white text-xl transition duration-300 ease-[ease] hover:border-none hover:bg-theme hover:text-white dark:border-darkBorder dark:bg-darkBgAccent dark:text-darkTextPlaceholder dark:hover:text-darkText" | ||
> | ||
<i class="eva eva-arrow-left-outline"></i> | ||
</a> | ||
<span>- {{ T "page.pagination" (dict "PageNumber" .Paginator.PageNumber "TotalPages" .Paginator.TotalPages) }} -</span> | ||
<a | ||
href="{{- if .Paginator.HasNext -}} | ||
{{- .Paginator.Next.URL -}} | ||
{{- else -}} | ||
/ | ||
{{- end -}}" | ||
title="{{- T "page.next" -}}" | ||
class="{{- if not .Paginator.HasNext -}} | ||
opacity-0 pointer-events-none | ||
{{- end -}} flex h-10 w-10 cursor-pointer items-center justify-center rounded-full border bg-white text-xl transition duration-300 ease-[ease] hover:border-none hover:bg-theme hover:text-white dark:border-darkBorder dark:bg-darkBgAccent dark:text-darkTextPlaceholder dark:hover:text-darkText" | ||
> | ||
<i class="eva eva-arrow-right-outline"></i> | ||
</a> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters