topics in breadcrumb

This commit is contained in:
rimu 2024-01-10 19:06:35 +13:00
parent 7f0e68acf5
commit daf124ae49
3 changed files with 16 additions and 0 deletions

View file

@ -10,6 +10,9 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="/communities">{{ _('Communities') }}</a></li>
{% if community.topic_id %}
<li class="breadcrumb-item"><a href="/communities?topic_id={{ community.topic.id }}" rel="nofollow">{{ community.topic.name }}</a></li>
{% endif %}
<li class="breadcrumb-item active">{{ community.title|shorten }}</li>
</ol>
</nav>
@ -26,6 +29,9 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="/communities">{{ _('Communities') }}</a></li>
{% if community.topic_id %}
<li class="breadcrumb-item"><a href="/communities?topic_id={{ community.topic.id }}" rel="nofollow">{{ community.topic.name }}</a></li>
{% endif %}
<li class="breadcrumb-item active">{{ community.title|shorten }}</li>
</ol>
</nav>
@ -45,6 +51,9 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="/communities">{{ _('Communities') }}</a></li>
{% if community.topic_id %}
<li class="breadcrumb-item"><a href="/communities?topic_id={{ community.topic.id }}" rel="nofollow">{{ community.topic.name }}</a></li>
{% endif %}
<li class="breadcrumb-item active">{{ community.title|shorten }}</li>
</ol>
</nav>

View file

@ -5,6 +5,9 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="/communities">{{ _('Communities') }}</a></li>
{% if post.community.topic_id %}
<li class="breadcrumb-item"><a href="/communities?topic_id={{ post.community.topic.id }}" rel="nofollow">{{ post.community.topic.name }}</a></li>
{% endif %}
<li class="breadcrumb-item"><a href="/c/{{ post.community.link() }}">{{ post.community.title }}</a></li>
<li class="breadcrumb-item active">{{ post.title|shorten(15) }}</li>
</ol>
@ -50,6 +53,9 @@
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/">{{ _('Home') }}</a></li>
<li class="breadcrumb-item"><a href="/communities">{{ _('Communities') }}</a></li>
{% if post.community.topic_id %}
<li class="breadcrumb-item"><a href="/communities?topic_id={{ post.community.topic.id }}" rel="nofollow">{{ post.community.topic.name }}</a></li>
{% endif %}
<li class="breadcrumb-item"><a href="/c/{{ post.community.link() }}">{{ post.community.title }}</a></li>
<li class="breadcrumb-item active">{{ post.title|shorten(15) }}</li>
</ol>

View file

@ -454,6 +454,7 @@ def reply_is_just_link_to_gif_reaction(body) -> bool:
tmp_body = body.strip()
if tmp_body.startswith('https://media.tenor.com/') or \
tmp_body.startswith('https://i.giphy.com/') or \
tmp_body.startswith('https://i.imgflip.com') or \
tmp_body.startswith('https://media1.giphy.com/') or \
tmp_body.startswith('https://media2.giphy.com/') or \
tmp_body.startswith('https://media3.giphy.com/') or \