Skip to content

Commit

Permalink
Use div tag instead of a tag when no newer-post exists
Browse files Browse the repository at this point in the history
to improve SEO
  • Loading branch information
markruler committed Sep 8, 2024
1 parent d38db02 commit 699f496
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@
{{ i18n "next_link" }}<br>{{.Next.Title}}
</a>
{{else}}
<a class="newer-posts">
<div class="newer-posts">
{{ i18n "next_link" }}<br>{{ i18n "no_newer_posts"}}
</a>
</div>
{{end}}

{{if .Prev}}
Expand Down
16 changes: 8 additions & 8 deletions layouts/partials/mobile-paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<div class="pagination">
{{ if .Paginator.HasPrev }}
<a class="pagination-action" href="{{.Paginator.Prev.URL}}" style="opacity:1">
{{ else }}
<a class="pagination-action" style="opacity:0">
{{ end }}
<i class="material-icons pagination-action-icon">
chevron_left
</i>
</a>
{{ else }}
<div class="pagination-action" style="opacity:0" ></div>
{{ end }}

<div class="pagination-indicator">
<span>{{.Paginator.PageNumber}}/{{.Paginator.TotalPages}}</span>
Expand All @@ -18,13 +18,13 @@
{{ if .Paginator.HasNext }}
<a class="pagination-action" href="{{.Paginator.Next.URL}}"
style="opacity:1">
<i class="material-icons pagination-action-icon">
chevron_right
</i>
</a>
{{ else }}
<a class="pagination-action" style="opacity:0">
<div class="pagination-action" style="opacity:0"></div>
{{ end }}
<i class="material-icons pagination-action-icon">
chevron_right
</i>
</a>
</div>
{{ end }}

Expand Down

0 comments on commit 699f496

Please sign in to comment.