Add both first and last classes when only one page (#43)

pull/47/head
Jesper Kolbeck 2021-12-07 16:35:06 +07:00 committed by GitHub
parent 6388e9e916
commit 99dc3365eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

@ -21,7 +21,7 @@
</div>
{{ range $index_val, $elem_val := $sections }}
<div class='post-holder'>
<article id='{{ anchorize .Title }}' class='post {{ if eq $index_val 0 }}first{{ else }}{{ if eq (add $index_val 1) (len $sections) }}last{{ end }}{{ end }}'>
<article id='{{ anchorize .Title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $sections) }}last{{ end }}'>
<header class="post-header">
<h2 class="post-title">{{ .Title }}</h2>
</header>