Remove uses of loading-attribute-polyfill

Remains to be seen if we still need to remove/conditionally add load=lazy
This commit is contained in:
Jason McBrayer 2023-10-04 13:35:19 -04:00
parent b8ea84ade4
commit cc63a6f0d8
3 changed files with 328 additions and 343 deletions

View File

@ -1,6 +0,0 @@
/*
* Loading attribute polyfill - https://github.com/mfranzke/loading-attribute-polyfill
* @license Copyright(c) 2019 by Maximilian Franzke
* Credits for the initial kickstarter / script to @Sora2455, and supported by @cbirdsong, @eklingen, @DaPo, @nextgenthemes, @diogoterremoto, @dracos, @Flimm, @TomS- and @vinyfc93 - many thanks for that !
*/
!function(e,t){"use strict";var r,a,o={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},n={loading:"loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,scrolling:"onscroll"in window};function i(e){var t,r,a=[];"picture"===e.parentNode.tagName.toLowerCase()&&(t=e.parentNode,(r=t.querySelector("source[data-lazy-remove]"))&&t.removeChild(r),a=Array.prototype.slice.call(e.parentNode.querySelectorAll("source"))),a.push(e),a.forEach((function(e){e.hasAttribute("data-lazy-srcset")&&(e.setAttribute("srcset",e.getAttribute("data-lazy-srcset")),e.removeAttribute("data-lazy-srcset"))})),e.setAttribute("src",e.getAttribute("data-lazy-src")),e.removeAttribute("data-lazy-src")}function c(e){var t=document.createElement("div");for(t.innerHTML=function(e){var t=e.textContent||e.innerHTML,a="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((t.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((t.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!n.loading&&n.scrolling&&(void 0===r?t=t.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===e.parentNode.tagName.toLowerCase()&&(t='<source srcset="'+a+'" data-lazy-remove="true"></source>'+t),t=t.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+a+'" data-lazy-src='))),t}(e);t.firstChild;)n.loading||!n.scrolling||void 0===r||!t.firstChild.tagName||"img"!==t.firstChild.tagName.toLowerCase()&&"iframe"!==t.firstChild.tagName.toLowerCase()||r.observe(t.firstChild),e.parentNode.insertBefore(t.firstChild,e);e.parentNode.removeChild(e)}function d(){document.querySelectorAll("noscript."+e).forEach(c),void 0!==window.matchMedia&&window.matchMedia("print").addListener((function(e){e.matches&&document.querySelectorAll(o.lazyImage+"[data-lazy-src],"+o.lazyIframe+"[data-lazy-src]").forEach((function(e){i(e)}))}))}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(r=new IntersectionObserver((function(e,t){e.forEach((function(e){if(0!==e.intersectionRatio){var r=e.target;t.unobserve(r),i(r)}}))}),o)),a="requestAnimationFrame"in window?window.requestAnimationFrame:function(e){e()},/comp|inter/.test(document.readyState)?a(d):"addEventListener"in document?document.addEventListener("DOMContentLoaded",(function(){a(d)})):document.attachEvent("onreadystatechange",(function(){"complete"===document.readyState&&d()}))}("loading-lazy");

View File

@ -8,65 +8,64 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>
{% block title %}
{% if own_acct %}
brutaldon ('{{ own_acct.username }}')
{% else %}
brutaldon
{% endif %}
{% endblock %}</title>
<link rel="manifest" href="{% static 'manifest.webmanifest' %}">
{% if not preferences %}
<link rel="stylesheet"
href="{% static 'css/bulma.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/fork-awesome.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-badge.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-tooltip.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/magnific-popup.css' %}">
<link rel="stylesheet" href="{% static "css/brutaldon.css" %}">
{% else %}
<link rel="stylesheet"
href="{% static preferences.theme.main_css %}">
<link rel="stylesheet" href="{% static preferences.theme.tweaks_css %}">
<link rel="stylesheet"
href="{% static 'css/magnific-popup.css' %}">
{% if not preferences.theme.is_brutalist %}
<link rel="stylesheet"
href="{% static 'css/fork-awesome.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-badge.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-tooltip.min.css' %}">
{% endif %}
{% if not preferences.no_javascript %}
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/intercooler.js' %}"></script>
<script type="application/javascript" src="{% static 'js/mousetrap.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jquery.magnific-popup.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/loading-attribute-polyfill.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/brutaldon-enhancements.js' %}"></script>
{% block page_scripts %}
{% endblock %}
{% endif %}
{% endif %}
{% if own_acct %}
<link rel="icon" href="{{ own_acct.avatar_static }}">
brutaldon ('{{ own_acct.username }}')
{% else %}
<link rel="icon" href="{% static "images/brutaldon.png" %}" type="image/png">
brutaldon
{% endif %}
{% endblock %}</title>
<link rel="manifest" href="{% static 'manifest.webmanifest' %}">
{% if not preferences %}
<link rel="stylesheet"
href="{% static 'css/bulma.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/fork-awesome.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-badge.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-tooltip.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/magnific-popup.css' %}">
<link rel="stylesheet" href="{% static "css/brutaldon.css" %}">
{% else %}
<link rel="stylesheet"
href="{% static preferences.theme.main_css %}">
<link rel="stylesheet" href="{% static preferences.theme.tweaks_css %}">
<link rel="stylesheet"
href="{% static 'css/magnific-popup.css' %}">
{% if not preferences.theme.is_brutalist %}
<link rel="stylesheet"
href="{% static 'css/fork-awesome.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-badge.min.css' %}">
<link rel="stylesheet"
href="{% static 'css/bulma-tooltip.min.css' %}">
{% endif %}
{% if not preferences.no_javascript %}
<script type="text/javascript" src="{% static 'js/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/intercooler.js' %}"></script>
<script type="application/javascript" src="{% static 'js/mousetrap.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/jquery.magnific-popup.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/brutaldon-enhancements.js' %}"></script>
{% block page_scripts %}
{% endblock %}
{% endif %}
{% endif %}
{% if own_acct %}
<link rel="icon" href="{{ own_acct.avatar_static }}">
{% else %}
<link rel="icon" href="{% static "images/brutaldon.png" %}" type="image/png">
{% endif %}
<meta name="twitter:card" content="summary">
<meta property="og:type" content="website">
<meta name="twitter:site" content="@jfmcbrayer">
<meta name="twitter:url" property="og:url" content="{% url "about" %}">
<meta name="twitter:title" property="og:title" content="Brutaldon">
<meta name="twitter:image" property="og:image"
content="{% static "images/brutaldon.png" %}">
<meta name="twitter:description" property="og:description"
content="A brutalist, web-1.0 web client for Mastodon and Pleroma. Supports text-only browsers like Lynx, older browsers, as well as the latest mainstream browsers. All JavaScript is completely optional and progressively enhances the core application.">
<meta name="twitter:card" content="summary">
<meta property="og:type" content="website">
<meta name="twitter:site" content="@jfmcbrayer">
<meta name="twitter:url" property="og:url" content="{% url "about" %}">
<meta name="twitter:title" property="og:title" content="Brutaldon">
<meta name="twitter:image" property="og:image"
content="{% static "images/brutaldon.png" %}">
<meta name="twitter:description" property="og:description"
content="A brutalist, web-1.0 web client for Mastodon and Pleroma. Supports text-only browsers like Lynx, older browsers, as well as the latest mainstream browsers. All JavaScript is completely optional and progressively enhances the core application.">
@ -76,100 +75,100 @@
<div id="page-load-indicator"></div>
<div id="new-toot-modal" class="modal"></div>
{% block navbar %}
<nav class="navbar is-primary" role="navigation"
aria-label="main navigation" id="main-nav-bar">
<div class="navbar-brand">
<a class="navbar-item" href="{% url "home" %}">
{% if own_acct %}
<img src="{{ own_acct.avatar_static }}"
class="image is-32x32 avatar"
alt="Brutaldon ('{{ own_acct.username }}')">
<nav class="navbar is-primary" role="navigation"
aria-label="main navigation" id="main-nav-bar">
<div class="navbar-brand">
<a class="navbar-item" href="{% url "home" %}">
{% if own_acct %}
<img src="{{ own_acct.avatar_static }}"
class="image is-32x32 avatar"
alt="Brutaldon ('{{ own_acct.username }}')">
{% else %}
<img loading="lazy" src="{% static "images/brutaldon.png" %}"
class="image is-32x32" alt="Brutaldon">
{% endif %}
</a>
</div>
{% if request.session.active_instance and request.session.active_username %}
<div class="navbar-menu is-active" id="navMenu">
<!-- navbar start, navbar end -->
<div class="navbar-start">
<a href="{% url "home" %}" class="navbar-item">
<span class="fa fa-home"></span>
<span>Home</span>
</a>
<a class="navbar-item" href="{% url "note" %}">
<span class="fa fa-bell"></span>
{% if preferences.notifications and not preferences.theme.is_brutalist %}
<span ic-src="{% url 'notes_count' %}"
ic-poll="{{ preferences.poll_frequency }}s"
ic-target="this"
ic-select-from-response="#notes-count">
<span
{% if notifications and notifications != '0' %}
class="badge"
{% endif %}
data-badge="{{ notifications }}">
Notifications</span>
</span>
{% elif notifications and preferences.notifications %}
<span ic-src="{% url 'notes_count' %}"
ic-poll="{{ preferences.poll_frequency }}s"
ic-target="this"
ic-select-from-response="#notes-count">
<span >Notifications ({{ notifications }})</span>
</span>
{% else %}
<img loading="lazy" src="{% static "images/brutaldon.png" %}"
class="image is-32x32" alt="Brutaldon">
<span >Notifications</span>
{% endif %}
</a>
<a class="navbar-item" href="{% url "local" %}">
<span class="fa fa-community"></span>
<span >Local</span>
</a>
<a class="navbar-item" href="{% url "fed" %}">
<span class="fa fa-globe"></span>
<span >Federated</span>
</a>
<a class="navbar-item" href="{% url "toot" %}"
ic-get-from="{% url "toot" %}"
ic-target="#new-toot-modal"
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
<span class="fa fa-edit"> </span>
<span >New Toot</span>
</a>
<a class="navbar-item" href="{% url "search" %}"
ic-get-from="{% url "search" %}"
ic-target="#new-toot-modal"
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
<span class="fa fa-search"> </span>
<span >Search</span>
</a>
</div>
{% if request.session.active_instance and request.session.active_username %}
<div class="navbar-menu is-active" id="navMenu">
<!-- navbar start, navbar end -->
<div class="navbar-start">
<a href="{% url "home" %}" class="navbar-item">
<span class="fa fa-home"></span>
<span>Home</span>
</a>
<a class="navbar-item" href="{% url "note" %}">
<span class="fa fa-bell"></span>
{% if preferences.notifications and not preferences.theme.is_brutalist %}
<span ic-src="{% url 'notes_count' %}"
ic-poll="{{ preferences.poll_frequency }}s"
ic-target="this"
ic-select-from-response="#notes-count">
<span
{% if notifications and notifications != '0' %}
class="badge"
{% endif %}
data-badge="{{ notifications }}">
Notifications</span>
</span>
{% elif notifications and preferences.notifications %}
<span ic-src="{% url 'notes_count' %}"
ic-poll="{{ preferences.poll_frequency }}s"
ic-target="this"
ic-select-from-response="#notes-count">
<span >Notifications ({{ notifications }})</span>
</span>
{% else %}
<span >Notifications</span>
{% endif %}
</a>
<a class="navbar-item" href="{% url "local" %}">
<span class="fa fa-community"></span>
<span >Local</span>
</a>
<a class="navbar-item" href="{% url "fed" %}">
<span class="fa fa-globe"></span>
<span >Federated</span>
</a>
<a class="navbar-item" href="{% url "toot" %}"
ic-get-from="{% url "toot" %}"
ic-target="#new-toot-modal"
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
<span class="fa fa-edit"> </span>
<span >New Toot</span>
</a>
<a class="navbar-item" href="{% url "search" %}"
ic-get-from="{% url "search" %}"
ic-target="#new-toot-modal"
ic-on-complete="$('#new-toot-modal').toggleClass('is-active');">
<span class="fa fa-search"> </span>
<span >Search</span>
</a>
</div>
<div class="navbar-end" >
<a class="navbar-item" href="{% url "settings" %}">
<span class="fa fa-gear"></span>
<span >Settings</span>
</a>
<a class="navbar-item" href="{% url "accounts" %}">
<span class="fa fa-id-card-o"> </span>
<span >Accounts</span>
</a>
</div>
</div>
{% endif %}
</nav>
<div class="navbar-end" >
<a class="navbar-item" href="{% url "settings" %}">
<span class="fa fa-gear"></span>
<span >Settings</span>
</a>
<a class="navbar-item" href="{% url "accounts" %}">
<span class="fa fa-id-card-o"> </span>
<span >Accounts</span>
</a>
</div>
</div>
{% endif %}
</nav>
{% endblock %}
<main id="main" class="section">
<div class="container">
{% block content %}
<h1 class="title">
Title
</h1>
<p class="subtitle">
Brutaldon is totally a thing.
</p>
<h1 class="title">
Title
</h1>
<p class="subtitle">
Brutaldon is totally a thing.
</p>
{% endblock %}
</div>
</main>
@ -187,12 +186,10 @@
</div>
<div class="level-right">
{% if preferences.theme.is_brutalist %}
<noscript class="loading-lazy">
<img loading="lazy" class="level-item" src="{% static '/images/lynx.gif' %}"
alt="Lynx Now!">
<img loading="lazy" class="level-item" src="{% static '/images/now9.gif' %}"
alt="Netscape Now!">
</noscript>
<img loading="lazy" class="level-item" src="{% static '/images/lynx.gif' %}"
alt="Lynx Now!">
<img loading="lazy" class="level-item" src="{% static '/images/now9.gif' %}"
alt="Netscape Now!">
{% endif %}
<a class="level-item is-size-7" href="{% url "privacy" %}">
Privacy
@ -203,28 +200,28 @@
{% if not preferences.no_javascript %}
<script type="application/javascript">
$(document).ready(function () {
menuPrepare();
});
<script type="application/javascript">
$(document).ready(function () {
menuPrepare();
});
{% if preferences.lightbox %}
Intercooler.ready(function ()
{
$('.attachments').each(function() {
$(this).magnificPopup({
delegate: 'figure.attachment-image a',
type: 'image',
preload: [1, 1],
gallery: {enabled: true },
zoom: { enabled: true }
});
{% if preferences.lightbox %}
Intercooler.ready(function ()
{
$('.attachments').each(function() {
$(this).magnificPopup({
delegate: 'figure.attachment-image a',
type: 'image',
preload: [1, 1],
gallery: {enabled: true },
zoom: { enabled: true }
});
});
{% endif %}
</script>
{% block page_scripts_inline %}
{% endblock %}
});
{% endif %}
</script>
{% block page_scripts_inline %}
{% endblock %}
{% endif %}
</body>

View File

@ -6,202 +6,196 @@
{% if toot %}
{% if active %}
<article id="toot-{{toot.id}}" class="media box active-context">
{% else %}
<article id="toot-{{toot.id}}" class="media box">
{% endif %}
<article id="toot-{{toot.id}}" class="media box active-context">
{% else %}
<article id="toot-{{toot.id}}" class="media box">
{% endif %}
<figure class="media-left">
<p class="image is-64x64 account-avatar">
<a href="{% url "user" toot.account.acct %}">
<img loading="auto" src="{{ toot.account.avatar_static }}"
alt="">
</a>
</p>
{% if reblog %}
<p class="image is-32x32 reblog-icon" >
<a href="{% url "user" reblog_by %}">
<img loading="auto" src ="{{ reblog_icon }}" alt="">
</a>
</p>
{% endif %}
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}</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>
<figure class="media-left">
<p class="image is-64x64 account-avatar">
<a href="{% url "user" toot.account.acct %}">
<img loading="auto" src="{{ toot.account.avatar_static }}"
alt="">
</a>
</p>
{% if reblog %}
<br>
Boosted by @{{ reblog_by }}
<p class="image is-32x32 reblog-icon" >
<a href="{% url "user" reblog_by %}">
<img loading="auto" src ="{{ reblog_icon }}" alt="">
</a>
</p>
{% endif %}
</p>
{% if toot.spoiler_text %}
<details class="toot">
<summary><strong>{{ toot.spoiler_text }} </strong></summary>
</figure>
<div class="media-content">
<div class="content">
<p>
<strong>{{ toot.account.display_name | fix_emojos:toot.account.emojis | strip_html |safe}}</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">
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
</div>
</details>
{% else %}
<div class="toot">
{{ toot.content | relink_toot | fix_emojos:toot.emojis | strip_html | safe }}
</div>
{% endif %}
{% endif %}
{% if toot.poll %}
<div class="poll">
{% if toot.poll.voted or toot.poll.expired %}
{% if toot.poll %}
<div class="poll">
{% if toot.poll.voted or toot.poll.expired %}
{% include "polls/completed_partial.html" with toot=toot %}
{% else %}
{% else %}
<!-- Poll form -->
{% include "polls/new_partial.html" with toot=toot %}
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
{% if toot.card %}
<div class="card">
<div class="card-content columns">
{% if toot.card.image %}
{% if toot.card %}
<div class="card">
<div class="card-content columns">
{% if toot.card.image %}
<div class="column is-one-third">
<a href="{{ toot.card.url }}">
<noscript class="loading-lazy">
<img loading="lazy" alt="{{ toot.card.title }}"
src="{{ toot.card.image }}"
class="is-max-128">
</noscript>
</a>
</div>
{% endif %}
<div class="column is-two-thirds">
<p>
<strong>
<a href="{{ toot.card.url }}">
{{ toot.card.title }}
</a>
</strong>
{% endif %}
<div class="column is-two-thirds">
<p>
<strong>
<a href="{{ toot.card.url }}">
{{ toot.card.title }}
</a>
</strong>
<p>{{ toot.card.description |truncatechars_html:500}}</p>
<p>{{ toot.card.description |truncatechars_html:500}}</p>
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% if toot.media_attachments %}
<br>
<div class="columns is-multiline attachments is-gapless">
{% for media in toot.media_attachments %}
{% if toot.media_attachments %}
<br>
<div class="columns is-multiline attachments is-gapless">
{% for media in toot.media_attachments %}
{% if media.type == "image" %}
<figure class="column attachment-image">
<a href="{{ media.url }}">
<noscript class="loading-lazy">
{% if toot.sensitive and not preferences.preview_sensitive %}
<img loading="lazy" src="{% static "images/sensitive.png" %}"
{% else %}
<img loading="lazy" src="{{ media.preview_url }}"
{% endif %}
alt="{% if media.description %}
{{ media.description }}
{% elif media.text_url %}
{{ media.text_url }}
{% else %}
{{ media.url }}
{% endif %}"
{% if media.description %}
title="{{ media.description }}"
{% endif %}
class="image is-max-256">
</noscript>
</a>
</figure>
<figure class="column attachment-image">
<a href="{{ media.url }}">
{% if toot.sensitive and not preferences.preview_sensitive %}
<img loading="lazy" src="{% static "images/sensitive.png" %}"
{% else %}
<img loading="lazy" src="{{ media.preview_url }}"
{% endif %}
alt="{% if media.description %}
{{ media.description }}
{% elif media.text_url %}
{{ media.text_url }}
{% else %}
{{ media.url }}
{% endif %}"
{% if media.description %}
title="{{ media.description }}"
{% endif %}
class="image is-max-256">
</a>
</figure>
{% else %}
<figure class="column">
<video controls loop class="is-max-256"
poster="{{ media.preview_url }}">
<source src="{{ media.url }}" type="video/mp4">
<a href="{{ media.url }}">
<noscript class="loading-lazy">
{% if toot.sensitive and not preferences.preview_sensitive %}
<img loading="lazy" src="{% static "images/sensitive.png" %}"
{% else %}
<img loading="lazy" src="{{ media.preview_url }}"
{% endif %}
alt="{% if media.description %}
{{ media.description }}
{% elif media.text_url %}
{{ media.text_url }}
{% else %}
{{ media.url }}
{% endif %}"
{% if media.description %}
title="{{ media.description }}"
{% endif %}
class="image is-max-256">
</noscript>
</a>
</video>
</figure>
<figure class="column">
<video controls loop class="is-max-256"
poster="{{ media.preview_url }}">
<source src="{{ media.url }}" type="video/mp4">
<a href="{{ media.url }}">
{% if toot.sensitive and not preferences.preview_sensitive %}
<img loading="lazy" src="{% static "images/sensitive.png" %}"
{% else %}
<img loading="lazy" src="{{ media.preview_url }}"
{% endif %}
alt="{% if media.description %}
{{ media.description }}
{% elif media.text_url %}
{{ media.text_url }}
{% else %}
{{ media.url }}
{% endif %}"
{% if media.description %}
title="{{ media.description }}"
{% endif %}
class="image is-max-256">
</a>
</video>
</figure>
{% endif %}
{% endfor %}
</div>
{% endif %}
<br>
<p class="is-hidden"></p>
{% endfor %}
</div>
{% endif %}
<br>
<p class="is-hidden"></p>
</div>
{% if not confirm_page %}
<nav class="level is-mobile">
<div class="level-left">
<a href="{% url "reply" toot.id %}#toot-{{ toot.id }}" class="level-item">
{% if toot.replies_count > 0 %}
</div>
{% if not confirm_page %}
<nav class="level is-mobile">
<div class="level-left">
<a href="{% url "reply" toot.id %}#toot-{{ toot.id }}" class="level-item">
{% if toot.replies_count > 0 %}
<span class="fa fa-reply-all">
<span class="is-hidden-mobile"><strong>Reply</strong></span>
</span>
{% else %}
{% else %}
<span class="fa fa-reply">
<span class="is-hidden-mobile">Reply</span>
</span>
{% endif %}
</a>
{% if toot.visibility != 'private' and toot.visibility != 'direct' %}
{% endif %}
</a>
{% if toot.visibility != 'private' and toot.visibility != 'direct' %}
<a href="{% url "boost" toot.id %}" class="level-item"
ic-post-to="{% url "boost" toot.id %}"
ic-indicator="#toot-spinner-{{toot.id}}">
{% if toot.reblogged %}
<span class="fa fa-retweet has-text-warning">
<strong class="is-hidden-mobile" >Boosted</strong>
{% else %}
<span class="fa fa-retweet" >
<span class="is-hidden-mobile" >Boost</span>
{% endif %}
</span>
</span>
</a>
{% endif %}
<a href="{% url "fav" toot.id %}" class="level-item"
ic-post-to="{% url "fav" toot.id %}"
ic-indicator="#toot-spinner-{{toot.id}}">
{% 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 class="fa fa-retweet has-text-warning">
<strong class="is-hidden-mobile" >Boosted</strong>
{% else %}
<span class="fa fa-retweet" >
<span class="is-hidden-mobile" >Boost</span>
{% endif %}
</span>
</span>
</a>
<i id="toot-spinner-{{toot.id}}" class="fa fa-spinner fa-spin" style="display:none"></i>
</div>
<div class="level-right">
{% if toot.account.acct == own_acct.acct %}
</a>
{% endif %}
<a href="{% url "fav" toot.id %}" class="level-item"
ic-post-to="{% url "fav" toot.id %}"
ic-indicator="#toot-spinner-{{toot.id}}">
{% 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>
<i id="toot-spinner-{{toot.id}}" class="fa fa-spinner fa-spin" style="display:none"></i>
</div>
<div class="level-right">
{% if toot.account.acct == own_acct.acct %}
<a class="level-item" href="{% url "redraft" toot.id %}">
redraft
</a>
@ -213,28 +207,28 @@
ic-action-target="#toot-{{ toot.id }}">
delete
</a>
{% endif %}
{% if toot.local_only %}
{{ toot.visibility }} (local-only)
{% else %}
{{ toot.visibility }}
{% endif %}
&nbsp;&nbsp;
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
{% endif %}
{% if toot.local_only %}
{{ toot.visibility }} (local-only)
{% else %}
{{ toot.visibility }}
{% endif %}
&nbsp;&nbsp;
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
<span class="fa fa-comments"></span>
<strong> thread</strong>
</a>
{% else %}
{% else %}
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
thread
</a>
{% endif %}
</div>
</nav>
{% endif %}
{% endif %}
</div>
</nav>
{% endif %}
</div>
<div class="media-right"></div>
</article>
{% endif %}
</div>
<div class="media-right"></div>
</article>
{% endif %}