1
0
Fork 0

[twitter] Load responsive images

This commit is contained in:
Sebastian Schulze 2020-09-07 21:18:50 +02:00
parent 644ecfb2f1
commit 8e89713b7d
Signed by: bascht
GPG Key ID: 5BCB1D3B4D38A35A
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<a class="u-url" href="{{.Permalink}}">
<h2 class="p-name">{{ partial "social_logo" . }} {{.Params.text}}</h2>
{{ if .Params.media_url }}<p><img src="https://img.bascht.com/proxy/300,400,sc/{{ .Params.media_url }}" alt="Image attached to Tweet"></p>{{ end }}
{{ if .Params.media_url }}<p><img srcset="https://img.bascht.com/proxy/300,webp/{{ .Params.media_url }} 300w, https://img.bascht.com/proxy/850,webp/{{ .Params.media_url }} 850w" sizes=" (min-width: 400px) 300vw, 800vw" src="https://img.bascht.com/proxy/300,webp/{{ .Params.media_url }}" alt="Image attached to Tweet"></p>{{ end }}
<small>{{ .Date.Format "January, 02th 2006" }}</small>
</a>
<a class="hidden u-syndication syn-link" rel="syndication" href="{{ .Params.original_url }}">{{ .Params.original_url }}</a>