forked from indymedia/epicyon
All tags under button
parent
fcabcabb8f
commit
8960aaccdf
|
@ -10,6 +10,7 @@ import os
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from utils import getHashtagCategories
|
from utils import getHashtagCategories
|
||||||
from utils import getHashtagCategory
|
from utils import getHashtagCategory
|
||||||
|
from webapp_utils import getContentWarningButton
|
||||||
|
|
||||||
|
|
||||||
def getHashtagCategoriesFeed(baseDir: str,
|
def getHashtagCategoriesFeed(baseDir: str,
|
||||||
|
@ -197,12 +198,13 @@ def htmlHashTagSwarm(baseDir: str, actor: str, translate: {}) -> str:
|
||||||
# swarm of categories
|
# swarm of categories
|
||||||
categorySwarmStr = ''
|
categorySwarmStr = ''
|
||||||
if categorySwarm:
|
if categorySwarm:
|
||||||
categorySwarm.sort()
|
if len(categorySwarm) > 3:
|
||||||
for categoryStr in categorySwarm:
|
categorySwarm.sort()
|
||||||
categorySwarmStr += \
|
for categoryStr in categorySwarm:
|
||||||
'<a href="' + actor + '/category/' + categoryStr + \
|
categorySwarmStr += \
|
||||||
'" class="hashtagswarm"><b>' + categoryStr + '</b></a>\n'
|
'<a href="' + actor + '/category/' + categoryStr + \
|
||||||
categorySwarmStr += '<br><br>\n'
|
'" class="hashtagswarm"><b>' + categoryStr + '</b></a>\n'
|
||||||
|
categorySwarmStr += '<br><br>\n'
|
||||||
|
|
||||||
# swarm of tags
|
# swarm of tags
|
||||||
tagSwarmStr = ''
|
tagSwarmStr = ''
|
||||||
|
@ -211,6 +213,10 @@ def htmlHashTagSwarm(baseDir: str, actor: str, translate: {}) -> str:
|
||||||
'<a href="' + actor + '/tags/' + tagName + \
|
'<a href="' + actor + '/tags/' + tagName + \
|
||||||
'" class="hashtagswarm">' + tagName + '</a>\n'
|
'" class="hashtagswarm">' + tagName + '</a>\n'
|
||||||
|
|
||||||
|
if categorySwarmStr:
|
||||||
|
tagSwarmStr = \
|
||||||
|
getContentWarningButton('alltags', translate, tagSwarmStr)
|
||||||
|
|
||||||
tagSwarmHtml = categorySwarmStr + tagSwarmStr.strip() + '\n'
|
tagSwarmHtml = categorySwarmStr + tagSwarmStr.strip() + '\n'
|
||||||
tagSwarmHtml += getHashtagDomainHistogram(domainHistogram, translate)
|
tagSwarmHtml += getHashtagDomainHistogram(domainHistogram, translate)
|
||||||
return tagSwarmHtml
|
return tagSwarmHtml
|
||||||
|
|
Loading…
Reference in New Issue