diff options
Diffstat (limited to 'layouts/partials/reviews/metrics.html')
-rw-r--r-- | layouts/partials/reviews/metrics.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/layouts/partials/reviews/metrics.html b/layouts/partials/reviews/metrics.html new file mode 100644 index 0000000..08c9c9a --- /dev/null +++ b/layouts/partials/reviews/metrics.html @@ -0,0 +1,28 @@ + <div class="poster"> + {{- $path := .Params.image }} + {{- $img := resources.Get $path }} + {{- $img1x := $img.Resize "170x webp" }} + {{- $img2x := $img.Resize "340x webp" }} + + <img + alt="Cover" + src="{{ $img1x.Permalink }}" + srcset=" + {{ $img1x.Permalink }} 1x, + {{ $img2x.Permalink }} 2x + " + width="{{ $img1x.Width }}" + height="{{ $img1x.Height }}" + > + </div> + + <div class="rating"> +{{ $rating := .Params.rating}} + My rating:<br> + + {{- range $i, $sequence := (seq 15) }} + {{- if le (mul $sequence 25) (mul (sub $rating 1) 100)}}◾{{- else}}◽{{- end }} + {{- end }} + <br> + <b>{{ $rating }}/5</b> + </div> |