Merge branch 'master' of netsoj.nl:chris/chris-website
This commit is contained in:
commit
93b83daad6
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -13,6 +13,6 @@ mijnblog-test-*
|
||||||
*.o
|
*.o
|
||||||
*.obj
|
*.obj
|
||||||
*.lst
|
*.lst
|
||||||
articles/
|
/articles/
|
||||||
pages/
|
/pages/
|
||||||
projects/
|
/projects/
|
||||||
|
|
25
views/pages/article-list.dt
Normal file
25
views/pages/article-list.dt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
extends parts/page
|
||||||
|
|
||||||
|
block header
|
||||||
|
title Posts - Netsoj.nl
|
||||||
|
|
||||||
|
block sidebar
|
||||||
|
|
||||||
|
block content
|
||||||
|
header
|
||||||
|
h1.title Post list
|
||||||
|
- import vibe.d;
|
||||||
|
- if (articleList.length == 0)
|
||||||
|
p No posts found
|
||||||
|
- else
|
||||||
|
- import utils;
|
||||||
|
- foreach(article; articleList)
|
||||||
|
article
|
||||||
|
header
|
||||||
|
a(href="/posts/#{article.slug}", rel="bookmark")
|
||||||
|
h2.title #{article.title}
|
||||||
|
p.subtitle
|
||||||
|
| By #{article.author} on #{article.firstPublished.toHumanString}
|
||||||
|
- if (article.firstPublished != article.updated)
|
||||||
|
|, updated on #{article.updated.toHumanString}
|
||||||
|
p #{article.excerpt}…
|
25
views/pages/article.dt
Normal file
25
views/pages/article.dt
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
extends parts/page
|
||||||
|
|
||||||
|
block meta_data
|
||||||
|
- page_type = "article";
|
||||||
|
- page_title = content.title;
|
||||||
|
- page_url = "/post/" ~ content.slug;
|
||||||
|
- page_description = content.excerpt;
|
||||||
|
|
||||||
|
block extra_meta_data
|
||||||
|
meta(name="og:article:author:username", content=content.author)
|
||||||
|
meta(name="og:article:published_time", content=content.firstPublished.toISOExtString)
|
||||||
|
- if (content.isModified)
|
||||||
|
meta(name="og:article:modified_time", content=content.updated.toISOExtString)
|
||||||
|
|
||||||
|
block content
|
||||||
|
article(itemscope, itemtype="https://schema.org/BlogPosting")
|
||||||
|
- import utils;
|
||||||
|
header
|
||||||
|
h1.title(itemprop="headline") #{content.title}
|
||||||
|
p.subtitle
|
||||||
|
| By <span itemprop="author">#{content.author}</span>
|
||||||
|
| on <time datetime="#{content.firstPublished.toISOExtString}" itemprop="datePublished">#{content.firstPublished.toHumanString}</time>
|
||||||
|
- if (content.isModified)
|
||||||
|
|, updated on <time datetime="#{content.updated.toISOExtString}" itemprop="dateModified">#{content.updated.toHumanString}</time>
|
||||||
|
section(itemprop="articleBody") !{content.content}
|
11
views/pages/error.dt
Normal file
11
views/pages/error.dt
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
extends parts/page
|
||||||
|
|
||||||
|
block header
|
||||||
|
title #{error.message} - Netsoj.nl
|
||||||
|
|
||||||
|
block sidebar
|
||||||
|
|
||||||
|
block content
|
||||||
|
header
|
||||||
|
h1.title #{error.message} (#{error.code})
|
||||||
|
pre #{error.debugMessage}
|
Loading…
Reference in a new issue