flesh out home page
This commit is contained in:
16
layouts/_default/summary.html
Normal file
16
layouts/_default/summary.html
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<article>
|
||||||
|
<header>
|
||||||
|
<h2>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
</h2>
|
||||||
|
{{ partial "post_meta.html" . }}
|
||||||
|
</header>
|
||||||
|
<p>
|
||||||
|
{{ .Summary }}
|
||||||
|
</p>
|
||||||
|
{{ if .Truncated }}
|
||||||
|
<footer>
|
||||||
|
<a href="{{ .RelPermalink }}">Read more<i class="fa fa-angle-double-right fa-fw"></i></a>
|
||||||
|
</footer>
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<h2>{{ .Site.Params.subtitle }}</h2>
|
<h2>{{ .Site.Params.subtitle }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{ $paginator = .Paginate ( where .Data.Pages "Type" "post") }}
|
{{ $paginator := .Paginate ( where .Data.Pages "Type" "post") }}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
{{ .Render "summary" }}
|
{{ .Render "summary" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
33
layouts/partials/post-meta.html
Normal file
33
layouts/partials/post-meta.html
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<div class="post-meta">
|
||||||
|
<div>
|
||||||
|
<i class="fa fa-calendar fa-fw"></i>
|
||||||
|
<time>{{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04" }}{{ end }}</time>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ $baseUrl := .Site.BaseURL }}
|
||||||
|
|
||||||
|
{{ if isset .Params "topics" }}
|
||||||
|
{{ $count := len .Params.topics }}
|
||||||
|
{{ if gt $count 0 }}
|
||||||
|
<div>
|
||||||
|
<i class="fa fa-folder fa-fw"></i>
|
||||||
|
{{ range $k, $v := .Params.topics }}
|
||||||
|
<a class="post-taxonomy-topic" href="{{ $baseUrl }}topics/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }} /{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Params "tags" }}
|
||||||
|
{{ $count := len .Params.tags }}
|
||||||
|
{{ if gt $count 0 }}
|
||||||
|
<div>
|
||||||
|
<i class="fa fa-tags fa-fw"></i>
|
||||||
|
{{ range $k, $v := .Params.tags }}
|
||||||
|
<a class="post-taxonomy-tag" href="{{ $baseUrl }}tags/{{ . | urlize }}">{{ . }}</a>{{ if lt $k (sub $count 1) }} /{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user