Card thumbnails for users

This commit is contained in:
spikecodes 2021-01-11 17:38:35 -08:00
parent 48d2943f72
commit 7a33ed3434
2 changed files with 6 additions and 4 deletions

View File

@ -31,7 +31,7 @@
<div id="posts"> <div id="posts">
{% for post in posts %} {% for post in posts %}
{% if !(post.flags.nsfw && prefs.hide_nsfw == "on") %} {% if !(post.flags.nsfw && prefs.hide_nsfw == "on") %}
<div class="post {% if post.flags.stickied %}stickied{% endif %} {% if prefs.layout == "card" && post.post_type == "image" %} card_post {% endif %}"> <div class="post {% if post.flags.stickied %}stickied{% endif %} {% if prefs.layout == "card" && post.post_type == "image" %}card_post{% endif %}">
<div class="post_left"> <div class="post_left">
<p class="post_score">{{ post.score }}</p> <p class="post_score">{{ post.score }}</p>
{% if post.flags.nsfw %}<div class="nsfw">NSFW</div>{% endif %} {% if post.flags.nsfw %}<div class="nsfw">NSFW</div>{% endif %}

View File

@ -23,7 +23,7 @@
{% if post.flags.nsfw && prefs.hide_nsfw == "on" %} {% if post.flags.nsfw && prefs.hide_nsfw == "on" %}
{% else if post.title != "Comment" %} {% else if post.title != "Comment" %}
<div class="post"> <div class="post {% if post.flags.stickied %}stickied{% endif %} {% if prefs.layout == "card" && post.post_type == "image" %}card_post{% endif %}">
<div class="post_left"> <div class="post_left">
<p class="post_score">{{ post.score }}</p> <p class="post_score">{{ post.score }}</p>
{% if post.flags.nsfw %}<div class="nsfw">NSFW</div>{% endif %} {% if post.flags.nsfw %}<div class="nsfw">NSFW</div>{% endif %}
@ -51,8 +51,10 @@
<!-- POST MEDIA/THUMBNAIL --> <!-- POST MEDIA/THUMBNAIL -->
{% if prefs.layout == "card" && post.post_type == "image" %} {% if prefs.layout == "card" && post.post_type == "image" %}
<img class="post_media" src="{{ post.media }}"/> <img class="post_media" src="{{ post.media }}"/>
{% else if prefs.layout != "card" %} {% else if post.post_type == "link" %}
<img class="post_thumbnail" src="{{ post.thumbnail }}"> <a class="post_thumbnail" href="{{ post.media }}"><img src="{{ post.thumbnail }}"><span>{{ post.domain }}</span></a>
{% else if post.post_type != "self" %}
<a class="post_thumbnail" href="{{ post.permalink }}"><img src="{{ post.thumbnail }}"><span>{{ post.post_type }}</span></a>
{% endif %} {% endif %}
</div> </div>
</div> </div>