From 171d117cddfcb379cbe1068a642e7b74e8b09a52 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Tue, 18 Aug 2015 16:49:56 +0500 Subject: [PATCH] update to miguelfreitas/twister-html#294 --- css/style.css | 56 +++++++++++++++++++++++++++++++++---- js/theme_option.js | 5 ++-- sass/layout/_postboard.sass | 47 +++++++++++++++++++++++-------- sass/layout/_prompt.sass | 4 +-- 4 files changed, 91 insertions(+), 21 deletions(-) diff --git a/css/style.css b/css/style.css index 34c35b1..21b54e7 100644 --- a/css/style.css +++ b/css/style.css @@ -114,7 +114,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, font-weight: normal; font-style: normal; } -.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-context span:before, .post-interactions span:before, .post-stats li.stat-count:before, ul.userMenu-search-profiles button:before, ul.userMenu-search-profiles .show-more-followers:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before, .ion-after:after, .isFollowing:after, .direct-messages-list .post:after { +.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-retransmited-icon:before, .post-interactions span:before, .post-stats li.stat-count:before, ul.userMenu-search-profiles button:before, ul.userMenu-search-profiles .show-more-followers:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before, .ion-after:after, .isFollowing:after, .direct-messages-list .post:after { display: inline-block; font-family: "Ionicons"; speak: none; @@ -128,7 +128,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, -moz-osx-font-smoothing: grayscale; } -.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-context span:before, .post-interactions span:before, .post-stats li.stat-count:before, ul.userMenu-search-profiles button:before, ul.userMenu-search-profiles .show-more-followers:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before { +.ion:before, .userMenu li.userMenu-config > a:before, .modal-header span:before, .prompt-wrapper .modal-header span:before, .bitmessage-ctc:before, .tox-ctc:before, .profile-modal .profile-tox:before, .profile-modal .profile-bitmessage:before, .post-retransmited-icon:before, .post-interactions span:before, .post-stats li.stat-count:before, ul.userMenu-search-profiles button:before, ul.userMenu-search-profiles .show-more-followers:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .twister-user-remove:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before, .view-all-users:before { padding: 0 3px; } @@ -148,7 +148,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, content: ""; } -.ion-shuffle:before, .post-context span:before, .post-interactions span.post-propagate:before, .post-stats li.stat-count:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before { +.ion-shuffle:before, .post-retransmited-icon:before, .post-interactions span.post-propagate:before, .post-stats li.stat-count:before, .refresh-toptrends:before, .twistday-reminder .refresh:before, .refresh-users:before { content: ""; } @@ -862,7 +862,7 @@ button.light:hover, .light.show-more-followers:hover, a.button.light:hover { /************ RETWIST POSTS MODAL ********* */ .prompt-wrapper.reTwist.prompt-wrapper { - margin-top: -110px; + margin-top: -150px; } .prompt-wrapper.reTwist .post-expand, .prompt-wrapper.reTwist .post-interactions { display: none; @@ -1420,10 +1420,11 @@ button.light:hover, .light.show-more-followers:hover, a.button.light:hover { .post-context { font-size: 0.8rem; line-height: 0.8rem; - margin: 0 0 0.8rem 0; + margin: 2px 10px 4px 60px; color: #8a8691; } -.post-context span:before { + +.post-retransmited-icon:before { display: block; float: left; color: #A1B775; @@ -1432,6 +1433,10 @@ button.light:hover, .light.show-more-followers:hover, a.button.light:hover { margin-right: 0.4em; } +.post-context.post-retransmited-by-container { + margin: 0 0 1em; +} + .post-interactions { margin: 10px 0 3px 0; text-align: right; @@ -2792,3 +2797,42 @@ ul.dropdown-menu li > li > a { width: 290px; } } + + +.post-rt-reference { + background-color: #FAFAFA; + border: 1px solid #ccc; + padding: 2px; +} + +.post-rt-reference:hover { + background-color: #FFF; + cursor: pointer; +} + +.post-rt-reference .post-photo { + width: 24px; + height: 24px; + margin-right: 4px; +} + +.post-rt-reference .post-photo img { + width: 24px; + height: auto; +} + +.post-rt-reference .post-info-name { + font-size: 11px; + padding-left: 0px; +} + +.post-rt-reference .post-text { + font-size: 11px; + margin: 4px 4px 4px 28px; +} + +.post-rt-reference .post-info-time { + font-size: 9px; + color: #B3B5B7; +} + diff --git a/js/theme_option.js b/js/theme_option.js index 2d1b1b6..1c435d8 100644 --- a/js/theme_option.js +++ b/js/theme_option.js @@ -16,7 +16,9 @@ $(document).ready(function() testRightSide(); reOrganizeTemplates(); - + + $.globalEval(postToElem.toString().replace(/postContext.append\(_templatePostRtBy/, + 'postContext.addClass(\'post-retransmited-by-container\').prependTo(postContext.parent()).append(_templatePostRtBy')); $( '.userMenu-home.current a' ).on( 'click', function() { $('html, body').animate({scrollTop:0},300); @@ -91,7 +93,6 @@ function reOrganizeTemplates() { // for nin's templating $('.promoted-posts-only').detach().appendTo($('.left .mini-profile')); $('.mini-profile .open-following-page').parent('li').detach().appendTo($('.mini-profile-indicators')); $('.mini-profile-indicators').detach().insertAfter($('.dashboard.left .profile-data')); - $('.post-context').each(function(){ $(this).prependTo($(this).parent()); }); // puts context on top of post ///// page profile $('.forEdition .profile-card-main h2').detach().insertBefore($('.profile-card-main')); diff --git a/sass/layout/_postboard.sass b/sass/layout/_postboard.sass index 21abdc1..1ba16a5 100755 --- a/sass/layout/_postboard.sass +++ b/sass/layout/_postboard.sass @@ -173,21 +173,23 @@ .post-context font-size: .8rem line-height: .8rem - margin: 0 0 .8rem 0 + margin: 2px 10px 4px 60px color: lighten($dark-grey,30%) - span - @extend .ion-shuffle - @extend .ion - &:before - display: block - float: left - color: $main-color-color + &.post-retransmited-by-container + margin: 0 0 1em - line-height: .8rem - font-size: .8rem +.post-retransmited-icon + @extend .ion-shuffle + @extend .ion + &:before + display: block + float: left + color: $main-color-color - margin-right: .4em + line-height: .8rem + font-size: .8rem + margin-right: .4em // .post-interactions (reply, retransmit, fav) @@ -322,3 +324,26 @@ .post-replies .sub-replies border-left: solid 18px transparent + +.post-rt-reference + background-color: #FAFAFA + border: 1px solid #ccc + padding: 2px + &:hover + background-color: #FFF + cursor: pointer + .post-photo + width: 24px + height: 24px + margin-right: 4px + img + width: 24px + height: auto + .post-info-name + font-size: 11px + .post-text + font-size: 11px + margin: 4px 4px 4px 28px + .post-info-time + font-size: 9px + color: #B3B5B7 diff --git a/sass/layout/_prompt.sass b/sass/layout/_prompt.sass index 1ea2818..6e78c72 100644 --- a/sass/layout/_prompt.sass +++ b/sass/layout/_prompt.sass @@ -53,7 +53,7 @@ .prompt-wrapper.reTwist &.prompt-wrapper - margin-top: -110px + margin-top: -150px .post-expand, .post-interactions display: none @@ -70,4 +70,4 @@ .modal-buttons, .post-expand, .post-interactions display: none .post-area - padding-bottom: 6px \ No newline at end of file + padding-bottom: 6px