mirror of
https://github.com/Kugelschieber/marvinblum.git
synced 2026-09-13 19:11:55 +00:00
Added blog page, article page and added latest articles to start page.
This commit is contained in:
+7
-3
@@ -19,9 +19,13 @@
|
||||
</section>
|
||||
<section>
|
||||
<h2>latest blog posts</h2>
|
||||
<p>
|
||||
TODO
|
||||
</p>
|
||||
{{range $article := .Articles}}
|
||||
<p>
|
||||
<a href="/blog/{{slug $article.LatestArticleContent.Title}}-{{$article.Id}}">{{$article.LatestArticleContent.Title}}</a>
|
||||
</p>
|
||||
{{else}}
|
||||
<p>There are no blog posts yet...</p>
|
||||
{{end}}
|
||||
<p>
|
||||
<a href="/blog">View all</a>
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{{template "head.html"}}
|
||||
{{template "menu.html"}}
|
||||
|
||||
<section>
|
||||
<h1>{{.Title}}</h1>
|
||||
<small>Published on {{.Published}}</small>
|
||||
{{.Content}}
|
||||
</section>
|
||||
|
||||
{{template "end.html"}}
|
||||
+12
-1
@@ -2,7 +2,18 @@
|
||||
{{template "menu.html"}}
|
||||
|
||||
<section>
|
||||
<p>TODO Blog</p>
|
||||
<h1>Blog</h1>
|
||||
{{range $year, $articles := .Articles}}
|
||||
<h2>{{$year}}</h2>
|
||||
|
||||
{{range $article := $articles}}
|
||||
<p>
|
||||
<a href="/blog/{{slug $article.LatestArticleContent.Title}}-{{$article.Id}}">{{$article.LatestArticleContent.Title}}</a>
|
||||
</p>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<p>There are no blog posts yet...</p>
|
||||
{{end}}
|
||||
</section>
|
||||
|
||||
{{template "end.html"}}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<h2>Page not found</h2>
|
||||
<p>
|
||||
Nothing to see here...<br />
|
||||
<a href="/">Go back Home</a>
|
||||
<a href="/">Return home</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user