Browse Source

Replace spaces in topic tag CSS classes

merge-requests/25/head
Deimos 6 years ago
parent
commit
df2177db70
  1. 2
      tildes/tildes/templates/includes/topic_tags.jinja2
  2. 2
      tildes/tildes/templates/macros/topics.jinja2

2
tildes/tildes/templates/includes/topic_tags.jinja2

@ -1,6 +1,6 @@
<ul class="topic-tags"> <ul class="topic-tags">
{% for tag in topic.tags %} {% for tag in topic.tags %}
<li class="label label-topic-tag label-topic-tag-{{ tag }}">
<li class="label label-topic-tag label-topic-tag-{{ tag.replace(' ', '_') }}">
<a href="/~{{ topic.group.path }}?tag={{ tag.replace(' ', '_') }}">{{ tag }}</a> <a href="/~{{ topic.group.path }}?tag={{ tag.replace(' ', '_') }}">{{ tag }}</a>
</li> </li>
{% else %} {% else %}

2
tildes/tildes/templates/macros/topics.jinja2

@ -34,7 +34,7 @@
{% if topic.tags %} {% if topic.tags %}
<ul class="topic-tags"> <ul class="topic-tags">
{% for tag in topic.tags %} {% for tag in topic.tags %}
<li class="label label-topic-tag label-topic-tag-{{ tag }}">
<li class="label label-topic-tag label-topic-tag-{{ tag.replace(' ', '_') }}">
{% if request.matched_route.name in ('home', 'group') %} {% if request.matched_route.name in ('home', 'group') %}
<a href="{{ request.current_listing_normal_url({'tag': tag.replace(' ', '_')}) }}">{{ tag }}</a> <a href="{{ request.current_listing_normal_url({'tag': tag.replace(' ', '_')}) }}">{{ tag }}</a>
{% else %} {% else %}

Loading…
Cancel
Save