{{ $rating := . }} {{ with $rating }} {{ $fullStars := math.Floor . }} {{ $halfStar := sub . $fullStars }} {{ $emptyStars := sub 5 (math.Sum $fullStars (math.Ceil $halfStar)) }}

{{ range seq $fullStars }} 🌕 {{ end }} {{ if $halfStar }} 🌗 {{ end }} {{ range seq $emptyStars }} 🌑 {{ end }}

{{ end }}