make names visible

This commit is contained in:
koksnuss 2020-05-22 01:20:10 +02:00
parent 6da84dd3bd
commit 32d417e213
2 changed files with 19 additions and 8 deletions

View File

@ -1,7 +1,9 @@
<td class="coin {{ td_class }}" value="{{ value }}"><div class="coin"><span>{{ marker }}</span><div class="{{ div_class }}" type="overlay"></div></div> <td class="coin {{ td_class }}" value="{{ value }}" title="{{ name }}">
<div class="coin">
<span>{{ marker }}</span>
<div class="{{ div_class }}" type="overlay"></div>
</div>
{% if name %} {% if name %}
{% if value == 201 %}<div class="special_name special1_name {{ special_class }}">{{ name }}</div>{% endif %} <div class="special_name {{ special_name }} {{ special_class }}">{{ name }}</div>
{% if value == 202 %}<div class="special_name special2_name {{ special_class }}">{{ name }}</div>{% endif %}
{% if value == 203 %}<div class="special_name special3_name {{ special_class }}">{{ name }}</div>{% endif %}
{% endif %} {% endif %}
</td> </td>

View File

@ -183,7 +183,15 @@ def show_coin(country, year, stamp, value):
name = coin.name if coin.name else '' name = coin.name if coin.name else ''
special_class = '' special_class = ''
special_name = ''
if name: if name:
if value == 201:
special_name = 'special1_name'
elif value == 202:
special_name = 'special2_name'
elif value == 203:
special_name = 'special3_name'
if len(name) >= 18 and len(name) <= 42: if len(name) >= 18 and len(name) <= 42:
special_class = 'two_lines' special_class = 'two_lines'
elif len(name) > 42: elif len(name) > 42:
@ -195,7 +203,8 @@ def show_coin(country, year, stamp, value):
'name': name, 'name': name,
'td_class': td_class, 'td_class': td_class,
'div_class': div_class, 'div_class': div_class,
'special_class': special_class 'special_class': special_class,
'special_name': special_name
} }