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

github.com/urjaacharya/redgood.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/index')
-rw-r--r--layouts/partials/index/pinnedPost.html14
-rw-r--r--layouts/partials/index/recentPost.html9
2 files changed, 23 insertions, 0 deletions
diff --git a/layouts/partials/index/pinnedPost.html b/layouts/partials/index/pinnedPost.html
new file mode 100644
index 0000000..8b29a3d
--- /dev/null
+++ b/layouts/partials/index/pinnedPost.html
@@ -0,0 +1,14 @@
+{{ range ((where .Site.Pages "Params.pinned" true).ByDate.Reverse) | first 1 }}
+<h2>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+</h2>
+<div class="pinned-post home-page-card">
+ <p>{{ .Summary | plainify | truncate 250 }}</p>
+ <div class="home-page-card-links">
+ <a href="{{ .Permalink }}"> Read Pinned Post </a>
+ </div>
+ <div class="home-page-card-links">
+ <a href="{{ `pinnedposts` | relURL }}">All Pinned</a>
+ </div>
+</div>
+{{ end }}
diff --git a/layouts/partials/index/recentPost.html b/layouts/partials/index/recentPost.html
new file mode 100644
index 0000000..7578c0f
--- /dev/null
+++ b/layouts/partials/index/recentPost.html
@@ -0,0 +1,9 @@
+<h3>Recent Posts</h3>
+<div class="recent-posts home-page-card">
+ {{ range ((where .Site.Pages "Kind" "page").ByDate.Reverse) | first 6 }}
+ {{ partial "listPage" . }}
+ {{ end }}
+ <div class="home-page-card-links">
+ <a href="{{ `archive` | relURL }}">All Posts</a>
+ </div>
+</div>