[wip] add wip index page and table of contents for posts
[~bandali/bndl.org] / layouts / index.html
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644 (file)
index 0000000..120e05c
--- /dev/null
@@ -0,0 +1,39 @@
+{{ define "main" }}
+
+<h1 id="hello">Hello there,</h1>
+<p>
+  <img class="picture__avatar" src="https://emacsel.com/img/aminb.jpg" alt="Amin Bandali">
+</p>
+<div class="clear"></div>
+{{ with .Content }}
+{{ . }}
+{{ end }}
+
+<h2 id="publications">Publications</h2>
+<ul>
+  <li>TODO</li>
+</ul>
+
+<h2 id="talks">Talks &amp; presentations</h2>
+<ul>
+  {{ if gt (len (where .Pages "Section" "talk")) 0 }}
+  {{ range first 5 (where .Pages "Section" "talk") }}
+  <li><a href="{{substr .Permalink 0 -1}}">{{ .Title }}</a></li>
+  {{ end }}
+  {{ else }}
+  <li>TODO</li>
+  {{ end }}
+</ul>
+
+<h2 id="writings">Recent writings &amp; essays</h2>
+<ul>
+  {{ if gt (len (where .Pages "Section" "post")) 0 }}
+  {{ range first 5 (where .Pages "Section" "post") }}
+  <li><a href="{{substr .Permalink 0 -1}}" title="{{ dateFormat "January 2, 2006" .Date }}">{{ .Title }}</a></li>
+  {{ end }}
+  {{ else }}
+  <li>TODO</li>
+  {{ end }}
+</ul>
+
+{{ end }}