diff options
-rw-r--r-- | templates/index.html | 4 | ||||
-rw-r--r-- | templates/post_teaser.html | 8 |
2 files changed, 9 insertions, 3 deletions
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>{{ title }}</title> </head> <body> - <ul> - {{# posts }}<li>{{ .title }}</li>{{/ posts }} - </ul> + {{# posts }}{{> post_teaser.html }}{{/ posts }} </body> </html> 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 @@ +<article class="post-teaser"> + <header> + <h1>{{ .title }}</h1> + </header> + <section class="teaser"> + {{ .body }} + </section> +</article>
\ No newline at end of file |