Browse Source

tune 'twisted again by @' line to make it translateable & more cuztomizable

readme-update
Simon Grim 9 years ago
parent
commit
8163a7ebad
  1. 14
      css/style.css
  2. 13
      following.html
  3. 13
      home.html
  4. 5
      js/interface_home.js
  5. 39
      js/interface_localization.js
  6. 10
      js/twister_formatpost.js
  7. 15
      theme_calm/css/style.css
  8. 23
      theme_nin/css/style.css
  9. 2
      theme_nin/js/theme_option.js
  10. 10
      theme_nin/sass/_postboard.sass
  11. 24
      tmobile.html

14
css/style.css

@ -1097,7 +1097,16 @@ ol.toptrends-list { @@ -1097,7 +1097,16 @@ ol.toptrends-list {
top: 40px;
}
.post-retransmited-icon {
.post-rt-by div {
display: inline;
}
.post-rt-by .prep:before,
.post-rt-by .prep:after {
content: ' ';
}
.post-rt-icon {
display: inline-block;
width: 16px;
height: 16px;
@ -1106,9 +1115,6 @@ ol.toptrends-list { @@ -1106,9 +1115,6 @@ ol.toptrends-list {
margin: 2px;
}
.post-retransmited-time:before {
content: ' ';
}
.post-interactions
{
margin: 2px 10px 10px 60px;

13
following.html

@ -276,11 +276,14 @@ @@ -276,11 +276,14 @@
</div>
</div>
<div id="post-retransmited-by-template">
<i class="post-retransmited-icon"></i>
<span>twisted again by</span><span> </span>
<a class="post-retransmited-by open-profile-modal" href=""></a>
<span class="post-retransmited-time"></span>
<div id="post-rt-by-template">
<i class="post-rt-icon"></i>
<div class="post-rt-sign">
<span class="prep">twisted again by</span><a class="open-profile-modal"></a>
</div>
<div class="post-rt-time">
<span class="prep">at</span><span class="time"></span>
</div>
</div>
<!-- template for user links in message (open profile modal) -->

13
home.html

@ -367,11 +367,14 @@ @@ -367,11 +367,14 @@
</div>
</div>
<div id="post-retransmited-by-template">
<i class="post-retransmited-icon"></i>
<span>twisted again by</span><span> </span>
<a class="post-retransmited-by open-profile-modal" href=""></a>
<span class="post-retransmited-time"></span>
<div id="post-rt-by-template">
<i class="post-rt-icon"></i>
<div class="post-rt-sign">
<span class="prep">twisted again by</span><a class="open-profile-modal"></a>
</div>
<div class="post-rt-time">
<span class="prep">at</span><span class="time"></span>
</div>
</div>
<!-- template for user links in message (open profile modal) -->

5
js/interface_home.js

@ -106,8 +106,9 @@ var InterfaceFunctions = function() { @@ -106,8 +106,9 @@ var InterfaceFunctions = function() {
$('.mini-profile .following-count').text(followingUsers.length - 1);
$('.wrapper .postboard .post').each( function() {
var elem = $(this);
if ((elem.find('[data-screen-name="' + user + '"]').length && !elem.find(".post-retransmited-by").text())
|| elem.find(".post-retransmited-by").text() === '@'+user)
if ((elem.find('[data-screen-name="' + user + '"]').length
&& !elem.find(".post-rt-by .open-profile-modal").text())
|| elem.find(".post-rt-by .open-profile-modal").text() === '@' + user)
elem.remove();
});
});

39
js/interface_localization.js

@ -311,7 +311,8 @@ if(preferredLanguage == "en"){ @@ -311,7 +311,8 @@ if(preferredLanguage == "en"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -631,7 +632,8 @@ if(preferredLanguage == "es"){ @@ -631,7 +632,8 @@ if(preferredLanguage == "es"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "deshacer",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -932,7 +934,8 @@ if(preferredLanguage == "uk"){ @@ -932,7 +934,8 @@ if(preferredLanguage == "uk"){
"Who's celebrating Twistday": "Річницю святкує",
"Today's luckies:": "Сьогоднішні щасливчики:",
"Upcoming ones:": "Найближчим часом:",
"twisted again by": "ретвіст від",
"post_rt_sign_prep": "ретвіст від",
"post_rt_time_prep": "at",
"undo": "відмінити",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Ви впевнені, що бажаєте завершити роботу? \n\nКлієнт Twister буде зупинено допоки ви не запустите його знову.",
"Daemon exited...": "Twister заверив роботу...",
@ -1237,7 +1240,8 @@ if(preferredLanguage == "zh-CN"){ @@ -1237,7 +1240,8 @@ if(preferredLanguage == "zh-CN"){
"Who's celebrating Twistday": "谁在庆祝自己的Twistday周年纪念日",
"Today's luckies:": "今天的幸运用户:",
"Upcoming ones:": "即将到来的幸运用户:",
"twisted again by": "转推由",
"post_rt_sign_prep": "转推由",
"post_rt_time_prep": "at",
"undo": "撤销",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "你确定要退出后台进程?\nTwister 客户端将停止工作。",
"Daemon exited...": "后台进程已退出...",
@ -1558,7 +1562,8 @@ if(preferredLanguage == "nl"){ @@ -1558,7 +1562,8 @@ if(preferredLanguage == "nl"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -1859,7 +1864,8 @@ if(preferredLanguage == "it"){ @@ -1859,7 +1864,8 @@ if(preferredLanguage == "it"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -2163,7 +2169,8 @@ if(preferredLanguage == "fr"){ @@ -2163,7 +2169,8 @@ if(preferredLanguage == "fr"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -2469,7 +2476,8 @@ if(preferredLanguage == "ru"){ @@ -2469,7 +2476,8 @@ if(preferredLanguage == "ru"){
"Who's celebrating Twistday": "Кто празднует Твистодень",
"Today's luckies:": "Сегодняшные счастливчики", // няшные, ок?
"Upcoming ones:": "Намечающиеся вскоре",
"twisted again by": "Перепостил",
"post_rt_sign_prep": "ретвистит",
"post_rt_time_prep": "в",
"undo": "отменить",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Вы уверены, что хотите "+
"выключить демон?\nTwister клиент перестанет работать.",
@ -2780,7 +2788,8 @@ if(preferredLanguage == "de"){ @@ -2780,7 +2788,8 @@ if(preferredLanguage == "de"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Die Glücklichen von heute:",
"Upcoming ones:": "Demnächst:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -3081,7 +3090,8 @@ if(preferredLanguage == "ja"){ @@ -3081,7 +3090,8 @@ if(preferredLanguage == "ja"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -3388,7 +3398,8 @@ if(preferredLanguage == "pt-BR"){ @@ -3388,7 +3398,8 @@ if(preferredLanguage == "pt-BR"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "twisted again by",
"post_rt_sign_prep": "twisted again by",
"post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@ -3691,7 +3702,8 @@ if(preferredLanguage == "tr"){ @@ -3691,7 +3702,8 @@ if(preferredLanguage == "tr"){
"Who's celebrating Twistday": "Twistgünü'nü kutlayanlar",
"Today's luckies:": "Günün talihlileri:",
"Upcoming ones:": "Yakında:",
"twisted again by": "yeniden ileten",
"post_rt_sign_prep": "yeniden ileten",
"post_rt_time_prep": "at",
"undo": "geri al",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Hizmeti sonlandırmak istiyor musun?\nTwister istemcisi çalışmayacak.",
"Daemon exited...": "Hizmet sonlandırıldı...",
@ -3993,7 +4005,8 @@ if(preferredLanguage == "cs"){ @@ -3993,7 +4005,8 @@ if(preferredLanguage == "cs"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
"twisted again by": "přeposlal(a)",
"post_rt_sign_prep": "přeposlal(a)",
"post_rt_time_prep": "at",
"undo": "zpět",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Skutečně chcete ukončit server?\nTwister tím vypnete.",
"Daemon exited...": "Server ukončen...",

10
js/twister_formatpost.js

@ -14,7 +14,7 @@ $(document).ready(function() { @@ -14,7 +14,7 @@ $(document).ready(function() {
_templatePostRtReference = $('#post-rt-reference-template').children().clone(true);
_templatePostRtReference.find('.post-text')
.on('click', {feeder: '.post-rt-reference'}, openConversationClick);
_templatePostRtBy = $('#post-retransmited-by-template').children().clone(true);
_templatePostRtBy = $('#post-rt-by-template').children().clone(true);
_htmlFormatMsgLinkTemplateExternal = $('#external-page-link-template')
if (_htmlFormatMsgLinkTemplateExternal.length) {
_htmlFormatMsgLinkTemplateExternal = _htmlFormatMsgLinkTemplateExternal[0].cloneNode();
@ -156,11 +156,13 @@ function postToElem(post, kind, promoted) { @@ -156,11 +156,13 @@ function postToElem(post, kind, promoted) {
if (userpost.msg) {
setPostReference(postContext, rt, userpost.sig_rt);
} else {
postContext.append(_templatePostRtBy.clone(true))
.find('.post-retransmited-by')
postContext.append(_templatePostRtBy.clone(true)).addClass('post-rt-by')
.find('.post-rt-sign .prep').text(polyglot.t('post_rt_sign_prep'))
.siblings('.open-profile-modal')
.attr('href', $.MAL.userUrl(retweeted_by)).text('@' + retweeted_by)
;
postContext.find('.post-retransmited-time').text('on ' + timeGmtToText(post.userpost.time));
postContext.find('.post-rt-time .prep').text(polyglot.t('post_rt_time_prep'))
.siblings('.time').text(timeGmtToText(post.userpost.time));
// let's check original post and grab some possible RT
dhtget(username, 'post' + k, 's',
function(args, post) {

15
theme_calm/css/style.css

@ -1383,7 +1383,7 @@ textarea.splited-post { @@ -1383,7 +1383,7 @@ textarea.splited-post {
color: #768fce;
}
.post-info a[href^="#profile"], .followers a[href^="#profile"], a[href^="#profile"].post-retransmited-by{
.post-info a[href^="#profile"], .followers a[href^="#profile"], .post-rt-sign a {
color: #43464d;
-webkit-transition: all 200ms;
-moz-transition: all 200ms;
@ -1392,7 +1392,7 @@ textarea.splited-post { @@ -1392,7 +1392,7 @@ textarea.splited-post {
transition: all 200ms;
}
.post-info a[href^="#profile"]:hover, .followers a[href^="#profile"]:hover, a[href^="#profile"].post-retransmited-by:hover {
.post-info a[href^="#profile"]:hover, .followers a[href^="#profile"]:hover, .post-rt-sign a:hover {
color: #5e8da4;
text-decoration: none;
}
@ -1473,7 +1473,16 @@ textarea.splited-post { @@ -1473,7 +1473,16 @@ textarea.splited-post {
top: 40px;
}
.post-retransmited-icon {
.post-rt-by div {
display: inline;
}
.post-rt-by .prep:before,
.post-rt-by .prep:after {
content: ' ';
}
.post-rt-icon {
display: inline-block;
width: 25px;
height: 25px;

23
theme_nin/css/style.css

@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
font-style: normal;
}
/* line 64, ../sass/_fonts.sass */
[class^="icon-"]:before, [class*=" icon-"]:before, .extend-icon:before, .userMenu li.userMenu-config > a:before, .post-retransmited-icon:before, .post-reply:before, .post-propagate:before, .post-favorite:before, .post .show-more:before, .mini-profile-actions span:before, ul.userMenu-search-profiles button:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .modal-close:before, .mark-all-as-read:before, .modal-back:before, .icon-down-after:after {
[class^="icon-"]:before, [class*=" icon-"]:before, .extend-icon:before, .userMenu li.userMenu-config > a:before, .post-rt-icon:before, .post-reply:before, .post-propagate:before, .post-favorite:before, .post .show-more:before, .mini-profile-actions span:before, ul.userMenu-search-profiles button:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .modal-close:before, .mark-all-as-read:before, .modal-back:before, .icon-down-after:after {
font-family: "fontello";
font-style: normal;
font-weight: normal;
@ -198,7 +198,7 @@ @@ -198,7 +198,7 @@
/* '' */
/* line 188, ../sass/_fonts.sass */
.icon-twistagain:before, .post-retransmited-icon:before, .post-propagate:before {
.icon-twistagain:before, .post-rt-icon:before, .post-propagate:before {
content: "";
}
@ -895,8 +895,21 @@ samp { @@ -895,8 +895,21 @@ samp {
margin: 2px 8px 4px 62px;
}
.post-rt-by {
margin: 0 0 1em;
}
.post-rt-by div {
display: inline;
}
.post-rt-by .prep:before,
.post-rt-by .prep:after {
content: ' ';
}
/* line 146, ../sass/_postboard.sass */
.post-retransmited-icon:before {
.post-rt-icon:before {
display: block;
float: left;
background: #B4C669;
@ -911,10 +924,6 @@ samp { @@ -911,10 +924,6 @@ samp {
margin-right: 0.4em;
}
.post-context.post-retransmited-by-container {
margin: 0 0 1em;
}
/* line 158, ../sass/_postboard.sass */
.mini-screen-name {
font-size: 13px;

2
theme_nin/js/theme_option.js

@ -8,7 +8,7 @@ $(function(){ @@ -8,7 +8,7 @@ $(function(){
$('.mini-profile-actions span').html('');
$.globalEval(postToElem.toString().replace(/postContext.append\(_templatePostRtBy/,
'postContext.addClass(\'post-retransmited-by-container\').prependTo(postContext.parent()).append(_templatePostRtBy'));
'postContext.prependTo(postContext.parent()).append(_templatePostRtBy'));
$( '.userMenu-home.current a' ).on( 'click', function() {

10
theme_nin/sass/_postboard.sass

@ -144,15 +144,19 @@ @@ -144,15 +144,19 @@
line-height: 11px
margin: 2px 10px 4px 60px
color: lighten($dark-grey,30%)
&.post-retransmited-by-container
margin: 0 0 1em
.mini-screen-name
font-size: 13px
color: $dark-grey
.post-rt-by
margin: 0 0 1em
div
display: inline
.prep:before, .prep:after
content: ' '
.post-retransmited-icon
.post-rt-icon
@extend .icon-twistagain
@extend .extend-icon
display: block

24
tmobile.html

@ -82,6 +82,19 @@ @@ -82,6 +82,19 @@
color: #555 !important;
}
.post-rt-by {
font-size: 60%;
}
.post-rt-by div {
display: inline;
}
.post-rt-by .prep:before,
.post-rt-by .prep:after {
content: ' ';
}
.post-rt-reference {
background-color: #FAFAFA;
border: 1px solid #ccc;
@ -808,10 +821,13 @@ @@ -808,10 +821,13 @@
</div>
</div>
<div id="post-retransmited-by-template">
<i class="post-retransmited-icon"></i>
<span style="font-size:60%;">twisted again by</span><span> </span>
<a style="font-size:60%;" class="post-retransmited-by open-profile-modal" href=""></a>
<div id="post-rt-by-template">
<div class="post-rt-sign">
<span class="prep">twisted again by</span><a class="open-profile-modal"></a>
</div>
<div class="post-rt-time">
<span class="prep">at</span><span class="time"></span>
</div>
</div>
<!-- template for user links in message (open profile modal) -->

Loading…
Cancel
Save