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

github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Stratton <matt.stratton@gmail.com>2019-11-18 22:55:18 +0300
committerGitHub <noreply@github.com>2019-11-18 22:55:18 +0300
commit32af30b8803d11587b3cf65c0f1a2e0cf587c96d (patch)
tree0e3684e35501c13aa1bfd79a4b2fca41aefb8554
parentf6812ce66c01f351984f58c4553ecb115a473ae3 (diff)
Fix bug with episode banners on row view (#232)
-rw-r--r--exampleSite/content/episode/sept.md1
-rw-r--r--layouts/partials/row.html12
2 files changed, 5 insertions, 8 deletions
diff --git a/exampleSite/content/episode/sept.md b/exampleSite/content/episode/sept.md
index bf01ee1..d654645 100644
--- a/exampleSite/content/episode/sept.md
+++ b/exampleSite/content/episode/sept.md
@@ -6,6 +6,7 @@ categories = []
date = "2016-09-25T04:10:01-05:00"
episode = "12"
episode_image = "img/episode/sept.jpg"
+#episode_banner = "img/episode/default-banner.jpg"
explicit = "no"
guests = ["jsmith", "ccooper"]
sponsors = ["bluthcompany"]
diff --git a/layouts/partials/row.html b/layouts/partials/row.html
index c5ee6d6..5fbb5c2 100644
--- a/layouts/partials/row.html
+++ b/layouts/partials/row.html
@@ -21,7 +21,9 @@
{{- end -}}
{{- end -}}
{{- with .Params.youtube -}}
- {{- $.Scratch.Set "youtube" "true" -}}
+ {{- if . ne "" -}}
+ {{- $.Scratch.Set "youtube" "true" -}}
+ {{- end -}}
{{- end -}}
{{- with .Params.episode_banner -}}
{{- $.Scratch.Set "episode_banner" "true" -}}
@@ -32,7 +34,7 @@
<div class = "row homepage_episode_row">
<div class = "col">
<a href="{{ .Permalink }}" class = "row_latest_episode_title"><h2>{{ .Title }}</h2></a>
- <small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }}</small>
+ <small>Posted on {{ dateFormat "Monday, Jan 2, 2006" .Date }} youtube = {{($.Scratch.Get "youtube")}} and {{ .Params.youtube }}</small>
</div>
</div>
<div class = "row homepage_episode_row">
@@ -134,12 +136,6 @@
{{- $.Scratch.Set "truncate" 600 -}}
{{- end -}}
{{- end -}}
- {{- with .Params.youtube -}}
- {{- $.Scratch.Set "youtube" "true" -}}
- {{- end -}}
- {{- with .Params.episode_banner -}}
- {{- $.Scratch.Set "episode_banner" "true" -}}
- {{- end -}}
<div class = "row homepage_episode_row">
<div class = "col-md-12">
<a href="{{ .Permalink }}" class= "grid_episode_title"><h3 class= "grid_episode_title">{{ .Title }}</h3></a>