about summary refs log tree commit diff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/list.html18
-rw-r--r--layouts/index.html19
2 files changed, 37 insertions, 0 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..c9f9806
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,18 @@
+{{ define "main" }}
+    <div class="index-content">
+        {{ .Content }}
+    </div>
+
+    <div class="articles h-feed">
+        <h1 class="post-title">{{ i18n .Title }}</h1>
+        {{ range .Page.CurrentSection.Pages }}
+            <div class="post-short-list h-entry">
+                <header class="post-header"> 
+                    <h2 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}"><a class="u-url" href="{{ .RelPermalink }}">{{ trim .Title " " }}</a></h2>
+                </header>
+                {{ partial "postInfo.html" . }}
+            </div>
+        {{ end }}
+    </div>
+
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..414d5e6
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,19 @@
+{{ define "main" }}
+    <div class="homepage-content">
+        {{ .Content }}
+        <ul>
+            {{ range .Site.Sections }}
+            <li> <a href="{{ .Permalink }}">{{ .Title }}</a> </li>
+            {{ end }}
+        </ul>
+    </div>
+
+    <div class="articles h-feed">
+        {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
+        {{ range (.Paginate $pages).Pages }}
+            {{ partial "postSummary.html" . }}
+        {{ end }}
+        {{ partial "pagination.html" . }}
+    </div>
+
+{{ end }}