From cf1a85ec29a0a1bd9790eee762b6c42138141a5b Mon Sep 17 00:00:00 2001
From: budparr <budparr@gmail.com>
Date: Mon, 09 Apr 2018 14:11:55 +0000
Subject: [PATCH] Modernize placement of post list page and add some comments.

---
 /dev/null              |   16 ----------------
 layouts/post/list.html |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/layouts/post/list.html b/layouts/post/list.html
new file mode 100644
index 0000000..a662ac2
--- /dev/null
+++ b/layouts/post/list.html
@@ -0,0 +1,21 @@
+{{ define "main" }}
+{{/*
+  This template is the same as the default and is here to demonstrate that if you have a content directory called "post" you can create a layouts directory, just for that section.
+   */}}
+  <article class="pa3 pa4-ns nested-copy-line-height nested-img">
+  <main class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy mid-gray">
+    {{ .Content }}
+  </main>
+    <section class="flex-ns flex-wrap justify-around mt5">
+      {{ range  .Pages }}
+        <div class="relative w-100 w-30-l mb4 bg-white">
+          {{/*
+          Note we can use `.Render` here for items just in this section, instead of a partial to pull in items for the list page. https://gohugo.io/functions/render/
+          */}}
+          {{ .Render "summary" }}
+        </div>
+      {{ end }}
+    </section>
+    {{ template "_internal/pagination.html" . }}
+  </article>
+{{ end }}
diff --git a/layouts/section/post.html b/layouts/section/post.html
deleted file mode 100644
index 3acc693..0000000
--- a/layouts/section/post.html
+++ /dev/null
@@ -1,16 +0,0 @@
-{{ define "main" }}
-  <article class="pa3 pa4-ns nested-copy-line-height nested-img">
-  <main class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy mid-gray">
-    {{ .Content }}
-  </main>
-    {{ $section := .Paginate (where .Data.Pages "Section" .Section) }}
-    <section class="flex-ns flex-wrap justify-around mt5">
-      {{ range  $section.Pages }}
-        <div class="relative w-100 w-30-l mb4 bg-white">
-          {{ .Render "summary" }}
-        </div>
-      {{ end }}
-    </section>
-    {{ template "_internal/pagination.html" . }}
-  </article>
-{{ end }}

--
Gitblit v1.10.0