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]
|
||||
site = ""
|
||||
[params.defaultImage]
|
||||
[params.defaultImage.article]
|
||||
enabled = false
|
||||
local = false
|
||||
src = ""
|
||||
[params.defaultImage.articleList]
|
||||
enabled = false
|
||||
local = true
|
||||
src = ""
|
||||
[params.defaultImage.opengraph]
|
||||
enabled = false
|
||||
local = false
|
||||
|
@ -15,7 +15,7 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ $image := partial "helper/image" (dict "Context" .) }}
|
||||
{{ $image := partial "helper/image" (dict "Context" . "Type" "taxonomy") }}
|
||||
{{ if $image.exists }}
|
||||
<div class="taxonomy-image">
|
||||
{{ if $image.resource }}
|
||||
|
@ -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">
|
||||
|
@ -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">
|
||||
|
@ -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 }}">
|
||||
|
||||
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user