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

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/article/components/related-contents.html')
-rw-r--r--layouts/partials/article/components/related-contents.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/layouts/partials/article/components/related-contents.html b/layouts/partials/article/components/related-contents.html
index 810b8e9..29cfff6 100644
--- a/layouts/partials/article/components/related-contents.html
+++ b/layouts/partials/article/components/related-contents.html
@@ -1,13 +1,13 @@
+{{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }}
+{{ with $related }}
<aside class="related-contents--wrapper">
- {{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }}
- {{ with $related }}
- <h2 class="section-title">{{ T "article.relatedContents" }}</h2>
- <div class="related-contents">
- <div class="flex article-list--tile">
- {{ range . }}
- {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}
- {{ end }}
- </div>
+ <h2 class="section-title">{{ T "article.relatedContents" }}</h2>
+ <div class="related-contents">
+ <div class="flex article-list--tile">
+ {{ range . }}
+ {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}
+ {{ end }}
</div>
- {{ end }}
+ </div>
</aside>
+{{ end }} \ No newline at end of file