Improve readability, add recent news to home page
This commit is contained in:
parent
9559d86d48
commit
2732deaa79
11 changed files with 60 additions and 35 deletions
15
layouts/partials/content.html
Normal file
15
layouts/partials/content.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<div id="content">
|
||||
|
||||
{{ if not .IsHome }}
|
||||
{{ if not .Date.IsZero }}
|
||||
<p class="timestamp">{{ .Date.Format "02-01-2006" }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ if .Params.tags }}
|
||||
{{ partial "tags" .Params.tags }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
{{ now.Year }} - {{ $.Site.Params.copyright }}
|
||||
</div>
|
||||
|
|
|
@ -58,5 +58,3 @@
|
|||
<div id="page-title">
|
||||
<h1>{{ .Title }}</h1>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
|
15
layouts/partials/recentnews.html
Normal file
15
layouts/partials/recentnews.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{{ $recentupdatessection := .Site.Params.recentupdates | default "blog"}}
|
||||
|
||||
{{ with .Site.GetPage "section" $recentupdatessection }}
|
||||
|
||||
<div id="recent-updates">
|
||||
|
||||
<h2>{{ i18n "latestUpdates" }}</h2>
|
||||
|
||||
{{ range (first 3 (where .Pages "Section" $recentupdatessection)) }}
|
||||
<p class="timestamp">{{ .Date.Format "2006-01-02" }} <a href="{{ .Permalink }}">{{ .Title }}</a></p>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue