{{- define "tier" -}}
{{- $label := index . "label" -}}
{{- $size := index . "size" -}}
{{- $sponsors := index . "sponsors" -}}
{{- if $sponsors }}
			<div class="goreleaser-sponsors-tier">
				<div class="goreleaser-sponsors-tier-label">{{ $label }}</div>
				<div class="goreleaser-sponsors-grid">
				{{- range $sponsors}}
					<a
						class="goreleaser-sponsor-item"
						href="{{ .Website }}?utm_source=goreleaser&utm_medium=sponsor&utm_campaign=homepage&utm_content={{ .Source }}"
						target="_blank"
						rel="noopener sponsored"
					>
						<img
							src="{{ .LogoWithSize $size }}"
							alt="{{ .Name }}"
							width="{{ $size }}"
							height="{{ $size }}"
						/>
						{{ .Name }}
					</a>
				{{- end }}
				</div>
			</div>
{{- end -}}
{{- end -}}
{{- printf "			<!-- this list is auto-generated by https://github.com/goreleaser/sponsors -->\n" }}
{{- template "tier" (dict "label" "Diamond"  "size" 128 "sponsors" (index .ByTier "diamond"))  -}}
{{- template "tier" (dict "label" "Platinum" "size" 112 "sponsors" (index .ByTier "platinum")) -}}
{{- template "tier" (dict "label" "Gold"     "size" 96  "sponsors" (index .ByTier "gold"))     -}}
{{- template "tier" (dict "label" "Silver"   "size" 80  "sponsors" (index .ByTier "silver"))   -}}
