diff --git a/epicyon-profile.css b/epicyon-profile.css index c8f82cc3a..b1233f330 100644 --- a/epicyon-profile.css +++ b/epicyon-profile.css @@ -1,6 +1,11 @@ @charset "UTF-8"; :root { + --hashtag-margin: 2%; + --hashtag-size1: 30px; + --hashtag-size2: 40px; + --hashtag-vertical-spacing1: 50px; + --hashtag-vertical-spacing3: 100px; --likes-names-margin: 2%; --likes-names-size1: 30px; --likes-names-size2: 40px; @@ -1104,6 +1109,20 @@ h3 { font-size: var(--font-size); color: var(--title-color); } + .hashtagswarm { + font-size: var(--hashtag-size1); + font-family: Arial, Helvetica, sans-serif; + margin: var(--hashtag-margin); + line-height: var(--hashtag-vertical-spacing1); + -webkit-user-select: all; + -ms-user-select: all; + user-select: all; + white-space: nowrap; + } + .hashtagswarm img { + width: 5%; + min-width: 5%; + } .likerNames { font-size: var(--liker-names-size1); font-family: Arial, Helvetica, sans-serif; @@ -1877,6 +1896,20 @@ h3 { blockquote { font-size: var(--quote-font-size-mobile); } + .hashtagswarm { + font-size: var(--hashtag-size2); + font-family: Arial, Helvetica, sans-serif; + margin: var(--hashtag-margin); + line-height: var(--hashtag-vertical-spacing3); + -webkit-user-select: all; + -ms-user-select: all; + user-select: all; + white-space: nowrap; + } + .hashtagswarm img { + width: 10%; + min-width: 10%; + } .likerNames { font-size: var(--liker-names-size2); font-family: Arial, Helvetica, sans-serif; @@ -2622,6 +2655,20 @@ h3 { blockquote { font-size: var(--quote-font-size-tiny); } + .hashtagswarm { + font-size: var(--font-size2); + font-family: Arial, Helvetica, sans-serif; + margin: var(--hashtag-margin); + line-height: var(--hashtag-vertical-spacing3); + -webkit-user-select: all; + -ms-user-select: all; + user-select: all; + white-space: nowrap; + } + .hashtagswarm img { + width: 10%; + min-width: 10%; + } .likerNames { font-size: var(--font-size2); font-family: 'Arial, Helvetica, sans-serif'; diff --git a/translations/ar.json b/translations/ar.json index 82cfd684e..b1e77a64b 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -544,5 +544,7 @@ "lang_oc": "الأوكسيتانية", "lang_pt": "البرتغالية", "lang_sw": "السواحيلية", - "lang_zh": "صينى" + "lang_zh": "صينى", + "Common emoji": "الرموز التعبيرية الشائعة", + "Copy and paste into your text": "نسخ ولصق في النص الخاص بك" } diff --git a/translations/ca.json b/translations/ca.json index 56a0d088e..1c250ca7e 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -544,5 +544,7 @@ "lang_oc": "Occità", "lang_pt": "Portuguès", "lang_sw": "Suahili", - "lang_zh": "Xinès" + "lang_zh": "Xinès", + "Common emoji": "Emoji comú", + "Copy and paste into your text": "Copia i enganxa al teu text" } diff --git a/translations/cy.json b/translations/cy.json index 46678d36e..4df858f12 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -544,5 +544,7 @@ "lang_oc": "Ocsitaneg", "lang_pt": "Portiwgaleg", "lang_sw": "Swahili", - "lang_zh": "Tseiniaidd" + "lang_zh": "Tseiniaidd", + "Common emoji": "Emoji cyffredin", + "Copy and paste into your text": "Copïwch a gludwch i'ch testun" } diff --git a/translations/de.json b/translations/de.json index 95e049766..ebe210e6b 100644 --- a/translations/de.json +++ b/translations/de.json @@ -544,5 +544,7 @@ "lang_oc": "Okzitanisch", "lang_pt": "Portugiesisch", "lang_sw": "Suaheli", - "lang_zh": "Chinesisch" + "lang_zh": "Chinesisch", + "Common emoji": "Gewöhnliches Emoji", + "Copy and paste into your text": "Kopieren und in Ihren Text einfügen" } diff --git a/translations/en.json b/translations/en.json index 6b0837189..059f1ea90 100644 --- a/translations/en.json +++ b/translations/en.json @@ -544,5 +544,7 @@ "lang_oc": "Occitan", "lang_pt": "Portuguese", "lang_sw": "Swahili", - "lang_zh": "Chinese" + "lang_zh": "Chinese", + "Common emoji": "Common emoji", + "Copy and paste into your text": "Copy and paste into your text" } diff --git a/translations/es.json b/translations/es.json index 17b8fa63e..8f8ded93e 100644 --- a/translations/es.json +++ b/translations/es.json @@ -544,5 +544,7 @@ "lang_oc": "Occitano", "lang_pt": "Portuguesa", "lang_sw": "Swahili", - "lang_zh": "China" + "lang_zh": "China", + "Common emoji": "Emoticonos comunes", + "Copy and paste into your text": "Copia y pega en tu texto" } diff --git a/translations/fr.json b/translations/fr.json index f58c6dfbe..869b5a612 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -544,5 +544,7 @@ "lang_oc": "Occitan", "lang_pt": "Portugais", "lang_sw": "Swahili", - "lang_zh": "Chinoise" + "lang_zh": "Chinoise", + "Common emoji": "Émoji commun", + "Copy and paste into your text": "Copiez et collez dans votre texte" } diff --git a/translations/ga.json b/translations/ga.json index d926e2297..1b9e61da3 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -544,5 +544,7 @@ "lang_oc": "Béarla", "lang_pt": "Portaingéilis", "lang_sw": "Swahili", - "lang_zh": "Síneach" + "lang_zh": "Síneach", + "Common emoji": "Emoji coitianta", + "Copy and paste into your text": "Cóipeáil agus greamaigh isteach i do théacs" } diff --git a/translations/hi.json b/translations/hi.json index 117e07501..41c166e2b 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -544,5 +544,7 @@ "lang_oc": "ओसीटान", "lang_pt": "पुर्तगाली", "lang_sw": "Swahili", - "lang_zh": "चीनी" + "lang_zh": "चीनी", + "Common emoji": "आम इमोजी", + "Copy and paste into your text": "अपने टेक्स्ट में कॉपी और पेस्ट करें" } diff --git a/translations/it.json b/translations/it.json index 943f9fb17..a329d132c 100644 --- a/translations/it.json +++ b/translations/it.json @@ -544,5 +544,7 @@ "lang_oc": "Occitano", "lang_pt": "Portoghese", "lang_sw": "Swahili", - "lang_zh": "Cinese" + "lang_zh": "Cinese", + "Common emoji": "Emoji comuni", + "Copy and paste into your text": "Copia e incolla nel tuo testo" } diff --git a/translations/ja.json b/translations/ja.json index 5c0a3a5cf..c2a12661e 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -544,5 +544,7 @@ "lang_oc": "オック語", "lang_pt": "ポルトガル語", "lang_sw": "スワヒリ語", - "lang_zh": "中国語" + "lang_zh": "中国語", + "Common emoji": "一般的な絵文字", + "Copy and paste into your text": "コピーしてテキストに貼り付けます" } diff --git a/translations/ko.json b/translations/ko.json index 357d59cc9..c9e30c908 100644 --- a/translations/ko.json +++ b/translations/ko.json @@ -544,5 +544,7 @@ "lang_oc": "옥시탄", "lang_pt": "포르투갈 인", "lang_sw": "스와힐리어", - "lang_zh": "중국인" + "lang_zh": "중국인", + "Common emoji": "일반적인 이모티콘", + "Copy and paste into your text": "텍스트에 복사하여 붙여넣기" } diff --git a/translations/ku.json b/translations/ku.json index 6416f3408..920756b66 100644 --- a/translations/ku.json +++ b/translations/ku.json @@ -544,5 +544,7 @@ "lang_oc": "Occitan", "lang_pt": "Portekizî", "lang_sw": "Swahîlîyî", - "lang_zh": "Çînî" + "lang_zh": "Çînî", + "Common emoji": "Emojiyên hevpar", + "Copy and paste into your text": "Di nivîsa xwe de kopî bikin û bixin" } diff --git a/translations/oc.json b/translations/oc.json index 03b7c7cb0..09b274b18 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -540,5 +540,7 @@ "lang_oc": "Occitan", "lang_pt": "Portuguese", "lang_sw": "Swahili", - "lang_zh": "Chinese" + "lang_zh": "Chinese", + "Common emoji": "Common emoji", + "Copy and paste into your text": "Copy and paste into your text" } diff --git a/translations/pl.json b/translations/pl.json index 50e42f8d5..f88f3d844 100644 --- a/translations/pl.json +++ b/translations/pl.json @@ -544,5 +544,7 @@ "lang_oc": "Prowansalski", "lang_pt": "Portugalski", "lang_sw": "Suahili", - "lang_zh": "Chiński" + "lang_zh": "Chiński", + "Common emoji": "Popularne emotikony", + "Copy and paste into your text": "Skopiuj i wklej do swojego tekstu" } diff --git a/translations/pt.json b/translations/pt.json index de70aeddb..060083ce1 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -544,5 +544,7 @@ "lang_oc": "Occitano", "lang_pt": "Português", "lang_sw": "Suaíli", - "lang_zh": "Chinês" + "lang_zh": "Chinês", + "Common emoji": "Emoji comum", + "Copy and paste into your text": "Copie e cole no seu texto" } diff --git a/translations/ru.json b/translations/ru.json index b06b21eea..2886a8258 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -544,5 +544,7 @@ "lang_oc": "окситанский", "lang_pt": "португальский", "lang_sw": "суахили", - "lang_zh": "Китайский" + "lang_zh": "Китайский", + "Common emoji": "Общие смайлики", + "Copy and paste into your text": "Скопируйте и вставьте в свой текст" } diff --git a/translations/sw.json b/translations/sw.json index f765626ac..e7412ba0c 100644 --- a/translations/sw.json +++ b/translations/sw.json @@ -544,5 +544,7 @@ "lang_oc": "Oksitani", "lang_pt": "Kireno", "lang_sw": "Kiswahili", - "lang_zh": "Kichina" + "lang_zh": "Kichina", + "Common emoji": "Emoji ya kawaida", + "Copy and paste into your text": "Nakili na ubandike kwenye maandishi yako" } diff --git a/translations/uk.json b/translations/uk.json index 6df79c654..a1afb5f8c 100644 --- a/translations/uk.json +++ b/translations/uk.json @@ -544,5 +544,7 @@ "lang_oc": "окситанський", "lang_pt": "португальська", "lang_sw": "суахілі", - "lang_zh": "китайський" + "lang_zh": "китайський", + "Common emoji": "Звичайні емодзі", + "Copy and paste into your text": "Скопіюйте та вставте у свій текст" } diff --git a/translations/zh.json b/translations/zh.json index e7c1cbbe9..76cc3775c 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -544,5 +544,7 @@ "lang_oc": "奥克西坦", "lang_pt": "葡萄牙语", "lang_sw": "斯瓦希里语", - "lang_zh": "中国人" + "lang_zh": "中国人", + "Common emoji": "常见表情符号", + "Copy and paste into your text": "复制并粘贴到您的文本中" } diff --git a/webapp_create_post.py b/webapp_create_post.py index e0a196353..47a85365f 100644 --- a/webapp_create_post.py +++ b/webapp_create_post.py @@ -19,6 +19,7 @@ from utils import get_currencies from utils import get_category_types from utils import get_account_timezone from utils import get_supported_languages +from webapp_utils import html_common_emoji from webapp_utils import begin_edit_section from webapp_utils import end_edit_section from webapp_utils import get_banner_file @@ -381,6 +382,14 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, 'imageDescription', '') new_post_image_section += end_edit_section() + new_post_emoji_section = \ + begin_edit_section('😀 ' + translate['Common emoji']) + new_post_emoji_section += \ + '
\n' + new_post_emoji_section += html_common_emoji(base_dir, 16) + new_post_emoji_section += end_edit_section() + scope_icon = 'scope_public.png' scope_description = translate['Public'] if share_description: @@ -826,6 +835,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, new_post_form += reply_str if media_instance and not reply_str: new_post_form += new_post_image_section + new_post_form += new_post_emoji_section if not share_description: share_description = '' @@ -880,6 +890,7 @@ def html_new_post(css_cache: {}, media_instance: bool, translate: {}, extra_fields + citations_str + replies_section + date_and_location if not media_instance or reply_str: new_post_form += new_post_image_section + new_post_form += new_post_emoji_section new_post_form += \ '
\n' + \ diff --git a/webapp_search.py b/webapp_search.py index 0b8040e79..f15a12e3a 100644 --- a/webapp_search.py +++ b/webapp_search.py @@ -30,6 +30,7 @@ from skills import get_skills_from_list from categories import get_hashtag_category from feeds import rss2tag_header from feeds import rss2tag_footer +from webapp_utils import html_common_emoji from webapp_utils import set_custom_background from webapp_utils import html_keyboard_navigation from webapp_utils import html_header_with_external_style @@ -330,44 +331,6 @@ def html_search_shared_items(css_cache: {}, translate: {}, return shared_items_form -def _html_common_emoji(base_dir: str, no_of_emoji: int) -> str: - """Shows common emoji - """ - common_emoji_filename = base_dir + '/accounts/common_emoji.txt' - if not os.path.isfile(common_emoji_filename): - return '' - common_emoji = None - try: - with open(common_emoji_filename, 'r') as fp_emoji: - common_emoji = fp_emoji.readlines() - except OSError: - print('EX: html_common_emoji unable to load file') - return '' - if not common_emoji: - return '' - line_ctr = 0 - ctr = 0 - html_str = '' - while ctr < no_of_emoji and line_ctr < len(common_emoji): - emoji_name = common_emoji[ctr].split(' ')[1].replace('\n', '') - emoji_filename = base_dir + '/emoji/' + emoji_name + '.png' - if os.path.isfile(emoji_filename): - # NOTE: deliberately no alt text, so that without graphics only - # the emoji name shows - html_str += \ - '\n' - ctr += 1 - line_ctr += 1 - if html_str: - html_str = \ - '

' + html_str + \ - '

\n' - return html_str - - def html_search_emoji_text_entry(css_cache: {}, translate: {}, base_dir: str, path: str) -> str: """Search for an emoji by name @@ -407,7 +370,11 @@ def html_search_emoji_text_entry(css_cache: {}, translate: {}, emoji_str += ' \n' emoji_str += ' \n' emoji_str += '
\n' - emoji_str += _html_common_emoji(base_dir, 16) + emoji_str += '
\n' + emoji_str += '

\n' + emoji_str += html_common_emoji(base_dir, 16) + '\n' + emoji_str += '

\n' + emoji_str += '
\n' emoji_str += '\n' emoji_str += html_footer() return emoji_str diff --git a/webapp_utils.py b/webapp_utils.py index 04978db5e..4c4e35c1b 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -1672,3 +1672,37 @@ def set_custom_background(base_dir: str, background: str, base_dir + '/accounts/' + new_background + '.' + ext) return ext return None + + +def html_common_emoji(base_dir: str, no_of_emoji: int) -> str: + """Shows common emoji + """ + common_emoji_filename = base_dir + '/accounts/common_emoji.txt' + if not os.path.isfile(common_emoji_filename): + return '' + common_emoji = None + try: + with open(common_emoji_filename, 'r') as fp_emoji: + common_emoji = fp_emoji.readlines() + except OSError: + print('EX: html_common_emoji unable to load file') + return '' + if not common_emoji: + return '' + line_ctr = 0 + ctr = 0 + html_str = '' + while ctr < no_of_emoji and line_ctr < len(common_emoji): + emoji_name = common_emoji[ctr].split(' ')[1].replace('\n', '') + emoji_filename = base_dir + '/emoji/' + emoji_name + '.png' + if os.path.isfile(emoji_filename): + # NOTE: deliberately no alt text, so that without graphics only + # the emoji name shows + html_str += \ + '\n' + ctr += 1 + line_ctr += 1 + return html_str