mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
Format the about page correctly
This commit is contained in:
parent
acad65d1a5
commit
b2ca0ab0fd
4 changed files with 18 additions and 3 deletions
|
|
@ -24,6 +24,10 @@ struct TemplateContext {
|
||||||
var template: String {
|
var template: String {
|
||||||
page.template ?? site.template
|
page.template ?? site.template
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var currentYear: Int {
|
||||||
|
Calendar.current.dateComponents([.year], from: Date()).year!
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Dictionary form
|
// MARK: - Dictionary form
|
||||||
|
|
@ -38,6 +42,7 @@ extension TemplateContext {
|
||||||
"body": body,
|
"body": body,
|
||||||
"styles": site.styles + page.styles,
|
"styles": site.styles + page.styles,
|
||||||
"scripts": site.scripts + page.scripts,
|
"scripts": site.scripts + page.scripts,
|
||||||
|
"currentYear": currentYear,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
Title: About me
|
Title: About me
|
||||||
|
Template: article
|
||||||
---
|
---
|
||||||
|
|
||||||
I'm Sami Samhuri, a software developer and general technology geek. Sometimes
|
I'm Sami Samhuri, a software developer and general technology geek. Sometimes
|
||||||
|
|
@ -97,7 +98,6 @@ compiled with [harp][] before [Apache][] serves it up. The header and body font,
|
||||||
[Museo]: http://www.exljbris.com/museosans.html
|
[Museo]: http://www.exljbris.com/museosans.html
|
||||||
[TypeKit]: https://typekit.com/fonts
|
[TypeKit]: https://typekit.com/fonts
|
||||||
|
|
||||||
Oh, and a shout out to [Font Awesome][fa] for being awesome.
|
Oh, and a shout out to [Font Awesome][fa] for being awesome. <i class="fa fa-thumbs-up" style="color: #ccc"></i>
|
||||||
<i class="fa fa-thumbs-up" style="color: #ccc"></i>
|
|
||||||
|
|
||||||
[fa]: http://fontawesome.io
|
[fa]: http://fontawesome.io
|
||||||
|
|
|
||||||
10
templates/article.html
Normal file
10
templates/article.html
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{% extends "samhuri.net.html" %}
|
||||||
|
{% block body %}
|
||||||
|
<article class="container">
|
||||||
|
<h2>{{ page.title }}</h2>
|
||||||
|
{{ body }}
|
||||||
|
</article>
|
||||||
|
<div class="row clearfix">
|
||||||
|
<p class="fin"><i class="fa fa-code"></i></p>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
@ -73,7 +73,7 @@
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{% block body %}footage not found{% endblock %}
|
{% block body %}{{ body }}{% endblock %}
|
||||||
|
|
||||||
<footer class="container">
|
<footer class="container">
|
||||||
© 2006 - {{ currentYear }} <a href="/about">{{ site.author }}</a>
|
© 2006 - {{ currentYear }} <a href="/about">{{ site.author }}</a>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue