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

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruPagge <git@upagge.ru>2021-02-27 12:16:40 +0300
committeruPagge <git@upagge.ru>2021-02-27 12:16:40 +0300
commitbb61b87aaccf2fffe953f7f5351c0089ff9a9e16 (patch)
tree3cc4bc0b06849f3c755182af48f1e262d0e4398c /layouts/posts
parentd702ed3c18f3b07a5cf3367b22b92155a6fae1ea (diff)
$fullImage
Diffstat (limited to 'layouts/posts')
-rw-r--r--layouts/posts/single.html18
1 files changed, 15 insertions, 3 deletions
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
index fc075a0..351c5bf 100644
--- a/layouts/posts/single.html
+++ b/layouts/posts/single.html
@@ -43,9 +43,7 @@
{{- /* Featured image */ -}}
{{- $image := $params.featuredimage -}}
{{- $pageImageHidden := $params.hiddenFeaturedImage -}}
- {{- $heroImage := "" -}}
{{- with .Resources.GetMatch "featured-image" -}}
- {{- $heroImage = (.Resize "1000x").Permalink -}}
{{- $image = .Permalink -}}
{{- end -}}
@@ -55,6 +53,12 @@
<div class="header-post">
{{ if eq $pageTheme "hero" }}
+
+ {{- $heroImage := "" -}}
+ {{- with .Resources.GetMatch "featured-image" -}}
+ {{- $heroImage = (.Resize "1000x").Permalink -}}
+ {{- end -}}
+
<div class="post-hero-grid">
<div class="post-hero-info">
<div class="hero-text-container">
@@ -105,7 +109,15 @@
{{ if not (eq $pageTheme "hero") }}
{{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }}
{{- with $image -}}
- <div class="featured-image" style="background-image: url('{{ $image }}');">
+
+ {{- $fullImage := $image -}}
+ {{- if eq $pageTheme "full" -}}
+ {{- with $.Resources.GetMatch "featured-image" -}}
+ {{- $fullImage = (.Resize "1500x").Permalink -}}
+ {{- end -}}
+ {{- end -}}
+
+ <div class="featured-image" style="background-image: url('{{ $fullImage }}');">
{{- end -}}
{{- end -}}
<div class="post-title">