blob: 5fcd14a5498ba5b841b87edf9d3b1e901c117bdb [file] [log] [blame]
{{define "gopher info" -}}
{{- with (yaml .info)}}
{{- $src := "/images/gophers/wrench.svg"}}
{{- $alt := "Go gophers with wrench"}}
{{- $size := "Large"}}
{{- $align := "Left"}}
{{- $gopher := .color}}
{{- $sizeIn := (or .size "")}}
{{- if eq (.align) "right" "Right"}}
{{- $align = "Right"}}
{{- end}}
{{- if eq $sizeIn "XLarge" "xl" "xlarge"}}
{{- $size = "XLarge"}}
{{- end}}
{{- if eq $gopher "plane"}}
{{- $src = "/images/gophers/biplane.svg"}}
{{- $alt = "Go gopher in a plane"}}
{{- end}}
{{- if eq $gopher "blue"}}
{{- $src = "/images/gophers/blue.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "front" "sticker1"}}
{{- $src = "/images/gophers/front.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "graduate"}}
{{- $src = "/images/gophers/graduate.svg"}}
{{- $alt = "Go gopher graduating"}}
{{- end}}
{{- if eq $gopher "graduate-colorized"}}
{{- $src = "/images/gophers/graduate-colorized.svg"}}
{{- $alt = "Go gopher graduating"}}
{{- end}}
{{- if eq $gopher "green"}}
{{- $src = "/images/gophers/green.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "grey" "gray"}}
{{- $src = "/images/gophers/grey.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "happy" "sticker2"}}
{{- $src = "/images/gophers/happy.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "headlamp"}}
{{- $src = "/images/gophers/headlamp.svg"}}
{{- $alt = "Go gopher with headlamp"}}
{{- end}}
{{- if eq $gopher "headlamp-colorized"}}
{{- $src = "/images/gophers/headlamp-colorized.svg"}}
{{- $alt = "Go gopher with headlamp"}}
{{- end}}
{{- if eq $gopher "ladder"}}
{{- $src = "/images/gophers/ladder.svg"}}
{{- $alt = "Go gopher with ladder"}}
{{- end}}
{{- if eq $gopher "machine"}}
{{- $src = "/images/gophers/machine.svg"}}
{{- $alt = "Go gophers with a machine"}}
{{- end}}
{{- if eq $gopher "machine-colorized"}}
{{- $src = "/images/gophers/machine-colorized.svg"}}
{{- $alt = "Go gopher with a machine"}}
{{- end}}
{{- if eq $gopher "megaphone"}}
{{- $src = "/images/gophers/megaphone.svg"}}
{{- $alt = "Go gopher with a megaphone"}}
{{- end}}
{{- if eq $gopher "peach"}}
{{- $src = "/images/gophers/peach.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "pilot-bust"}}
{{- $src = "/images/gophers/pilot-bust.svg"}}
{{- $alt = "Go gopher pilot"}}
{{- end}}
{{- if eq $gopher "pink"}}
{{- $src = "/images/gophers/pink.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "running"}}
{{- $src = "/images/gophers/running.svg"}}
{{- $alt = "Go gopher running"}}
{{- end}}
{{- if eq $gopher "slate"}}
{{- $src = "/images/gophers/slate.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "wrench"}}
{{- $src = "/images/gophers/wrench.svg"}}
{{- $alt = "gopher with a wrench"}}
{{- end}}
{{- if eq $gopher "yellow"}}
{{- $src = "/images/gophers/yellow.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "violet"}}
{{- $src = "/images/gophers/violet.svg"}}
{{- $alt = "Go gopher"}}
{{- end}}
{{- if eq $gopher "factory"}}
{{- $src = "/images/gophers/factory.png"}}
{{- $alt = "Go gopher factory"}}
{{- end}}
<img
loading="lazy"
class="{{$size}}Media-image {{$align}}"
alt="{{$alt}}"
src="{{$src}}">
{{- end}}
{{- end}}