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

github.com/wileybaba/hugo-theme-robotico.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/index.html')
-rw-r--r--layouts/index.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..8ec54f1
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,51 @@
+{{ define "main" }}
+ {{ partial "header" . }}
+
+ <div class="content">
+ <div class="container">
+ <div class="row justify-content-center">
+ <div class="col-sm-12 col-md-10">
+ <div class="markdown">
+ {{ partial "content" . }}
+ </div>
+
+ {{ if isset .Site.Params "best_posts" }}
+ <div class="mx-0 mx-md-4 best-posts">
+ <div class="page-heading">📌 {{ i18n "pinned" }}</div>
+ <ul>
+ {{ range .Site.Params.best_posts }}
+ <li>
+ <a href="{{ .url }}">{{ .title }}</a>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+ {{ end }}
+
+ {{ if isset .Site.Params "latestpostcount" }}
+ <div class="mx-0 mx-md-4 posts">
+ {{ $nbPosts := len (where .Data.Pages "Section" "blog") }}
+ {{ if gt $nbPosts 0 }}
+ <div class="page-heading">Latest posts</div>
+ <ul class="px-0">
+ {{ range (first .Site.Params.latestpostcount (where .Pages "Section" "blog")).GroupByDate "Jan, 2006" "desc" }}
+ <li class="groupby">{{ .Key }}</li>
+ {{ range sort .Pages "Date" "desc" }}
+ {{ partial "list" . }}
+ {{ end }}
+ {{ end }}
+ </ul>
+
+ {{ if gt $nbPosts .Site.Params.latestpostcount }}
+ <a href="./blog/" class="font-italic mt-4 see-more">{{ i18n "see-more" }}</a>
+ {{ end }}
+ {{ end }}
+ </div>
+ {{ end }}
+ </div>
+ </div>
+ </div>
+ </div>
+
+ {{ partial "footer" . }}
+{{ end }}