mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +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 {
|
||||
page.template ?? site.template
|
||||
}
|
||||
|
||||
var currentYear: Int {
|
||||
Calendar.current.dateComponents([.year], from: Date()).year!
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Dictionary form
|
||||
|
|
@ -38,6 +42,7 @@ extension TemplateContext {
|
|||
"body": body,
|
||||
"styles": site.styles + page.styles,
|
||||
"scripts": site.scripts + page.scripts,
|
||||
"currentYear": currentYear,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
Title: About me
|
||||
Template: article
|
||||
---
|
||||
|
||||
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
|
||||
[TypeKit]: https://typekit.com/fonts
|
||||
|
||||
Oh, and a shout out to [Font Awesome][fa] for being awesome.
|
||||
<i class="fa fa-thumbs-up" style="color: #ccc"></i>
|
||||
Oh, and a shout out to [Font Awesome][fa] for being awesome. <i class="fa fa-thumbs-up" style="color: #ccc"></i>
|
||||
|
||||
[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>
|
||||
</header>
|
||||
|
||||
{% block body %}footage not found{% endblock %}
|
||||
{% block body %}{{ body }}{% endblock %}
|
||||
|
||||
<footer class="container">
|
||||
© 2006 - {{ currentYear }} <a href="/about">{{ site.author }}</a>
|
||||
|
|
|
|||
Loading…
Reference in a new issue