From 44c10f9710632a72427120ccdb9f16ad146574b4 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 16 Nov 2017 17:20:46 +0100 Subject: Render post teasers using partial. --- templates/index.html | 4 +--- templates/post_teaser.html | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 templates/post_teaser.html diff --git a/templates/index.html b/templates/index.html index a4279bd..2a3a95b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,8 +4,6 @@ {{ title }} - + {{# posts }}{{> post_teaser.html }}{{/ posts }} diff --git a/templates/post_teaser.html b/templates/post_teaser.html new file mode 100644 index 0000000..5198400 --- /dev/null +++ b/templates/post_teaser.html @@ -0,0 +1,8 @@ +
+
+

{{ .title }}

+
+
+ {{ .body }} +
+
\ No newline at end of file -- cgit v1.2.3