Commit 2501eb03 authored by Christian Engwer's avatar Christian Engwer

fix image layout for news entries

parent f7dac1ca
......@@ -3,12 +3,21 @@
</div>
<div class="news-content">
{{ $.Scratch.Set "counter" 0 }}
{{ range $img := .Params.image }}
{{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
{{ end }}
{{ $c := $.Scratch.Get "counter" }}
<figure style="height: auto; width: 50%; float: left; text-align: center; white-space: nowrap;">
{{ range $img := .Params.image }}<img src="{{ $img }}"
class="figure-img ratio img-responsive img-rounded"
style="max-width: calc((100% / {{ $c }}) - 1ex);
max-height: calc(50vh);
display: inline-block;
margin-left: .5ex; margin-right: .5ex;"
alt="{{ $.Title }}">{{ end }}
</figure>
{{ .Content }}
{{ if .Params.image }}
<figure style="width: 33%;">
<img src="{{ .Params.image }}" width=100% >
</figure>
{{ end }}
</div>
<div class="news-footer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment