mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-06-08 17:22:46 +00:00
Fix featured image logic
This commit is contained in:
parent
fd10f6e991
commit
cf3bc0e41b
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
date: 2017-04-10T11:00:59-04:00
|
date: 2017-04-10T11:00:59-04:00
|
||||||
description: "Pierre Gringoire"
|
description: "Pierre Gringoire"
|
||||||
featured_image: ""
|
|
||||||
tags: []
|
tags: []
|
||||||
title: "Chapter II: Pierre Gringoire"
|
title: "Chapter II: Pierre Gringoire"
|
||||||
---
|
---
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
date: 2017-04-11T11:13:32-04:00
|
date: 2017-04-11T11:13:32-04:00
|
||||||
description: "Monsieur the Cardinal"
|
description: "Monsieur the Cardinal"
|
||||||
featured_image: ""
|
|
||||||
tags: []
|
tags: []
|
||||||
title: "Chapter III: Monsieur the Cardinal"
|
title: "Chapter III: Monsieur the Cardinal"
|
||||||
---
|
---
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
date: 2017-04-12T11:14:48-04:00
|
date: 2017-04-12T11:14:48-04:00
|
||||||
description: "Master Jacques Coppenole"
|
description: "Master Jacques Coppenole"
|
||||||
featured_image: ""
|
|
||||||
tags: ["scene"]
|
tags: ["scene"]
|
||||||
title: "Chapter IV: Master Jacques Coppenole"
|
title: "Chapter IV: Master Jacques Coppenole"
|
||||||
---
|
---
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
date: 2017-04-13T11:15:58-04:00
|
date: 2017-04-13T11:15:58-04:00
|
||||||
description: "Quasimodo"
|
description: "Quasimodo"
|
||||||
featured_image: ""
|
|
||||||
tags: []
|
tags: []
|
||||||
title: "Chapter V: Quasimodo"
|
title: "Chapter V: Quasimodo"
|
||||||
---
|
---
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{{ $featured_image := $.Param "featured_image" }}
|
{{ $featured_image := $.Param "featured_image" }}
|
||||||
{{ if $featured_image }}
|
{{ if $featured_image }}
|
||||||
<header class="cover bg-center" style="background-image: url('{{ $featured_image | absURL }}');">
|
{{ $featured_image := (trim $featured_image "/") | absURL }}
|
||||||
|
<header class="cover bg-center" style="background-image: url('{{ $featured_image }}');">
|
||||||
<div class="pb3-m pb6-l bg-black-60">
|
<div class="pb3-m pb6-l bg-black-60">
|
||||||
{{ partial "site-navigation.html" . }}
|
{{ partial "site-navigation.html" . }}
|
||||||
<div class="tc-l pv6 ph3 ph4-ns">
|
<div class="tc-l pv6 ph3 ph4-ns">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{{ $featured_image := $.Param "featured_image" }}
|
{{ $featured_image := $.Param "featured_image" }}
|
||||||
{{ if $featured_image }}
|
{{ if $featured_image }}
|
||||||
<header class="cover bg-center" style="background-image: url('{{ $featured_image | absURL }}');">
|
{{ $featured_image := (trim $featured_image "/") | absURL }}
|
||||||
|
<header class="cover bg-center" style="background-image: url('{{ $featured_image }}');">
|
||||||
<div class="bg-black-60">
|
<div class="bg-black-60">
|
||||||
{{ partial "site-navigation.html" .}}
|
{{ partial "site-navigation.html" .}}
|
||||||
<div class="tc-l pv4 pv6-l ph3 ph4-ns">
|
<div class="tc-l pv4 pv6-l ph3 ph4-ns">
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<div class="flex flex-column flex-row-ns">
|
<div class="flex flex-column flex-row-ns">
|
||||||
{{ if .Params.featured_image }}
|
{{ if .Params.featured_image }}
|
||||||
<div class="pr3-ns mb4 mb0-ns w-100 w-40-ns">
|
<div class="pr3-ns mb4 mb0-ns w-100 w-40-ns">
|
||||||
<img src="{{ .Params.featured_image }}" class="db" alt="image from {{ .Title }}">
|
{{ $imgURL := (trim .Params.featured_image "/") | absURL }}
|
||||||
|
<img src="{{ $imgURL }}" class="db" alt="image from {{ .Title }}">
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="w-100{{ if .Params.featured_image }} w-60-ns pl3-ns{{ end }}">
|
<div class="w-100{{ if .Params.featured_image }} w-60-ns pl3-ns{{ end }}">
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<div class="flex flex-column flex-row-ns">
|
<div class="flex flex-column flex-row-ns">
|
||||||
{{ if .Params.featured_image }}
|
{{ if .Params.featured_image }}
|
||||||
<div class="pr3-ns mb4 mb0-ns w-100 w-40-ns">
|
<div class="pr3-ns mb4 mb0-ns w-100 w-40-ns">
|
||||||
<img src="{{ .Params.featured_image }}" class="db" alt="image from {{ .Title }}">
|
{{ $imgURL := (trim .Params.featured_image "/") | absURL }}
|
||||||
|
<img src="{{ $imgURL }}" class="db" alt="image from {{ .Title }}">
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="w-100{{ if .Params.featured_image }} w-60-ns pl3-ns{{ end }}">
|
<div class="w-100{{ if .Params.featured_image }} w-60-ns pl3-ns{{ end }}">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user