{{- define "partials/reactionsvg.html" -}} {{- if eq .emoji "♥️" }}{{ end -}} {{- if eq .emoji "⭐️" }}{{ end -}} {{- if eq .emoji "👍" }}{{ end -}} {{- if eq .emoji "👏" }}{{ end -}} {{- if eq .emoji "🔁" }}{{ end -}} {{- if eq .emoji "💬" }}{{ end -}} {{- if .name }}: {{ end -}} {{- end -}} {{- $index := (split .Path "/") | after 1 -}} {{- $interactions := index .Site.Data.interactions $index -}} {{ with $interactions }}
{{ $most := 0 }} {{ $emoji := "" }} {{ range $thisEm, $count := .reactions }} {{ if gt $count $most }} {{ $most = $count }} {{ $emoji = $thisEm }} {{ end }} {{ end -}}
Reactions & comments {{- $interactionMap := dict -}} {{- range $in := .interactions -}} {{- $oldList := index $interactionMap $in.emoji }} {{- $newList := append $in $oldList -}} {{- $interactionMap = merge $interactionMap (dict $in.emoji $newList) -}} {{- end -}}
    {{ range .interactions }} {{ if not .comment }} {{ continue }} {{ end }}
  1. {{ .author.name | replaceRE `(\?\x{200D}?){2,}` "" | strings.TrimSpace }}: {{ .comment }} ({{ partial "rel-date.html" (dict "time" .timestamp "rel" $.Page.PublishDate) }})
  2. {{ end }}
{{ else }}

No comments or reactions from elsewhere on the web

{{ end }}