mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 17:22:17 +00:00
Improve blog listing of posts
This commit is contained in:
@@ -11,11 +11,24 @@
|
||||
|
||||
{{- range .Data.Pages.GroupByDate "2006" }}
|
||||
<h3 id="{{ .Key }}">{{ .Key }}</h3>
|
||||
<ul>
|
||||
{{- range .Pages }}
|
||||
<li><a href="{{.Permalink}}">{{.Title}}</a> - <i>{{ .Params.author }}</i></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
||||
{{- range .Pages }}
|
||||
{{ $image := .Resources.GetMatch .Params.listing_image }}
|
||||
{{ $image = $image.Fill "512x512 Center jpg" }}
|
||||
<div class="box">
|
||||
<div class="columns">
|
||||
<div class="column is-one-quarter has-text-centered is-hidden-mobile">
|
||||
<img src="{{ $image.RelPermalink}}" class="image is-inline-block">
|
||||
</div>
|
||||
<div class="column">
|
||||
<p><a href="{{ .Permalink }}">{{.Title}}</a> - {{ .Params.author }}<br />
|
||||
<span class="is-size-6">{{ dateFormat "Jan 2, 2006" .PublishDate }}</span>
|
||||
</p>
|
||||
<p class="is-size-6"><i>{{ .Summary }}</i></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="media-content">
|
||||
<div class="content">
|
||||
<p class="is-size-5 is-italic">This is a post by <b>{{ .Params.author }}</b>.<br />Originally
|
||||
posted {{ .Date | time.Format ":date_full" }}</b></p>
|
||||
posted {{ .PublishDate | time.Format ":date_full" }}</b></p>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
Reference in New Issue
Block a user