Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CaiJimmy/hugo-theme-stack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Cai <jimmehcai@gmail.com>2020-09-11 19:07:29 +0300
committerJimmy Cai <jimmehcai@gmail.com>2020-09-11 19:07:29 +0300
commita2732a312a0ab8e2533eaf9c571d521354690b4b (patch)
tree784c2f38d68dfee0d569556f18734d2d30250fbe /layouts/partials
parent2acd380e98e705801eb90e8c6dee4395e4381aa8 (diff)
feat(image): add article and article list default image settings
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/article-list/compact.html2
-rw-r--r--layouts/partials/article-list/default.html2
-rw-r--r--layouts/partials/article-list/tile.html2
-rw-r--r--layouts/partials/article/components/header.html2
4 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/article-list/compact.html b/layouts/partials/article-list/compact.html
index 61c1f29..1a71318 100644
--- a/layouts/partials/article-list/compact.html
+++ b/layouts/partials/article-list/compact.html
@@ -12,7 +12,7 @@
</footer>
</div>
- {{ $image := partial "helper/image" (dict "Context" .) }}
+ {{ $image := partial "helper/image" (dict "Context" . "Type" "articleList") }}
{{ if $image.exists }}
<div class="article-image">
diff --git a/layouts/partials/article-list/default.html b/layouts/partials/article-list/default.html
index 879d848..8c59ff7 100644
--- a/layouts/partials/article-list/default.html
+++ b/layouts/partials/article-list/default.html
@@ -1,4 +1,4 @@
-{{ $image := partial "helper/image" (dict "Context" .) }}
+{{ $image := partial "helper/image" (dict "Context" . "Type" "articleList") }}
<article class="{{ if $image.exists }}has-image{{ end }}">
{{ if $image.exists }}
<div class="article-image">
diff --git a/layouts/partials/article-list/tile.html b/layouts/partials/article-list/tile.html
index 4af3028..ea38a83 100644
--- a/layouts/partials/article-list/tile.html
+++ b/layouts/partials/article-list/tile.html
@@ -1,4 +1,4 @@
-{{ $image := partial "helper/image" (dict "Context" .context) }}
+{{ $image := partial "helper/image" (dict "Context" .context "Type" .Type) }}
<article class="{{ if $image.exists }}has-image{{ end }}">
<a href="{{ .context.Permalink }}">
diff --git a/layouts/partials/article/components/header.html b/layouts/partials/article/components/header.html
index 702e923..df7c764 100644
--- a/layouts/partials/article/components/header.html
+++ b/layouts/partials/article/components/header.html
@@ -1,5 +1,5 @@
<header class="article-header">
- {{ $image := partial "helper/image" (dict "Context" .) }}
+ {{ $image := partial "helper/image" (dict "Context" . "Type" "article") }}
{{ if $image.exists }}
<div class="article-image">