Merge pull request #87 from robrobinbin/master

Add fallback to thumbnails when SVG is not supported
This commit is contained in:
Spike 2021-02-01 12:53:03 -08:00 committed by GitHub
commit d790264a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

View File

@ -722,6 +722,10 @@ img.post_media {
align-self: end;
}
.post_thumbnail img {
max-width: 100%;
}
.stickied {
--accent: var(--green);
border: 1px solid var(--green);

View File

@ -85,6 +85,9 @@
{% else %}
<svg width="{{ post.thumbnail.width }}px" height="{{ post.thumbnail.height }}px" xmlns="http://www.w3.org/2000/svg">
<image width="100%" height="100%" href="{{ post.thumbnail.url }}"/>
<desc>
<img alt="Thumbnail" src="{{ post.thumbnail.url }}"/>
</desc>
</svg>
{% endif %}
<span>{% if post.post_type == "link" %}{{ post.domain }}{% else %}{{ post.post_type }}{% endif %}</span>

View File

@ -80,6 +80,9 @@
{% else %}
<svg width="{{ post.thumbnail.width }}px" height="{{ post.thumbnail.height }}px" xmlns="http://www.w3.org/2000/svg">
<image width="100%" height="100%" href="{{ post.thumbnail.url }}"/>
<desc>
<img alt="Thumbnail" src="{{ post.thumbnail.url }}"/>
</desc>
</svg>
{% endif %}
<span>{% if post.post_type == "link" %}{{ post.domain }}{% else %}{{ post.post_type }}{% endif %}</span>

View File

@ -70,6 +70,9 @@
{% else %}
<svg width="{{ post.thumbnail.width }}px" height="{{ post.thumbnail.height }}px" xmlns="http://www.w3.org/2000/svg">
<image width="100%" height="100%" href="{{ post.thumbnail.url }}"/>
<desc>
<img alt="Thumbnail" src="{{ post.thumbnail.url }}"/>
</desc>
</svg>
{% endif %}
<span>{% if post.post_type == "link" %}{{ post.domain }}{% else %}{{ post.post_type }}{% endif %}</span>