diff --git a/layouts/index.html b/layouts/index.html index 1715683..28bc712 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,24 +1,6 @@ {{ define "main" }}
-
-

Latest Articles

- -
-
- -
+ {{ partial "snippet-list" (dict "showAllArticles" true) }}
{{ end }} @@ -48,4 +30,4 @@ -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/snippet-list.html b/layouts/partials/snippet-list.html new file mode 100644 index 0000000..cb1aacb --- /dev/null +++ b/layouts/partials/snippet-list.html @@ -0,0 +1,22 @@ +
+

Latest Articles

+ + {{ if index $ "showAllArticles" }} +
+ All articles +
+ {{ end }} +
+
+ +
diff --git a/layouts/snippets/list.html b/layouts/snippets/list.html new file mode 100644 index 0000000..c1d2f2d --- /dev/null +++ b/layouts/snippets/list.html @@ -0,0 +1,33 @@ +{{ define "main" }} +
+ {{ partial "snippet-list" (dict) }} +
+{{ end }} + +{{ define "aside" }} + +{{ end }}