diff options
author | Jesper Kolbeck <kolbeckxyz@outlook.com> | 2021-12-07 18:35:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-07 18:35:06 +0300 |
commit | 99dc3365eb50f09b4995c2c6ed930a4eb8d6deb2 (patch) | |
tree | 4b167c0f4cad13cae50ea2bb3be35131ae968807 | |
parent | 6388e9e9162d62983df169988f0cf115e34f9e19 (diff) |
Add both first and last classes when only one page (#43)
-rw-r--r-- | layouts/index.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index 9f3daa3..8096ce5 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -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> |