Indicate which hashtags have maps

merge-requests/30/head
Bob Mottram 2022-08-23 17:04:25 +01:00
parent be4638706c
commit 790b935e18
1 changed files with 5 additions and 1 deletions

View File

@ -181,9 +181,13 @@ def html_hash_tag_swarm(base_dir: str, actor: str, translate: {}) -> str:
# swarm of tags
tag_swarm_str = ''
for tag_name in tag_swarm:
tag_display_name = tag_name
tag_map_filename = os.path.join(base_dir + '/tagmaps', tag_name)
if os.path.isfile(tag_map_filename):
tag_display_name = '🌍' + tag_name
tag_swarm_str += \
'<a href="' + actor + '/tags/' + tag_name + \
'" class="hashtagswarm">' + tag_name + '</a>\n'
'" class="hashtagswarm">' + tag_display_name + '</a>\n'
if category_swarm_str:
tag_swarm_str = \