2
0
mirror of https://github.com/jfmcbrayer/brutaldon synced 2024-12-22 05:23:03 +01:00
brutaldon-interfaccia-web-m.../brutaldon/templates/main/timeline.html

73 lines
2.6 KiB
HTML

{% extends "base.html" %}
{% load humanize %}
{% load static %}
{% load cache %}
{% block title %}
Brutaldon ({{ own_acct.username }}) - {{ timeline_name }} timelime
{% endblock %}
{% block page_scripts %}
{% if not fullbrutalism %}
<script src="{% static 'js/mousetrap.min.js' %}" type="application/javascript"></script>
{% endif %}
{% endblock %}
{% block content %}
{% if form %}
<h1 class="title">Post</h1>
<div class="box">
{% include "main/post_minimal_partial.html" %}
</div>
<hr class="is-hidden">
{% endif %}
<h1 class="title">Your {{ timeline_name }} timeline</h1>
<div id="timeline">
{% for toot in toots %}
{% cache 600 toot_partial toot.id %}
{% if toot.reblog %}
{% include "main/toot_partial.html" with toot=toot.reblog reblog=True reblog_by=toot.account.acct reblog_icon=toot.account.avatar_static %}
{% else %}
{% include "main/toot_partial.html" with toot=toot reblog=False %}
{% endif %}
{% endcache %}
<hr class="is-hidden">
{% endfor %}
{% block pagination %}
<div class="around-pagination">
<div class="columns">
{% if next %}
<p class="column is-one-quarter"></p>
<p class="column">
<a class="pagination-previous is-fullwidth button"
href="{% url 'home_next' next.max_id %}"
{% if preferences.click_to_load %}
ic-get-from="{% url 'home_next' next.max_id %}"
ic-select-from-response="#timeline"
ic-indicator="#page-load-indicator"
ic-target="closest div.around-pagination"
ic-push-url="true"
{% endif %}
>
Older
</a>
</p>
<p class="column is-one-quarter"></p>
{% endif %}
</div>
</div>
{% endblock %}
</div>
{% endblock %}
{% block page_scripts_inline %}
<script type="application/javascript">
document.addEventListener('DOMContentLoaded', function () {
Mousetrap.bind('ctrl+enter', function(e) {
Intercooler.triggerRequest("#post-form");
});
});
</script>
{% endblock %}