web/website/themes/prql-theme/layouts/partials/section-testimonials.html
{{ if .enable }}
{{ range site.Data.testimonials }} {{/* Margin-top & margin-bottom are set to match Tweets. Maybe there's a better way of designing this? (and maybe we design from the stylesheet?) */}} {{ with .quote }} {{ if .link }} {{ .text }} — {{ .author }} {{ else }}
{{ .text }} — {{ .author }}
{{ end }} {{ end }} {{ with .tweet }}
{{/* The Firefox tracking protection blocks images hosted on pbs.twitter.com, see https://bugzilla.mozilla.org/show\_bug.cgi?id=1458915 So we just download the images when building the website. */}} {{ $imageSrc := (resources.GetRemote "https://abs.twimg.com/sticky/default\_profile\_images/default\_profile\_normal.png" | resources.Copy "default.png").RelPermalink }} {{ $localImgPath := printf "cached-avatars/%s.png" .screen_name }} {{ with resources.GetRemote .profile_image_url_https }} {{ $imageSrc = (resources.Copy $localImgPath .).RelPermalink }} {{ else }} {{ warnf "[section-testimonials.html] couldn't fetch remote image %v" .profile_image_url_https }} {{ end }}
{{ .name }}
{{ .text }}
{{ .favorite_count }} {{ .created_at | time.Format "15:04 · Jan 2, 2006" }} Twitter
{{ end }} {{ end }}
{{ end }}