jefklakscodex/themes/jefklak-creative-portfolio/layouts/partials/score.html

22 lines
683 B
HTML

{{ $simplescore := $.Scratch.Get "simplescore" }}
{{ if isset $.Params "score" }}
<p>
{{ $score := $.Params.score }}
{{ if not $simplescore }}
<strong>Verdict</strong>: <span class="rating">{{ $score }}</span>/5
{{ else }}
<span class="rating" style="display: none;">{{ $score }}</span>
{{ end }}
{{ range after 0 (seq $score)}}
<img src="/img/random/4.gif" class="score score-on" title="Score: {{ $score }}/5" />
{{ end }}
{{ range after 0 (seq (sub 5 $score))}}
<img src="/img/random/4.gif" class="score score-off" title="Score: {{ $score }}/5" />
{{ end }}
{{ if not $simplescore }}
{{ partial "scorelabel" . }}
{{ end }}
</p>
{{ end }}