feat(image): add article and article list default image settings
This commit is contained in:
parent
2acd380e98
commit
a2732a312a
@ -41,6 +41,14 @@ DefaultContentLanguage = "en" # Theme i18n support
|
|||||||
[params.opengraph.twitter]
|
[params.opengraph.twitter]
|
||||||
site = ""
|
site = ""
|
||||||
[params.defaultImage]
|
[params.defaultImage]
|
||||||
|
[params.defaultImage.article]
|
||||||
|
enabled = false
|
||||||
|
local = false
|
||||||
|
src = ""
|
||||||
|
[params.defaultImage.articleList]
|
||||||
|
enabled = false
|
||||||
|
local = true
|
||||||
|
src = ""
|
||||||
[params.defaultImage.opengraph]
|
[params.defaultImage.opengraph]
|
||||||
enabled = false
|
enabled = false
|
||||||
local = false
|
local = false
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ $image := partial "helper/image" (dict "Context" .) }}
|
{{ $image := partial "helper/image" (dict "Context" . "Type" "taxonomy") }}
|
||||||
{{ if $image.exists }}
|
{{ if $image.exists }}
|
||||||
<div class="taxonomy-image">
|
<div class="taxonomy-image">
|
||||||
{{ if $image.resource }}
|
{{ if $image.resource }}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ $image := partial "helper/image" (dict "Context" .) }}
|
{{ $image := partial "helper/image" (dict "Context" . "Type" "articleList") }}
|
||||||
|
|
||||||
{{ if $image.exists }}
|
{{ if $image.exists }}
|
||||||
<div class="article-image">
|
<div class="article-image">
|
||||||
|
@ -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 }}">
|
<article class="{{ if $image.exists }}has-image{{ end }}">
|
||||||
{{ if $image.exists }}
|
{{ if $image.exists }}
|
||||||
<div class="article-image">
|
<div class="article-image">
|
||||||
|
@ -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 }}">
|
<article class="{{ if $image.exists }}has-image{{ end }}">
|
||||||
<a href="{{ .context.Permalink }}">
|
<a href="{{ .context.Permalink }}">
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<header class="article-header">
|
<header class="article-header">
|
||||||
{{ $image := partial "helper/image" (dict "Context" .) }}
|
{{ $image := partial "helper/image" (dict "Context" . "Type" "article") }}
|
||||||
|
|
||||||
{{ if $image.exists }}
|
{{ if $image.exists }}
|
||||||
<div class="article-image">
|
<div class="article-image">
|
||||||
|
Loading…
Reference in New Issue
Block a user