-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Thumb for "Monthly Reviews" is hardcoded to "/img/blog/review-thumb.png"
- Loading branch information
Showing
1 changed file
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
{{ $thumb := ""}} | ||
{{ with .Params.thumb}} | ||
{{ with $.Resources.GetMatch .}} | ||
{{ $thumb = .Fill "80x80 jpg q99"}} | ||
{{ with $thumb}} | ||
<div class="post-thumb"><img src="{{ $thumb.Permalink }}" class="img-fluid"/></div> | ||
{{ end }} | ||
{{ $category := .Params.categories }} | ||
|
||
{{ if ne $category "Monthly Reviews" }} | ||
{{ with .Params.thumb}} | ||
{{ with $.Resources.GetMatch .}} | ||
{{ $thumb = .Fill "80x80 jpg q99"}} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
|
||
{{ if eq $thumb ""}} | ||
<div class="post-thumb"><img src="/img/blog/grey-thumb.png" class="img-fluid"/></div> | ||
{{ end }} | ||
{{ if eq $category "Monthly Reviews" }} | ||
<div class="post-thumb"><img src="/img/blog/review-thumb.png" class="img-fluid"/></div> | ||
{{ else if ne $thumb "" }} | ||
<div class="post-thumb"><img src="{{ $thumb.Permalink }}" class="img-fluid"/></div> | ||
{{ else }} | ||
<div class="post-thumb"><img src="/img/blog/grey-thumb.png" class="img-fluid"/></div> | ||
{{ end }} |