mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-08 22:49:44 +00:00
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
This commit is contained in:
parent
ed759f3228
commit
34761ba2b2
2 changed files with 4 additions and 0 deletions
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue