Add description title tooltips to tags

This commit is contained in:
rubenwardy 2020-07-18 02:54:40 +01:00
parent 68a132f271
commit dd7146205a
3 changed files with 7 additions and 1 deletions

View File

@ -64,6 +64,7 @@
{% set tag = pair[1] %}
<a class="btn btn-sm btn-secondary m-1" rel="nofollow"
title="{{ tag.description or '' }}"
href="{{ url_for('packages.list_all', tag=tag.name) }}">
{{ tag.title }}
<span class="badge badge-pill badge-light ml-1">{{ count }}</span>

View File

@ -28,12 +28,14 @@
{% if tag in selected_tags %}
<a class="btn btn-sm btn-primary m-1" rel="nofollow"
title="{{ tag.description or '' }}"
href="{{ url_set_query(page=1, _remove={ 'tag': tag.name }) }}">
{{ tag.title }}
<span class="badge badge-pill badge-light ml-1">{{ count }}</span>
</a>
{% else %}
<a class="btn btn-sm btn-secondary m-1" rel="nofollow"
title="{{ tag.description or '' }}"
href="{{ url_set_query(page=1, _add={ 'tag': tag.name }) }}">
{{ tag.title }}
<span class="badge badge-pill badge-light ml-1">{{ count }}</span>

View File

@ -56,7 +56,10 @@
{% endfor %}
{% for t in package.tags %}
<a class="badge badge-primary" rel="nofollow"
href="{{ url_for('packages.list_all', tag=t.name) }}">{{ t.title }}</a>
title="{{ t.description or '' }}"
href="{{ url_for('packages.list_all', tag=t.name) }}">
{{ t.title }}
</a>
{% endfor %}
</p>