Very basic support for sensitive images

This commit is contained in:
Jason McBrayer 2018-05-15 10:04:09 -04:00
parent 17769e952c
commit b465dc9870
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
{% load humanize %} {% load humanize %}
{% load sanitizer %} {% load sanitizer %}
{% load taglinks %} {% load taglinks %}
{% load static %}
<article class="media"> <article class="media">
<figure class="media-left"> <figure class="media-left">
@ -46,7 +47,11 @@
<div class="level-left"> <div class="level-left">
{% for media in toot.media_attachments %} {% for media in toot.media_attachments %}
<a class="level-item" href="{{ media.url }}"> <a class="level-item" href="{{ media.url }}">
<img src="{{ media.preview_url }}" {% if toot.sensitive %}
<img src="{% static "images/sensitive.png" %}"
{% else %}
<img src="{{ media.preview_url }}"
{% endif %}
alt="{% if media.description %} alt="{% if media.description %}
{{ media.description }} {{ media.description }}
{% elif media.text_url %} {% elif media.text_url %}