mirror of https://gitlab.com/bashrc2/epicyon
Copyright symbols
parent
1ea83254c5
commit
3b145a7ac4
|
@ -1582,15 +1582,8 @@ def _get_footer_with_icons(show_icons: bool,
|
||||||
if not is_news_post(post_json_object):
|
if not is_news_post(post_json_object):
|
||||||
footer_str += ' '
|
footer_str += ' '
|
||||||
if content_license_url:
|
if content_license_url:
|
||||||
# show the CC symbol
|
footer_str += _get_copyright_footer(content_license_url,
|
||||||
copyright_symbol = '🅭 '
|
time_class)
|
||||||
if '/zero/' in content_license_url:
|
|
||||||
copyright_symbol = '🄍 '
|
|
||||||
footer_str += '<a href="' + \
|
|
||||||
content_license_url + '" class="' + \
|
|
||||||
time_class + '" tabindex="10">' + \
|
|
||||||
'<span itemprop="license">' + \
|
|
||||||
copyright_symbol + '</span></a> '
|
|
||||||
# show the date
|
# show the date
|
||||||
date_link = '/users/' + nickname + '?convthread=' + \
|
date_link = '/users/' + nickname + '?convthread=' + \
|
||||||
published_link.replace('/', '--')
|
published_link.replace('/', '--')
|
||||||
|
@ -1731,6 +1724,27 @@ def _get_content_license(post_json_object: {}) -> str:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def _get_copyright_footer(content_license_url: str,
|
||||||
|
time_class: str) -> str:
|
||||||
|
"""Returns the footer copyright link
|
||||||
|
"""
|
||||||
|
# show the CC symbol
|
||||||
|
copyright_symbol = '🅭 '
|
||||||
|
if '/zero/' in content_license_url:
|
||||||
|
copyright_symbol = '🄍 '
|
||||||
|
elif 'unlicense' in content_license_url:
|
||||||
|
copyright_symbol = '🅮'
|
||||||
|
elif 'wtfpl' in content_license_url:
|
||||||
|
copyright_symbol = '🅮'
|
||||||
|
elif '/fdl' in content_license_url:
|
||||||
|
copyright_symbol = '🄎'
|
||||||
|
return '<a href="' + \
|
||||||
|
content_license_url + '" class="' + \
|
||||||
|
time_class + '" tabindex="10">' + \
|
||||||
|
'<span itemprop="license">' + \
|
||||||
|
copyright_symbol + '</span></a> '
|
||||||
|
|
||||||
|
|
||||||
def individual_post_as_html(signing_priv_key_pem: str,
|
def individual_post_as_html(signing_priv_key_pem: str,
|
||||||
allow_downloads: bool,
|
allow_downloads: bool,
|
||||||
recent_posts_cache: {}, max_recent_posts: int,
|
recent_posts_cache: {}, max_recent_posts: int,
|
||||||
|
@ -2266,15 +2280,8 @@ def individual_post_as_html(signing_priv_key_pem: str,
|
||||||
if not is_news_post(post_json_object):
|
if not is_news_post(post_json_object):
|
||||||
footer_str = ''
|
footer_str = ''
|
||||||
if content_license_url:
|
if content_license_url:
|
||||||
# show the CC symbol
|
footer_str += _get_copyright_footer(content_license_url,
|
||||||
copyright_symbol = '🅭 '
|
time_class)
|
||||||
if '/zero/' in content_license_url:
|
|
||||||
copyright_symbol = '🄍 '
|
|
||||||
footer_str += '<a href="' + \
|
|
||||||
content_license_url + '" class="' + \
|
|
||||||
time_class + '" tabindex="10">' + \
|
|
||||||
'<span itemprop="license">' + \
|
|
||||||
copyright_symbol + '</span></a> '
|
|
||||||
footer_str += '<a href="' + published_link + \
|
footer_str += '<a href="' + published_link + \
|
||||||
'" class="' + time_class + '" tabindex="10">' + \
|
'" class="' + time_class + '" tabindex="10">' + \
|
||||||
published_str + '</a>\n'
|
published_str + '</a>\n'
|
||||||
|
|
Loading…
Reference in New Issue