mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 11:51:27 -08:00
113 lines
4.7 KiB
HTML
113 lines
4.7 KiB
HTML
{% if theme() and file_exists('app/templates/themes/' + theme() + '/base.html') %}
|
|
{% extends 'themes/' + theme() + '/base.html' %}
|
|
{% else %}
|
|
{% extends "base.html" %}
|
|
{% endif %} %}
|
|
{% from 'bootstrap/form.html' import render_form %}
|
|
|
|
{% block app_content %}
|
|
<div class="row">
|
|
<div class="col-12 col-md-8 position-relative main_pane">
|
|
<nav aria-label="breadcrumb" id="breadcrumb_nav" title="Navigation">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
|
|
<li class="breadcrumb-item"><a href="/topics">{{ _('Topics') }}</a></li>
|
|
{% for breadcrumb in breadcrumbs %}
|
|
<li class="breadcrumb-item">{% if breadcrumb.url %}<a href="{{ breadcrumb.url }}">{% endif %}{{ breadcrumb.text }}{% if breadcrumb.url %}</a>{% endif %}</li>
|
|
{% endfor %}
|
|
</ol>
|
|
</nav>
|
|
<h1 class="mt-2">{{ topic.name }}
|
|
{% if current_user.is_authenticated %}
|
|
{% include 'topic/_notification_toggle.html' %}
|
|
{% endif %}
|
|
</h1>
|
|
{% if sub_topics %}
|
|
<h5 class="mb-0" id="sub-topics">{{ _('Sub-topics') }}</h5>
|
|
<ul id="subtopic_nav" class="nav" role="listbox" aria-labelledby="sub-topics">
|
|
{% for sub_topic in sub_topics %}
|
|
<li class="nav-item" role="option"><a class="nav-link" href="/topic/{{ topic_path }}/{{ sub_topic.machine_name }}">{{ sub_topic.name }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% include "community/_community_nav.html" %}
|
|
{% if post_layout == 'masonry' or post_layout == 'masonry_wide' %}
|
|
<div class="masonry" id="masonry">
|
|
<!-- Masonry columns will be added here -->
|
|
</div>
|
|
<script nonce="{{ session['nonce'] }}">
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
const masonry = document.getElementById('masonry');
|
|
const htmlSnippets = [
|
|
{% for post in posts.items %}
|
|
{% raw %}`{% endraw %}{% include 'post/_post_teaser_masonry.html' %}{% raw %}`{% endraw %},
|
|
{% endfor %}
|
|
];
|
|
renderMasonry(masonry, htmlSnippets);
|
|
});
|
|
</script>
|
|
{% else %}
|
|
<div class="post_list">
|
|
{% for post in posts.items %}
|
|
{% include 'post/_post_teaser.html' %}
|
|
{% else %}
|
|
<p>{{ _('No posts in this topic yet.') }}</p>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<nav aria-label="Pagination" class="mt-4" role="navigation">
|
|
{% if prev_url %}
|
|
<a href="{{ prev_url }}" class="btn btn-primary" rel='nofollow'>
|
|
<span aria-hidden="true">←</span> {{ _('Previous page') }}
|
|
</a>
|
|
{% endif %}
|
|
{% if next_url %}
|
|
<a href="{{ next_url }}" class="btn btn-primary" rel='nofollow'>
|
|
{{ _('Next page') }} <span aria-hidden="true">→</span>
|
|
</a>
|
|
{% endif %}
|
|
</nav>
|
|
</div>
|
|
|
|
<aside id="side_pane" class="col-12 col-md-4 side_pane" role="complementary">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<div class="row">
|
|
<div class="col-6">
|
|
<a class="w-100 btn btn-primary" href="{{ url_for('topic.topic_create_post', topic_name=topic.machine_name) }}" rel="nofollow">{{ _('Create post') }}</a>
|
|
</div>
|
|
<div class="col-6">
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if topic_communities %}
|
|
<div class="card mt-3">
|
|
<div class="card-header">
|
|
<h2>{{ _('Topic communities') }}</h2>
|
|
</div>
|
|
<div class="card-body">
|
|
<ul class="list-group list-group-flush">
|
|
{% for community in topic_communities %}
|
|
<li class="list-group-item">
|
|
{{ render_communityname(community) }}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<p class="mt-4"><a class="btn btn-primary" href="/communities">{{ _('More communities') }}</a></p>
|
|
<p>
|
|
<a class="no-underline" href="{{ rss_feed }}" rel="nofollow"><span class="fe fe-rss"></span> </a><a href="{{ rss_feed }}" rel="nofollow">RSS feed</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% include "_inoculation_links.html" %}
|
|
</aside>
|
|
</div>
|
|
<div class="row">
|
|
|
|
|
|
</div>
|
|
{% endblock %}
|