Skip to content

Commit

Permalink
Fix bug with episode banners on row view (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstratton authored Nov 18, 2019
1 parent f6812ce commit 32af30b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions exampleSite/content/episode/sept.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
12 changes: 4 additions & 8 deletions layouts/partials/row.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ <h2>
{{- 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" -}}
Expand All @@ -32,7 +34,7 @@ <h2>
<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">
Expand Down Expand Up @@ -133,12 +135,6 @@ <h2>
{{- else -}}
{{- $.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">
Expand Down

0 comments on commit 32af30b

Please sign in to comment.