Fix for default project image.

This commit is contained in:
Vicky 2018-03-25 17:34:08 -04:00
parent 64f3358bc9
commit f2024bb2a4
3 changed files with 7 additions and 6 deletions

View file

@ -19,7 +19,7 @@
{{ if .Site.Params.showLatest }}
<h2 class="title is-2 top-pad">Latest Post</h2>
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
<div class="summary">{{ .Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }}
<div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
<h3 class="title is-3 strong-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<div class="markdown">
{{ .Summary }}

View file

@ -17,7 +17,7 @@
<div class="container {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}"><!-- Begin blog title container -->
<h2 class="title is-1 top-pad strong-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
<div class="post-data">
{{ .Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }} |
{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }} |
{{ if eq 1 .ReadingTime }}{{ .ReadingTime }} minute read{{ else }}{{ .ReadingTime }} minutes read{{ end }}
</div>

View file

@ -5,15 +5,16 @@
<div class="section is-small">
<div class="columns is-multiline">
{{ range sort .Pages }} {{ if eq .Section "projects" }}
{{ if eq (.Site.Params.projectColumns | default "3") "2" }}
<div class="column is-half"> {{ else if eq (.Site.Params.projectColumns | default "3") "3" }}
<div class="column is-one-third"> {{ end }}
{{ if eq .Site.Params.projectColumns "2" }}
<div class="column is-half"> {{ else if eq .Site.Params.projectColumns "3" }}
<div class="column is-one-third"> {{ else }}
<div class="column is-one-third"> {{ end }}
<!-- Hey Vicky, show half column if number is even. -->
<div {{ if not .Params.external_link }} id="project{{ $card := .Title | urlize }}{{ replace $card "%" ""}}" {{ end }} class="card">
<div class="card-image">
<figure class="image is-3by2">
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
<img src="{{ if .Params.image }}{{ .Params.image }}{{ else }}{{ .Site.Params.placeHolderimg }}{{ end }}">
<img src="{{ if .Params.image }}{{ .Params.image }}{{ else }}{{ .Site.Params.placeHolderimg | default "img/workday.jpg" }}{{ end }}">
</a>
</figure>
</div>