Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5adf4a273 | ||
|
|
07fa7615eb |
@@ -11,14 +11,18 @@
|
|||||||
{{- $description = $description | default (T "list.page" (len .Pages)) -}}
|
{{- $description = $description | default (T "list.page" (len .Pages)) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if or $description (not .Date.IsZero) -}}
|
{{- if or $description (not .Date.IsZero) -}}
|
||||||
|
{{/*
|
||||||
|
If it's a term, the date is extracted from the first page of the collection, which is not very useful.
|
||||||
|
In that case, we prefer to display the description (if set), or the number of pages within the collection.
|
||||||
|
*/}}
|
||||||
<footer class="article-meta">
|
<footer class="article-meta">
|
||||||
{{- if not .Date.IsZero -}}
|
{{- if or $IsTerm .Date.IsZero -}}
|
||||||
|
<span class="article-description">{{- $description -}}</span>
|
||||||
|
{{- else if not .Date.IsZero -}}
|
||||||
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
|
||||||
{{- .Date | time.Format .Site.Params.dateFormat.published -}}
|
{{- .Date | time.Format .Site.Params.dateFormat.published -}}
|
||||||
</time>
|
</time>
|
||||||
{{- else if $description -}}
|
{{- end }}
|
||||||
<span class="article-description">{{- $description -}}</span>
|
|
||||||
{{ end }}
|
|
||||||
</footer>
|
</footer>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
{{ $image := partial "helper/image" (dict "Image" .context.Params.image "Resources" .context.Resources "Context" .context) }}
|
{{ $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources "Context" .) }}
|
||||||
<article class="{{ if $image }}has-image{{ end }}">
|
<article class="{{ if $image }}has-image{{ end }}">
|
||||||
<a href="{{ .context.RelPermalink }}">
|
<a href="{{ .RelPermalink }}">
|
||||||
{{ if $image }}
|
{{ if $image }}
|
||||||
<div class="article-image">
|
<div class="article-image">
|
||||||
{{ partial "helper/thumbnail-image" (dict
|
{{ partial "helper/thumbnail-image" (dict
|
||||||
"Resource" $image.Resource
|
"Resource" $image.Resource
|
||||||
"Width" 250
|
"Width" 250
|
||||||
"Height" 150
|
"Height" 150
|
||||||
"Resize" .context.Site.Params.ImageProcessing.Thumbnail.Enabled
|
"Resize" .Site.Params.ImageProcessing.Thumbnail.Enabled
|
||||||
"Attributes" (dict
|
"Attributes" (dict
|
||||||
"src" $image.Permalink
|
"src" $image.Permalink
|
||||||
"alt" (printf "Featured image of post %s" .context.Title)
|
"alt" (printf "Featured image of post %s" .Title)
|
||||||
"loading" "lazy"
|
"loading" "lazy"
|
||||||
"width" $image.Width
|
"width" $image.Width
|
||||||
"height" $image.Height
|
"height" $image.Height
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
>
|
>
|
||||||
<h2 class="article-title">
|
<h2 class="article-title">
|
||||||
{{- .context.Title -}}
|
{{- .Title -}}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="subsection-list">
|
<div class="subsection-list">
|
||||||
<div class="article-list--tile">
|
<div class="article-list--tile">
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "articleList") }}
|
{{ partial "article-list/tile" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="subsection-list">
|
<div class="subsection-list">
|
||||||
<div class="article-list--tile">
|
<div class="article-list--tile">
|
||||||
{{ range $terms }}
|
{{ range $terms }}
|
||||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }}
|
{{ partial "article-list/tile" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@
|
|||||||
<div class="subsection-list">
|
<div class="subsection-list">
|
||||||
<div class="article-list--tile">
|
<div class="article-list--tile">
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "section") }}
|
{{ partial "article-list/tile" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user