Show month and year in item lists
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 8s
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 8s
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{{ range .ByWeight }}
|
||||
{{ $pageTitle := .Title }}
|
||||
<article class="item-row" data-row-href="{{ .RelPermalink }}" role="link" tabindex="0" aria-label="Open {{ $pageTitle }}">
|
||||
<div class="item-year">{{ with .Date }}{{ .Format "2006" }}{{ end }}</div>
|
||||
<div class="item-year">{{ with .Date }}{{ .Format "Jan 2006" }}{{ end }}</div>
|
||||
<div class="item-body">
|
||||
<div class="item-head">
|
||||
<a class="item-title" href="{{ .RelPermalink }}" aria-label="Open {{ $pageTitle }}" title="Open {{ $pageTitle }}">{{ $pageTitle }}</a>
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
{{ with . }}
|
||||
<div class="item-list">
|
||||
{{ range sort . "year" "desc" }}
|
||||
{{ range sort . "date" "desc" }}
|
||||
{{ $pubTitle := .title }}
|
||||
{{ $authors := .authors }}
|
||||
<article class="item-row">
|
||||
<div class="item-year">{{ .year }}</div>
|
||||
<div class="item-year">
|
||||
{{ with .date }}
|
||||
{{ time.Format "Jan 2006" . }}
|
||||
{{ else }}
|
||||
{{ .year }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="item-body">
|
||||
<div class="item-head">
|
||||
<div class="item-title">{{ $pubTitle }}</div>
|
||||
|
||||
Reference in New Issue
Block a user