Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/janraasch/hugo-scroll.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesper Kolbeck <kolbeckxyz@outlook.com>2021-12-07 18:35:06 +0300
committerGitHub <noreply@github.com>2021-12-07 18:35:06 +0300
commit99dc3365eb50f09b4995c2c6ed930a4eb8d6deb2 (patch)
tree4b167c0f4cad13cae50ea2bb3be35131ae968807
parent6388e9e9162d62983df169988f0cf115e34f9e19 (diff)
Add both first and last classes when only one page (#43)
-rw-r--r--layouts/index.html2
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>