mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-23 07:13:52 -05:00
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:
parent
b8ea84ade4
commit
cc63a6f0d8
@ -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");
|
|
@ -8,65 +8,64 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>
|
<title>
|
||||||
{% block 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 %}
|
{% if own_acct %}
|
||||||
<link rel="icon" href="{{ own_acct.avatar_static }}">
|
brutaldon ('{{ own_acct.username }}')
|
||||||
{% else %}
|
{% else %}
|
||||||
<link rel="icon" href="{% static "images/brutaldon.png" %}" type="image/png">
|
brutaldon
|
||||||
{% endif %}
|
{% 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 name="twitter:card" content="summary">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta name="twitter:site" content="@jfmcbrayer">
|
<meta name="twitter:site" content="@jfmcbrayer">
|
||||||
<meta name="twitter:url" property="og:url" content="{% url "about" %}">
|
<meta name="twitter:url" property="og:url" content="{% url "about" %}">
|
||||||
<meta name="twitter:title" property="og:title" content="Brutaldon">
|
<meta name="twitter:title" property="og:title" content="Brutaldon">
|
||||||
<meta name="twitter:image" property="og:image"
|
<meta name="twitter:image" property="og:image"
|
||||||
content="{% static "images/brutaldon.png" %}">
|
content="{% static "images/brutaldon.png" %}">
|
||||||
<meta name="twitter:description" property="og:description"
|
<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.">
|
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="page-load-indicator"></div>
|
||||||
<div id="new-toot-modal" class="modal"></div>
|
<div id="new-toot-modal" class="modal"></div>
|
||||||
{% block navbar %}
|
{% block navbar %}
|
||||||
<nav class="navbar is-primary" role="navigation"
|
<nav class="navbar is-primary" role="navigation"
|
||||||
aria-label="main navigation" id="main-nav-bar">
|
aria-label="main navigation" id="main-nav-bar">
|
||||||
<div class="navbar-brand">
|
<div class="navbar-brand">
|
||||||
<a class="navbar-item" href="{% url "home" %}">
|
<a class="navbar-item" href="{% url "home" %}">
|
||||||
{% if own_acct %}
|
{% if own_acct %}
|
||||||
<img src="{{ own_acct.avatar_static }}"
|
<img src="{{ own_acct.avatar_static }}"
|
||||||
class="image is-32x32 avatar"
|
class="image is-32x32 avatar"
|
||||||
alt="Brutaldon ('{{ own_acct.username }}')">
|
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 %}
|
{% else %}
|
||||||
<img loading="lazy" src="{% static "images/brutaldon.png" %}"
|
<span >Notifications</span>
|
||||||
class="image is-32x32" alt="Brutaldon">
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</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>
|
||||||
{% if request.session.active_instance and request.session.active_username %}
|
<div class="navbar-end" >
|
||||||
<div class="navbar-menu is-active" id="navMenu">
|
<a class="navbar-item" href="{% url "settings" %}">
|
||||||
<!-- navbar start, navbar end -->
|
<span class="fa fa-gear"></span>
|
||||||
<div class="navbar-start">
|
<span >Settings</span>
|
||||||
<a href="{% url "home" %}" class="navbar-item">
|
</a>
|
||||||
<span class="fa fa-home"></span>
|
<a class="navbar-item" href="{% url "accounts" %}">
|
||||||
<span>Home</span>
|
<span class="fa fa-id-card-o"> </span>
|
||||||
</a>
|
<span >Accounts</span>
|
||||||
<a class="navbar-item" href="{% url "note" %}">
|
</a>
|
||||||
<span class="fa fa-bell"></span>
|
</div>
|
||||||
{% if preferences.notifications and not preferences.theme.is_brutalist %}
|
</div>
|
||||||
<span ic-src="{% url 'notes_count' %}"
|
{% endif %}
|
||||||
ic-poll="{{ preferences.poll_frequency }}s"
|
</nav>
|
||||||
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>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<main id="main" class="section">
|
<main id="main" class="section">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
Title
|
Title
|
||||||
</h1>
|
</h1>
|
||||||
<p class="subtitle">
|
<p class="subtitle">
|
||||||
Brutaldon is totally a thing.
|
Brutaldon is totally a thing.
|
||||||
</p>
|
</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@ -187,12 +186,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="level-right">
|
<div class="level-right">
|
||||||
{% if preferences.theme.is_brutalist %}
|
{% if preferences.theme.is_brutalist %}
|
||||||
<noscript class="loading-lazy">
|
<img loading="lazy" class="level-item" src="{% static '/images/lynx.gif' %}"
|
||||||
<img loading="lazy" class="level-item" src="{% static '/images/lynx.gif' %}"
|
alt="Lynx Now!">
|
||||||
alt="Lynx Now!">
|
<img loading="lazy" class="level-item" src="{% static '/images/now9.gif' %}"
|
||||||
<img loading="lazy" class="level-item" src="{% static '/images/now9.gif' %}"
|
alt="Netscape Now!">
|
||||||
alt="Netscape Now!">
|
|
||||||
</noscript>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a class="level-item is-size-7" href="{% url "privacy" %}">
|
<a class="level-item is-size-7" href="{% url "privacy" %}">
|
||||||
Privacy
|
Privacy
|
||||||
@ -203,28 +200,28 @@
|
|||||||
|
|
||||||
{% if not preferences.no_javascript %}
|
{% if not preferences.no_javascript %}
|
||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
menuPrepare();
|
menuPrepare();
|
||||||
});
|
});
|
||||||
|
|
||||||
{% if preferences.lightbox %}
|
{% if preferences.lightbox %}
|
||||||
Intercooler.ready(function ()
|
Intercooler.ready(function ()
|
||||||
{
|
{
|
||||||
$('.attachments').each(function() {
|
$('.attachments').each(function() {
|
||||||
$(this).magnificPopup({
|
$(this).magnificPopup({
|
||||||
delegate: 'figure.attachment-image a',
|
delegate: 'figure.attachment-image a',
|
||||||
type: 'image',
|
type: 'image',
|
||||||
preload: [1, 1],
|
preload: [1, 1],
|
||||||
gallery: {enabled: true },
|
gallery: {enabled: true },
|
||||||
zoom: { enabled: true }
|
zoom: { enabled: true }
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
{% endif %}
|
});
|
||||||
</script>
|
{% endif %}
|
||||||
{% block page_scripts_inline %}
|
</script>
|
||||||
{% endblock %}
|
{% block page_scripts_inline %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
|
@ -6,202 +6,196 @@
|
|||||||
|
|
||||||
{% if toot %}
|
{% if toot %}
|
||||||
{% if active %}
|
{% if active %}
|
||||||
<article id="toot-{{toot.id}}" class="media box active-context">
|
<article id="toot-{{toot.id}}" class="media box active-context">
|
||||||
{% else %}
|
{% else %}
|
||||||
<article id="toot-{{toot.id}}" class="media box">
|
<article id="toot-{{toot.id}}" 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 loading="auto" src="{{ toot.account.avatar_static }}"
|
<img loading="auto" src="{{ toot.account.avatar_static }}"
|
||||||
alt="">
|
alt="">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</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>
|
|
||||||
{% if reblog %}
|
{% if reblog %}
|
||||||
<br>
|
<p class="image is-32x32 reblog-icon" >
|
||||||
Boosted by @{{ reblog_by }}
|
<a href="{% url "user" reblog_by %}">
|
||||||
|
<img loading="auto" src ="{{ reblog_icon }}" alt="">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
{% 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 | 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">
|
<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.poll %}
|
{% if toot.poll %}
|
||||||
<div class="poll">
|
<div class="poll">
|
||||||
{% if toot.poll.voted or toot.poll.expired %}
|
{% if toot.poll.voted or toot.poll.expired %}
|
||||||
{% include "polls/completed_partial.html" with toot=toot %}
|
{% include "polls/completed_partial.html" with toot=toot %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<!-- Poll form -->
|
<!-- Poll form -->
|
||||||
{% include "polls/new_partial.html" with toot=toot %}
|
{% include "polls/new_partial.html" with toot=toot %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% if toot.card %}
|
{% if toot.card %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content columns">
|
<div class="card-content columns">
|
||||||
{% if toot.card.image %}
|
{% if toot.card.image %}
|
||||||
<div class="column is-one-third">
|
<div class="column is-one-third">
|
||||||
<a href="{{ toot.card.url }}">
|
<a href="{{ toot.card.url }}">
|
||||||
<noscript class="loading-lazy">
|
|
||||||
<img loading="lazy" alt="{{ toot.card.title }}"
|
<img loading="lazy" alt="{{ toot.card.title }}"
|
||||||
src="{{ toot.card.image }}"
|
src="{{ toot.card.image }}"
|
||||||
class="is-max-128">
|
class="is-max-128">
|
||||||
</noscript>
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="column is-two-thirds">
|
<div class="column is-two-thirds">
|
||||||
<p>
|
<p>
|
||||||
<strong>
|
<strong>
|
||||||
<a href="{{ toot.card.url }}">
|
<a href="{{ toot.card.url }}">
|
||||||
{{ toot.card.title }}
|
{{ toot.card.title }}
|
||||||
</a>
|
</a>
|
||||||
</strong>
|
</strong>
|
||||||
|
|
||||||
<p>{{ toot.card.description |truncatechars_html:500}}</p>
|
<p>{{ toot.card.description |truncatechars_html:500}}</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if toot.media_attachments %}
|
{% if toot.media_attachments %}
|
||||||
<br>
|
<br>
|
||||||
<div class="columns is-multiline attachments is-gapless">
|
<div class="columns is-multiline attachments is-gapless">
|
||||||
{% for media in toot.media_attachments %}
|
{% for media in toot.media_attachments %}
|
||||||
{% if media.type == "image" %}
|
{% if media.type == "image" %}
|
||||||
<figure class="column attachment-image">
|
<figure class="column attachment-image">
|
||||||
<a href="{{ media.url }}">
|
<a href="{{ media.url }}">
|
||||||
<noscript class="loading-lazy">
|
{% if toot.sensitive and not preferences.preview_sensitive %}
|
||||||
{% if toot.sensitive and not preferences.preview_sensitive %}
|
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
||||||
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
{% else %}
|
||||||
{% else %}
|
<img loading="lazy" src="{{ media.preview_url }}"
|
||||||
<img loading="lazy" 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-256">
|
||||||
class="image is-max-256">
|
</a>
|
||||||
</noscript>
|
</figure>
|
||||||
</a>
|
|
||||||
</figure>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<figure class="column">
|
<figure class="column">
|
||||||
<video controls loop class="is-max-256"
|
<video controls loop class="is-max-256"
|
||||||
poster="{{ media.preview_url }}">
|
poster="{{ media.preview_url }}">
|
||||||
<source src="{{ media.url }}" type="video/mp4">
|
<source src="{{ media.url }}" type="video/mp4">
|
||||||
<a href="{{ media.url }}">
|
<a href="{{ media.url }}">
|
||||||
<noscript class="loading-lazy">
|
{% if toot.sensitive and not preferences.preview_sensitive %}
|
||||||
{% if toot.sensitive and not preferences.preview_sensitive %}
|
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
||||||
<img loading="lazy" src="{% static "images/sensitive.png" %}"
|
{% else %}
|
||||||
{% else %}
|
<img loading="lazy" src="{{ media.preview_url }}"
|
||||||
<img loading="lazy" 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-256">
|
||||||
class="image is-max-256">
|
</a>
|
||||||
</noscript>
|
</video>
|
||||||
</a>
|
</figure>
|
||||||
</video>
|
|
||||||
</figure>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br>
|
<br>
|
||||||
<p class="is-hidden"></p>
|
<p class="is-hidden"></p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% 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 %}#toot-{{ toot.id }}" class="level-item">
|
<a href="{% url "reply" toot.id %}#toot-{{ toot.id }}" class="level-item">
|
||||||
{% if toot.replies_count > 0 %}
|
{% if toot.replies_count > 0 %}
|
||||||
<span class="fa fa-reply-all">
|
<span class="fa fa-reply-all">
|
||||||
<span class="is-hidden-mobile"><strong>Reply</strong></span>
|
<span class="is-hidden-mobile"><strong>Reply</strong></span>
|
||||||
</span>
|
</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="fa fa-reply">
|
<span class="fa fa-reply">
|
||||||
<span class="is-hidden-mobile">Reply</span>
|
<span class="is-hidden-mobile">Reply</span>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% if toot.visibility != 'private' and toot.visibility != 'direct' %}
|
{% if toot.visibility != 'private' and toot.visibility != 'direct' %}
|
||||||
<a href="{% url "boost" toot.id %}" class="level-item"
|
<a href="{% url "boost" toot.id %}" class="level-item"
|
||||||
ic-post-to="{% url "boost" toot.id %}"
|
ic-post-to="{% url "boost" toot.id %}"
|
||||||
ic-indicator="#toot-spinner-{{toot.id}}">
|
ic-indicator="#toot-spinner-{{toot.id}}">
|
||||||
{% if toot.reblogged %}
|
{% if toot.reblogged %}
|
||||||
<span class="fa fa-retweet has-text-warning">
|
<span class="fa fa-retweet has-text-warning">
|
||||||
<strong class="is-hidden-mobile" >Boosted</strong>
|
<strong class="is-hidden-mobile" >Boosted</strong>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="fa fa-retweet" >
|
<span class="fa fa-retweet" >
|
||||||
<span class="is-hidden-mobile" >Boost</span>
|
<span class="is-hidden-mobile" >Boost</span>
|
||||||
{% endif %}
|
{% 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>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<i id="toot-spinner-{{toot.id}}" class="fa fa-spinner fa-spin" style="display:none"></i>
|
{% endif %}
|
||||||
</div>
|
<a href="{% url "fav" toot.id %}" class="level-item"
|
||||||
<div class="level-right">
|
ic-post-to="{% url "fav" toot.id %}"
|
||||||
{% if toot.account.acct == own_acct.acct %}
|
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 %}">
|
<a class="level-item" href="{% url "redraft" toot.id %}">
|
||||||
redraft
|
redraft
|
||||||
</a>
|
</a>
|
||||||
@ -213,28 +207,28 @@
|
|||||||
ic-action-target="#toot-{{ toot.id }}">
|
ic-action-target="#toot-{{ toot.id }}">
|
||||||
delete
|
delete
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if toot.local_only %}
|
{% if toot.local_only %}
|
||||||
{{ toot.visibility }} (local-only)
|
{{ toot.visibility }} (local-only)
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ toot.visibility }}
|
{{ toot.visibility }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
|
{% if toot.in_reply_to_id or toot.replies_count > 0 %}
|
||||||
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
||||||
<span class="fa fa-comments"></span>
|
<span class="fa fa-comments"></span>
|
||||||
<strong> thread</strong>
|
<strong> thread</strong>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
<a class="level-item" href="{% url "thread" toot.id %}#toot-{{ toot.id }}">
|
||||||
thread
|
thread
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="media-right"></div>
|
<div class="media-right"></div>
|
||||||
</article>
|
</article>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user