Expand reply/boost/fav only on desktop

This commit is contained in:
Jason McBrayer 2018-08-29 05:23:35 -04:00
parent c71f1cf16d
commit 52efb4a1d7
1 changed files with 102 additions and 105 deletions

View File

@ -5,136 +5,133 @@
{% load static %} {% load static %}
{% if active %} {% if active %}
<article class="media box active-context"> <article class="media box active-context">
{% else %} {% else %}
<article class="media box"> <article class="media box">
{% endif %} {% endif %}
<figure class="media-left"> <figure class="media-left">
<p class="image is-64x64 account-avatar"> <p class="image is-64x64 account-avatar">
<a href="{% url "user" toot.account.acct %}"> <a href="{% url "user" toot.account.acct %}">
<img src="{{ toot.account.avatar }}" <img src="{{ toot.account.avatar }}"
alt=""> alt="">
</a> </a>
</p> </p>
{% if reblog %} {% if reblog %}
<p class="image is-32x32 reblog-icon" > <p class="image is-32x32 reblog-icon" >
<a href="{% url "user" reblog_by %}"> <a href="{% url "user" reblog_by %}">
<img src ="{{ reblog_icon }}" alt=""> <img src ="{{ reblog_icon }}" alt="">
</a> </a>
</p> </p>
{% endif %}
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>{{ toot.account.display_name }}</strong>
<small><a href="{% url "user" toot.account.acct %}">@{{ toot.account.acct }}</a></small>
<a href="{{ toot.url }}">
<small>{{ toot.created_at |humane_time }}</small>
</a>
{% if reblog %}
<br>
Boosted by @{{ reblog_by }}
{% endif %} {% endif %}
</p> </figure>
{% if toot.spoiler_text %} <div class="media-content">
<details class="toot"> <div class="content">
<summary><strong>{{ toot.spoiler_text }} </strong></summary> <p>
<strong>{{ toot.account.display_name }}</strong>
<small><a href="{% url "user" toot.account.acct %}">@{{ toot.account.acct }}</a></small>
<a href="{{ toot.url }}">
<small>{{ toot.created_at |humane_time }}</small>
</a>
{% if reblog %}
<br>
Boosted by @{{ reblog_by }}
{% endif %}
</p>
{% if toot.spoiler_text %}
<details class="toot">
<summary><strong>{{ toot.spoiler_text }} </strong></summary>
<div class="toot">
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
</div>
</details>
{% else %}
<div class="toot"> <div class="toot">
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }} {{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
</div> </div>
</details> {% endif %}
{% else %}
<div class="toot">
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
</div>
{% endif %}
{% if toot.media_attachments %} {% if toot.media_attachments %}
<br> <br>
<div class="level"> <div class="level">
<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 }}">
{% if toot.sensitive %} {% if toot.sensitive %}
<img src="{% static "images/sensitive.png" %}" <img src="{% static "images/sensitive.png" %}"
{% else %} {% else %}
<img src="{{ media.preview_url }}" <img src="{{ media.preview_url }}"
{% endif %} {% endif %}
alt="{% if media.description %} alt="{% if media.description %}
{{ media.description }} {{ media.description }}
{% elif media.text_url %} {% elif media.text_url %}
{{ media.text_url }} {{ media.text_url }}
{% else %} {% else %}
{{ media.url }} {{ media.url }}
{% endif %}" {% endif %}"
{% if media.description %} {% if media.description %}
title="{{ media.description }}" title="{{ media.description }}"
{% endif %} {% endif %}
class="image is-max-128"> class="image is-max-128">
</a> </a>
{% endfor %} {% endfor %}
</div>
</div> </div>
</div> {% endif %}
{% endif %} <br>
<br> <p class="is-hidden"></p>
<p class="is-hidden"></p>
{% if not confirm_page %} {% if not confirm_page %}
<nav class="level is-mobile"> <nav class="level is-mobile">
<div class="level-left"> <div class="level-left">
<a href="{% url "reply" toot.id %}" class="level-item"> <a href="{% url "reply" toot.id %}" class="level-item">
<span class="icon is-small"><span class="fa fa-reply"> <span class="fa fa-reply">
<span class="is-invisible">Reply</span> <span class="is-hidden-mobile">Reply</span>
</span></span>
</a>
{% if toot.visibility != 'private' and toot.visibility != 'direct' %}
<a href="{% url "boost" toot.id %}" class="level-item">
<span class="icon is-small">
{% if toot.reblogged %}
<span class="fa fa-retweet has-text-warning">
<strong class="is-invisible" >Boosted</strong>
{% else %}
<span class="fa fa-retweet" >
<span class="is-invisible" >Boost</span>
{% endif %}
</span>
</span> </span>
</a> </a>
{% endif %} {% if toot.visibility != 'private' and toot.visibility != 'direct' %}
<a href="{% url "fav" toot.id %}" class="level-item"> <a href="{% url "boost" toot.id %}" class="level-item">
<span class="icon is-small"> {% if toot.reblogged %}
{% if toot.favourited %} <span class="fa fa-retweet has-text-warning">
<span class="fa fa-heart has-text-warning"> <strong class="is-hidden-mobile" >Boosted</strong>
<strong class="is-invisible" >Favorited</strong> {% else %}
{% else %} <span class="fa fa-retweet" >
<span class="fa fa-heart"> <span class="is-hidden-mobile" >Boost</span>
<span class="is-invisible" >Favorite</span> {% endif %}
{% endif %}
</span> </span>
</span> </span>
</a> </a>
</div> {% endif %}
<div class="level-right"> <a href="{% url "fav" toot.id %}" class="level-item">
{% if toot.account.acct == own_acct.acct %} {% if toot.favourited %}
<span class="fa fa-heart has-text-warning">
<strong class="is-hidden-mobile" >Favorited</strong>
{% else %}
<span class="fa fa-heart">
<span class="is-hidden-mobile" >Favorite</span>
{% endif %}
</span>
</span>
</a>
</div>
<div class="level-right">
{% if toot.account.acct == own_acct.acct %}
<a class="level-item" href="{% url "redraft" toot.id %}"> <a class="level-item" href="{% url "redraft" toot.id %}">
redraft redraft
</a> </a>
<a class="level-item" href="{% url "delete" toot.id %}"> <a class="level-item" href="{% url "delete" toot.id %}">
delete delete
</a> </a>
{% endif %} {% endif %}
<span class="level-item">
{{ toot.visibility }} {{ toot.visibility }}
</span> &nbsp;&nbsp;
<a class="level-item" href="{% url "thread" toot.id %}"> <a class="level-item" href="{% url "thread" toot.id %}">
thread thread
</a> </a>
</div> </div>
</nav> </nav>
{% endif %} {% endif %}
</div>
</div> </div>
</div> <div class="media-right"></div>
<div class="media-right"></div> </article>
</article>