Browse Source

add mark promoted twists as promoted

readme-update
Simon Grim 6 years ago
parent
commit
1f535ab230
  1. 13
      css/style.css
  2. 15
      js/interface_localization.js
  3. 3
      js/twister_formatpost.js
  4. 13
      theme_calm/css/style.css
  5. 13
      theme_nin/css/style.css
  6. 12
      theme_nin/sass/_postboard.sass

13
css/style.css

@ -1089,6 +1089,19 @@ ol.toptrends-list {
background-color: #FFFFED; background-color: #FFFFED;
} }
.post.promoted > .post-data .post-text::after {
font-size: 8px;
color: #FFF;
background-color: #E34F42CC;
margin: 0px 8px;
padding: 2px 4px;
content: attr(data-promoted);
}
.post.promoted > .post-data:hover .post-text::after {
background-color: #E34F42;
}
.post.open .post.open
{ {
margin: 10px 0; margin: 10px 0;

15
js/interface_localization.js

@ -344,6 +344,7 @@ if(preferredLanguage == "en"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Normal posts", "Normal posts": "Normal posts",
"Promoted posts": "Promoted posts", "Promoted posts": "Promoted posts",
'promoted': 'Promoted',
"Messages": "Messages", "Messages": "Messages",
"Edit profile": "Edit profile", "Edit profile": "Edit profile",
"Top Trends": "Top Trends", "Top Trends": "Top Trends",
@ -714,6 +715,7 @@ if(preferredLanguage == "es"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Posts normales", "Normal posts": "Posts normales",
"Promoted posts": "Posts promocionados", "Promoted posts": "Posts promocionados",
'promoted': 'Promocionado',
"Messages": "Mensajes", "Messages": "Mensajes",
"Edit profile": "Editar perfil", "Edit profile": "Editar perfil",
"Top Trends": "Tendencias principales", "Top Trends": "Tendencias principales",
@ -1078,6 +1080,7 @@ if(preferredLanguage == "uk"){
"copy_to_clipboard": "Щоб скопіювати, натисніть Ctrl/Cmd+C а потім Enter щоб закрити", "copy_to_clipboard": "Щоб скопіювати, натисніть Ctrl/Cmd+C а потім Enter щоб закрити",
"Normal posts": "Твісти", "Normal posts": "Твісти",
"Promoted posts": "Спонсори", "Promoted posts": "Спонсори",
'promoted': 'Promoted',
"Messages": "Повідомлення", "Messages": "Повідомлення",
"Edit profile": "Профіль", "Edit profile": "Профіль",
"Top Trends": "Тренди", "Top Trends": "Тренди",
@ -1445,6 +1448,7 @@ if(preferredLanguage == "zh-CN"){
"copy_to_clipboard": "按 Ctrl/Cmd+C 复制,然后按 Enter 关闭", "copy_to_clipboard": "按 Ctrl/Cmd+C 复制,然后按 Enter 关闭",
"Normal posts": "普通推文", "Normal posts": "普通推文",
"Promoted posts": "推广推文", "Promoted posts": "推广推文",
'promoted': 'Promoted',
"Messages": "消息", "Messages": "消息",
"Edit profile": "编辑个人简介", "Edit profile": "编辑个人简介",
"Top Trends": "热门趋势", "Top Trends": "热门趋势",
@ -1816,6 +1820,7 @@ if(preferredLanguage == "nl"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Normal posts", "Normal posts": "Normal posts",
"Promoted posts": "Promoted posts", "Promoted posts": "Promoted posts",
'promoted': 'Promoted',
"Messages": "Messages", "Messages": "Messages",
"Edit profile": "Edit profile", "Edit profile": "Edit profile",
"Top Trends": "Top Trends", "Top Trends": "Top Trends",
@ -2181,6 +2186,7 @@ if(preferredLanguage == "it"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Normal posts", "Normal posts": "Normal posts",
"Promoted posts": "Promoted posts", "Promoted posts": "Promoted posts",
'promoted': 'Promoted',
"Messages": "Messages", "Messages": "Messages",
"Edit profile": "Edit profile", "Edit profile": "Edit profile",
"Top Trends": "Top Trends", "Top Trends": "Top Trends",
@ -2548,6 +2554,7 @@ if(preferredLanguage == "fr"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Normal posts", "Normal posts": "Normal posts",
"Promoted posts": "Promoted posts", "Promoted posts": "Promoted posts",
'promoted': 'Promoted',
"Messages": "Messages", "Messages": "Messages",
"Edit profile": "Edit profile", "Edit profile": "Edit profile",
"Top Trends": "Top Trends", "Top Trends": "Top Trends",
@ -2916,6 +2923,7 @@ if(preferredLanguage == "ru"){
"copy_to_clipboard": "Нажмите Ctrl/Cmd+C для копирования и Enter для закрытия", "copy_to_clipboard": "Нажмите Ctrl/Cmd+C для копирования и Enter для закрытия",
"Normal posts": "Сообщения пользователей", "Normal posts": "Сообщения пользователей",
"Promoted posts": "Рекламные сообщения", "Promoted posts": "Рекламные сообщения",
'promoted': 'Продвигаемый',
"Messages": "Сообщения", "Messages": "Сообщения",
"Edit profile": "Изменить профиль", "Edit profile": "Изменить профиль",
"Top Trends": "Топ Трендов", "Top Trends": "Топ Трендов",
@ -3289,6 +3297,7 @@ if(preferredLanguage == "de"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Normal posts", "Normal posts": "Normal posts",
"Promoted posts": "Promoted posts", "Promoted posts": "Promoted posts",
'promoted': 'Promoted',
"Messages": "Nachrichten", "Messages": "Nachrichten",
"Edit profile": "Profil bearbeiten", "Edit profile": "Profil bearbeiten",
"Top Trends": "Top Trends", "Top Trends": "Top Trends",
@ -3653,6 +3662,7 @@ if(preferredLanguage == "ja"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Normal posts", "Normal posts": "Normal posts",
"Promoted posts": "Promoted posts", "Promoted posts": "Promoted posts",
'promoted': 'Promoted',
"Messages": "Messages", "Messages": "Messages",
"Edit profile": "Edit profile", "Edit profile": "Edit profile",
"Top Trends": "Top Trends", "Top Trends": "Top Trends",
@ -4023,6 +4033,7 @@ if(preferredLanguage == "pt-BR"){
"copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close", "copy_to_clipboard": "Press Ctrl/Cmd+C to copy then Enter to close",
"Normal posts": "Normal posts", "Normal posts": "Normal posts",
"Promoted posts": "Promoted posts", "Promoted posts": "Promoted posts",
'promoted': 'Promoted',
"Messages": "Messages", "Messages": "Messages",
"Edit profile": "Edit profile", "Edit profile": "Edit profile",
"Top Trends": "Top Trends", "Top Trends": "Top Trends",
@ -4388,6 +4399,7 @@ if(preferredLanguage == "tr"){
"copy_to_clipboard": "Kopyalamak için Ctrl/Cmd+C tuşlarına, kapatmak için Enter tuşuna basınız", "copy_to_clipboard": "Kopyalamak için Ctrl/Cmd+C tuşlarına, kapatmak için Enter tuşuna basınız",
"Normal posts": "Normal gönderiler", "Normal posts": "Normal gönderiler",
"Promoted posts": "Desteklenen gönderiler", "Promoted posts": "Desteklenen gönderiler",
'promoted': 'Promoted',
"Messages": "İletiler", "Messages": "İletiler",
"Edit profile": "Profili düzenle", "Edit profile": "Profili düzenle",
"Top Trends": "Gündem", "Top Trends": "Gündem",
@ -4754,6 +4766,7 @@ if(preferredLanguage == "cs"){
"copy_to_clipboard": "Stiskněte Ctrl+C pro zkopírování, a pak Enter pro zavření tohoto okénka.", "copy_to_clipboard": "Stiskněte Ctrl+C pro zkopírování, a pak Enter pro zavření tohoto okénka.",
"Normal posts": "Normální příspěvky", "Normal posts": "Normální příspěvky",
"Promoted posts": "Přednostní příspěvky", "Promoted posts": "Přednostní příspěvky",
'promoted': 'Promoted',
"Messages": "Zprávy", "Messages": "Zprávy",
"Edit profile": "Upravit profil", "Edit profile": "Upravit profil",
"Top Trends": "Hlavní trendy", "Top Trends": "Hlavní trendy",
@ -5133,6 +5146,7 @@ if(preferredLanguage == "cmn"){
"copy_to_clipboard": "按下 Ctrl/Cmd+C 來拷貝,然後按下 Enter 來關閉", "copy_to_clipboard": "按下 Ctrl/Cmd+C 來拷貝,然後按下 Enter 來關閉",
"Normal posts": "一般推文", "Normal posts": "一般推文",
"Promoted posts": "推廣推文", "Promoted posts": "推廣推文",
'promoted': 'Promoted',
"Messages": "訊息", "Messages": "訊息",
"Edit profile": "編輯側寫", "Edit profile": "編輯側寫",
"Top Trends": "熱門趨勢", "Top Trends": "熱門趨勢",
@ -5512,6 +5526,7 @@ if(preferredLanguage == "yue"){
"copy_to_clipboard": "撳 Ctrl/Cmd+C 來複製,跟住撳 Enter 來閂埋", "copy_to_clipboard": "撳 Ctrl/Cmd+C 來複製,跟住撳 Enter 來閂埋",
"Normal posts": "一般推文", "Normal posts": "一般推文",
"Promoted posts": "推廣推文", "Promoted posts": "推廣推文",
'promoted': 'Promoted',
"Messages": "口訊", "Messages": "口訊",
"Edit profile": "編輯個人資料", "Edit profile": "編輯個人資料",
"Top Trends": "熱門趨勢", "Top Trends": "熱門趨勢",

3
js/twister_formatpost.js

@ -188,6 +188,9 @@ function postToElem(post, kind, promoted) {
elem.find('.post-propagate').remove(); elem.find('.post-propagate').remove();
postData.attr('data-promoted', 1); postData.attr('data-promoted', 1);
postData.attr('data-screen-name', '!' + username); postData.attr('data-screen-name', '!' + username);
} else if (!post.sig_userpost) { // .sig_userpost of promoted twists is empty so let's assume this one is promoted
elem.addClass('promoted')
.find('.post-text').attr('data-promoted', polyglot.t('promoted'));
} else { } else {
setPostInfoSent(userpost.n, userpost.k, elem.find('.post-info-sent')); setPostInfoSent(userpost.n, userpost.k, elem.find('.post-info-sent'));
if ($.Options.filterLang.val !== 'disable' && $.Options.filterLangSimulate.val) { if ($.Options.filterLang.val !== 'disable' && $.Options.filterLangSimulate.val) {

13
theme_calm/css/style.css

@ -1301,6 +1301,19 @@ textarea.splited-post {
background-color: #FFFFED; background-color: #FFFFED;
} }
.post.promoted > .post-data .post-text::after {
font-size: 10px;
color: #FFF;
background-color: #B2D67B;
margin: 0px 8px;
padding: 2px 4px;
content: attr(data-promoted);
}
.post.promoted > .post-data:hover .post-text::after {
background-color: #B2D67BCC;
}
.post.open .post.open
{ {
margin: 10px 0; margin: 10px 0;

13
theme_nin/css/style.css

@ -791,6 +791,19 @@ samp {
color: #B4C669; color: #B4C669;
} }
.post.promoted > .post-data .post-text::after {
font-size: 8px;
color: #FFF;
background-color: #B4C669CC;
margin: 0px 8px;
padding: 2px 4px;
content: attr(data-promoted);
}
.post.promoted > .post-data:hover .post-text::after {
background-color: #B4C669;
}
/* line 55, ../sass/_postboard.sass */ /* line 55, ../sass/_postboard.sass */
.post-data { .post-data {
padding: 10px; padding: 10px;

12
theme_nin/sass/_postboard.sass

@ -82,6 +82,18 @@
.post-info-time .post-info-time
color: $color-green color: $color-green
.post.promoted
> .post-data
.post-text::after
font-size: 8px
color: #FFF
background-color: #B4C669CC
margin: 0px 8px
padding: 2px 4px
content: attr(data-promoted)
&:hover
.post-text::after
background-color: $color-green
.open .open
background: none background: none

Loading…
Cancel
Save