forked from rDrama/rDrama
fdfddf
parent
3483ae9686
commit
a3b111b99a
|
@ -205,8 +205,8 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
|
|||
@property
|
||||
#@lazy
|
||||
def thumb_url(self):
|
||||
|
||||
if self.over_18: return f"/assets/images/nsfw.png"
|
||||
elif not p.url: return f"/assets/images/default_thumb_text.png"
|
||||
elif self.thumburl: return self.thumburl
|
||||
elif "youtu.be" in self.domain or "youtube.com" in self.domain: return '/assets/images/default_thumb_yt.png'
|
||||
else: return '/assets/images/default_thumb_link.png'
|
||||
|
|
|
@ -63,21 +63,15 @@
|
|||
<div class="card-header bg-transparent border-0 d-flex flex-row flex-nowrap pl-2 pl-md-0 p-0 mr-md-2">
|
||||
|
||||
<div class="position-relative d-none d-md-block" style="z-index: 3;">
|
||||
{% if not p.realurl(v) %}
|
||||
<a href="{{p.permalink}}" {% if v and v.newtab %}target="_blank"{% endif %} rel="{% if p.author.is_private %}nofollow {% endif %}noopener">
|
||||
<img src="/assets/images/default_thumb_text.png" class="post-img border-0" alt="text post thumbnail">
|
||||
</a>
|
||||
|
||||
{% elif p.is_image %}
|
||||
<a href="javascript:void(0)" rel="nofollow noopener" class="expandable-image" data-toggle="modal" data-target="#expandImageModal" data-url="{{p.realurl(v)}}">
|
||||
<img src="{{p.thumb_url}}" class="post-img">
|
||||
</a>
|
||||
|
||||
{% if p.is_image %}
|
||||
<a href="javascript:void(0)" rel="nofollow noopener" class="expandable-image" data-toggle="modal" data-target="#expandImageModal" data-url="{{p.realurl(v)}}">
|
||||
{% else %}
|
||||
<a target="_blank" href="{{p.realurl(v)}}" rel="nofollow noopener" target="_blank">
|
||||
<img src="{{p.thumb_url}}" class="post-img" alt="">
|
||||
</a>
|
||||
<a target="_blank" href="{{p.realurl(v)}}" rel="nofollow noopener" target="_blank">
|
||||
{% endif %}
|
||||
<img src="{{p.thumb_url}}" class="post-img" alt="">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue