diff options
author | Crt Mori <crt.mori@gmail.com> | 2021-03-20 13:55:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 13:55:05 +0300 |
commit | 34761ba2b22dd99c2b1bcf564bbf2777b7376a72 (patch) | |
tree | c6cb51d4fe485f3fea833e43e0ca5798c7409e49 /layouts | |
parent | ed759f32286dd9aa561b0ea4bdd26009aa3a15ee (diff) |
Use image on home for projects only when project has an image (#288)
* Use image only when project has an image
So if there is no images, then projects can form a bit tigher and more
centered position in a square.
* Use same principle for all projects listing template
As per the review comment the listing of the projects would also be dependent on the existance of the image and creation of the space for it
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/home/projects.html | 2 | ||||
-rw-r--r-- | layouts/projects/list.html | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/layouts/partials/home/projects.html b/layouts/partials/home/projects.html index ea85a4d..e197e38 100644 --- a/layouts/partials/home/projects.html +++ b/layouts/partials/home/projects.html @@ -18,6 +18,7 @@ {{ end}} <div class="column {{ $columWidth }}"> <div class="card" data-target="#project-{{ $index }}"> + {{ if .Resources.ByType "image" }} <div class="card-image"> <figure class="image is-3by2"> <a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}> @@ -30,6 +31,7 @@ </a> </figure> </div> + {{ end }} <div class="card-content has-text-centered top-pad"> <a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}> {{ .Title | markdownify }} diff --git a/layouts/projects/list.html b/layouts/projects/list.html index 2180025..9c8dc5e 100644 --- a/layouts/projects/list.html +++ b/layouts/projects/list.html @@ -15,6 +15,7 @@ {{ end}} <div class="column {{ $columWidth }}"> <div class="card"> + {{ if .Resources.ByType "image" }} <div class="card-image"> <figure class="image is-3by2"> <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}"> @@ -27,6 +28,7 @@ </a> </figure> </div> + {{ end }} <div class="card-content has-text-centered top-pad"> <a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}"> {{ .Title | markdownify }} |