Skip to content

Commit

Permalink
chore: update post/nav partial
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jul 1, 2022
1 parent 88601f5 commit 0cafdd1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
4 changes: 1 addition & 3 deletions layouts/partials/docs/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ <h1 class="card-title post-title my-2">{{ partial "helpers/title" . }}</h1>
{{- partial "post/reward" . -}}
{{- partial "hooks/content-end" . -}}
</div>
<div class="card-footer">
{{- partial "post/nav" . -}}
</div>
{{- partial "post/nav" . -}}
</article>
{{- partial "post/copyright/index" . -}}
{{- partial "post/comments" . -}}
4 changes: 1 addition & 3 deletions layouts/partials/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ <h1 class="card-title post-title my-2">{{ partial "helpers/title" . }}</h1>
{{- partial "post/reward" . -}}
{{- partial "hooks/content-end" . -}}
</div>
<div class="card-footer">
{{- partial "post/nav" . -}}
</div>
{{- partial "post/nav" . -}}
</article>
{{- partial "post/copyright/index" . -}}
{{- partial "post/related-posts" . -}}
Expand Down
26 changes: 14 additions & 12 deletions layouts/partials/post/nav.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{{- if and (default true .Site.Params.post.nav) (default true .Params.nav) (or .PrevInSection .NextInSection) -}}
<div class="post-navs d-flex justify-content-evenly">
{{- with .PrevInSection -}}
<div class="post-nav post-prev">
<i class="fas fa-fw fa-chevron-down post-prev-icon me-1" data-fa-transform="rotate-90"></i>
<a href="{{ .Permalink }}">{{ partial "helpers/title" . }}</a>
<div class="card-footer">
<div class="post-navs d-flex justify-content-evenly">
{{- with .PrevInSection -}}
<div class="post-nav post-prev">
<i class="fas fa-fw fa-chevron-down post-prev-icon me-1" data-fa-transform="rotate-90"></i>
<a href="{{ .Permalink }}">{{ partial "helpers/title" . }}</a>
</div>
{{- end -}}
{{- with .NextInSection -}}
<div class="post-nav post-next">
<a href="{{ .Permalink }}">{{ partial "helpers/title" . }}</a>
<i class="fas fa-fw fa-chevron-down post-next-icon ms-1" data-fa-transform="rotate-270"></i>
</div>
{{- end -}}
</div>
{{- end -}}
{{- with .NextInSection -}}
<div class="post-nav post-next">
<a href="{{ .Permalink }}">{{ partial "helpers/title" . }}</a>
<i class="fas fa-fw fa-chevron-down post-next-icon ms-1" data-fa-transform="rotate-270"></i>
</div>
{{- end -}}
</div>
{{- end -}}

0 comments on commit 0cafdd1

Please sign in to comment.