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

github.com/hossainemruz/toha.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmruz Hossain <hossainemruz@gmail.com>2020-10-11 09:40:00 +0300
committerGitHub <noreply@github.com>2020-10-11 09:40:00 +0300
commit56c8ba4e4389b0593996737cd8a567ff01646503 (patch)
treedbd451125da953f1d8f8e24ef68e7daf2c4c6b8c /layouts/partials/sections/recent-posts.html
parentc7f2ad72ea64e6bb11e4d44dec14cfa73ec04e45 (diff)
Fix smooth scroll for multi-language setup (#93)
Diffstat (limited to 'layouts/partials/sections/recent-posts.html')
-rw-r--r--layouts/partials/sections/recent-posts.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/layouts/partials/sections/recent-posts.html b/layouts/partials/sections/recent-posts.html
index 2d0cc87..46387d2 100644
--- a/layouts/partials/sections/recent-posts.html
+++ b/layouts/partials/sections/recent-posts.html
@@ -1,4 +1,9 @@
-<div class="container-fluid anchor pb-5 recent-posts-section" id="{{ replace (lower .section.name) " " "-" }}">
+{{ $sectionID := replace (lower .section.name) " " "-" }}
+{{ if .section.id }}
+ {{ $sectionID = .section.id }}
+{{ end }}
+
+<div class="container-fluid anchor pb-5 recent-posts-section" id="{{ $sectionID }}">
{{ if not (.section.hideTitle) }}
<h1 class="text-center">{{ .section.name }}</h1>
{{ end }}