diff --git a/css/orange/OpenSans-Bold.ttf b/css/orange/OpenSans-Bold.ttf deleted file mode 100644 index fd79d43..0000000 Binary files a/css/orange/OpenSans-Bold.ttf and /dev/null differ diff --git a/css/orange/OpenSans-Italic.ttf b/css/orange/OpenSans-Italic.ttf deleted file mode 100644 index c90da48..0000000 Binary files a/css/orange/OpenSans-Italic.ttf and /dev/null differ diff --git a/css/orange/OpenSans-Regular.ttf b/css/orange/OpenSans-Regular.ttf deleted file mode 100644 index db43334..0000000 Binary files a/css/orange/OpenSans-Regular.ttf and /dev/null differ diff --git a/css/orange/OpenSansCondensed300.ttf b/css/orange/OpenSansCondensed300.ttf deleted file mode 100644 index 97c355b..0000000 Binary files a/css/orange/OpenSansCondensed300.ttf and /dev/null differ diff --git a/css/orange/profile.css b/css/orange/profile.css deleted file mode 100644 index 458260d..0000000 --- a/css/orange/profile.css +++ /dev/null @@ -1,238 +0,0 @@ -/************************************** -********************* PROFILE PHOTO *** -***************************************/ -.profile-card -{ - padding: 7px; - background: rgba( 255, 255, 255, .5 ); - border: solid 1px rgba( 69, 71, 77, .05 ); - position: relative; -} -.profile-card-main -{ - width: 540px; - text-align: center; - position: relative; - transition: all .2s linear; -} -.profile-card-main:before -{ - content: ""; - border: solid 0px #fff; - transition: all .2s linear; - position: absolute; - left: 1px; - top: 1px; - right: 1px; - bottom: 1px; - z-index: 0; -} -.profile-card-main * -{ - position: relative; - z-index: 1; -} -.profile-card-photo -{ - width: 74px; - height: 74px; - border: solid 6px #45474d; - border-radius: 40%; - border-top-right-radius: 0; - border-bottom-left-radius: 0; - box-sizing: content-box; - float:left; - top: 50%; - background-color: #a12a28; - -} -.profile-card-main h1 -{ - font-size: 24px; - font-weight: bold; - color: #fff; -} -.profile-card-main h2 -{ - color: #fff; -} -.profile-card .direct-messages, -.profile-card .direct-messages-with-user, -.profile-card .follow -{ - display: block; - position: absolute; - bottom: 20px; - right: 10px; - padding: 10px; - font-size: 12px; - width: 120px; - text-align: center; - color: rgba( 0, 0, 0, .7 ); - background: rgba( 0, 0, 0, .1 ); - border: none; - transition: all .2s linear; -} -.profile-card .follow -{ - right: 135px; -} -.profile-card .direct-messages:hover, -.profile-card .direct-messages-with-user:hover, -.profile-card .follow:hover -{ - background: rgba( 0, 0, 0, .3 ); -} -.profile-card.forEdition -{ - margin: 0 auto; - width: 540px; -} -.forEdition .profile-card-photo -{ - border: solid 2px #fff; - position: relative; - cursor: pointer; - transition: all .2s linear; -} -.forEdition .profile-card-main:hover:after, -.forEdition .profile-card-photo:after -{ - content: ""; - width: 36px; - height: 36px; - position: absolute; - top: 10px; - right: 10px; - background: url(../img/edit.png) no-repeat right top; -} -.forEdition .profile-card-main:hover:before -{ - border: solid 5px #fff; -} -.forEdition .profile-card-main h2 -{ - margin-bottom: 8px; -} -.forEdition .profile-card-main input -{ - display: block; - margin: 0 auto; - background: rgba( 0, 0, 0, .1 ); - border: none; - padding: 6px 4px; - color: #fff; - margin-bottom: 4px; - text-align: center; - transition: all .2s linear; -} -.forEdition .profile-card-main input:hover, -.forEdition .profile-card-main input:focus, -.forEdition .profile-card-photo:hover -{ - background: rgba( 0, 0, 0, .3 ); -} -.input-description -{ - width: 90%; -} -.input-name -{ - font-size: 20px; -} -.forEdition .profile-card-main .input-website, -.forEdition .profile-card-main .input-city -{ - display: inline-block; -} -.profile-edition-buttons -{ - padding: 10px; - text-align: right; -} -/************************************* -****************** PROFILE MODAL -**************************************/ -.profile-modal .modal-wrapper -{ - width: 580px; - border-radius: 5px; - overflow: hidden; - position: absolute; - top:10%; - height: 80%; - margin-left: -300px; - -} -.profile-modal .modal-content -{ - padding: 3px; - height: 90%; -} -.profile-modal .profile-data -{ - display: inline-block; - margin-left: -4px; - border-bottom: 0; -} -.profile-modal .postboard -{ - margin-left: 0; - padding: 5px 0 5px 0; - height: 75%; -} -.profile-modal .postboard h2 -{ - width: auto; -} -.profile-modal .postboard-posts -{ - display: block; - height: 90%; - overflow: auto; -} -.profile-modal .profile-card-main -{ - background: #45474d; - color: white; - width:100%; -} -.profile-modal .profile-card-main a { - color: #8bb9e0; -} -.profile-modal .postboard-posts .post -{ - padding: 0; -} -.profile-modal .post-interactions -{ - margin: 2px 10px 3px 60px; -} -.profile-modal .profile-card -{ - margin: 0; - padding: 0; -} -/* -.profile-card-main -{ - height: 200px; -} -*/ -.profile-modal .direct-messages, -.profile-modal .direct-messages-with-user, -.profile-modal .follow -{ - bottom: 10px; -} - -h1.profile-name { - display: inline; -} -h2.profile-screen-name { - display: inline; -} - -.profile-modal .modal-buttons { - display: none; -} \ No newline at end of file diff --git a/css/orange/style.css b/css/orange/style.css deleted file mode 100644 index 714bf9a..0000000 --- a/css/orange/style.css +++ /dev/null @@ -1,1574 +0,0 @@ -@font-face -{ - font-family: "Open Sans"; - src: url("OpenSans-Regular.ttf"); -} -@font-face -{ - font-family: "Open Sans"; - src: url("OpenSans-Bold.ttf"); - font-weight: bold; -} -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, -menu, nav, output, ruby, section, summary, -time, mark, audio, video, textarea -{ - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; - box-sizing: border-box; - font-family: 'Open Sans', sans-serif; -} -textarea, input -{ - outline: none; -} -ol, ul, li -{ - list-style: none; -} -a -{ - text-decoration: none; -} -a:hover -{ - text-decoration: underline; -} -blockquote, q -{ - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after -{ - content: ''; - content: none; -} -table -{ - border-collapse: collapse; - border-spacing: 0; -} -html, body -{ - height: 100%; - min-height: 100%; - background: #ede9dc; -} -h3 -{ - font-size: 14px; - color: rgba( 0, 0, 0, .5 ); -} -/************************************* -**************************** BUTTONS ** -**************************************/ -button -{ - background: #45474d; - color: rgba( 255, 255, 255, .8 ); - border: none; - padding: 5px 10px; - cursor: pointer; -} -button:hover -{ - color: #fff; -} -button.disabled -{ - opacity: .4; -} -button.disabled:hover -{ - color: rgba( 255, 255, 255, .8 ); -} -/************************************* -**************************** MENU ***** -**************************************/ -.userMenu -{ - width: 900px; - position: fixed; - left: 50%; - margin: 0 0 0 -450px; - height: 40px; - background: #45474d; - z-index: 2; -} -.userMenu:after -{ - content: ""; - position: absolute; - right: 0; - width: 34px; - height: 54px; - background: url(../img/twister_mini.png) no-repeat right 5px; -} -.userMenu > ul -{ -} -.userMenu > ul > li -{ - float: left; - margin: 0; -} -.userMenu > ul > li > a -{ - line-height: 40px; - height: 40px; - padding: 0 20px 0 45px; - display: inline-block; - color: #fff; - font-size: 14px; - font-weight: bold; - opacity: .7; - transition: all .2s linear; - position: relative; -} -.userMenu li > a:hover -{ - text-decoration: none; - opacity: 1; -} -.userMenu li.current > a -{ - color: #fff; - opacity: 1; -} -.userMenu li.userMenu-home > a -{ - background: url(../img/home.png) no-repeat 5px center; -} -.userMenu li.userMenu-home:hover > a -{ - background: url(../img/home.png) no-repeat 5px center rgba( 0, 0, 0 , .4 ); -} -.userMenu li.userMenu-home.current > a -{ - background: url(../img/home.png) no-repeat 5px center #b43e34; -} -.userMenu li.userMenu-connections > a -{ - background: url(../img/connections.png) no-repeat 5px center; - padding: 0 30px 0 20px; - opacity: 1; -} -.userMenu li.userMenu-connections:hover > a -{ - background: url(../img/connections.png) no-repeat 5px center rgba( 0, 0, 0 , .4 ); -} -.userMenu li.userMenu-connections.current > a -{ - background: url(../img/connections.png) no-repeat 5px center #b43e34; -} -.userMenu li.userMenu-network > a -{ - background: url(../img/network.png) no-repeat 5px center; -} -.userMenu li.userMenu-network:hover > a -{ - background: url(../img/network.png) no-repeat 5px center rgba( 0, 0, 0 , .4 ); -} -.userMenu li.userMenu-network.current > a -{ - background: url(../img/network.png) no-repeat 5px center #b43e34; -} -.userMenu li.userMenu-messages > a -{ - background: url(../img/messages.png) no-repeat center center; - padding: 0 25px 0 35px; - opacity: 1; -} -.userMenu li.userMenu-messages:hover > a -{ - background: url(../img/messages.png) no-repeat center center rgba( 0, 0, 0 , .4 ); -} -.userMenu li.userMenu-messages.current > a -{ - background: url(../img/messages.png) no-repeat center center #b43e34; -} -.userMenu li.userMenu-profile > a -{ - background: url(../img/profile.png) no-repeat 5px center; -} -.userMenu li.userMenu-profile:hover > a -{ - background: url(../img/profile.png) no-repeat 5px center rgba( 0, 0, 0 , .4 ); -} -.userMenu li.userMenu-profile.current > a -{ - background: url(../img/profile.png) no-repeat 5px center #b43e34; -} -.userMenu li.userMenu-config -{ - float: right; - position: relative; - margin-right: 40px; -} -.userMenu li.userMenu-search -{ - float: right; - position: relative; -} -.userMenu li.userMenu-config > a -{ - background: url(../img/config.png) no-repeat 5px center; - padding: 0 30px 0 45px; -} -.userMenu li.userMenu-config > a:after -{ - content: "▼"; - position: absolute; - font-size: 10px; - transition: all .2 linear; -} -.userMenu li.userMenu-config:hover > a, -.userMenu li.userMenu-config:active > a -{ - background: url(../img/config.png) no-repeat 5px center rgba( 0, 0, 0 , .4 ); -} -.userMenu li.userMenu-messages > a:empty -{ - padding: 0 20px 0 30px; - opacity: .7; -} -.wrapper -{ - width: 900px; - margin: 0 auto; - background: #f8f5ee; - padding: 55px 15px 15px 15px; - position: relative; - z-index: 1; - min-height: 100%; -} -.dashboard -{ - width: 320px; - position: fixed; - top: 55px; -} -.module -{ - border: solid 1px rgba( 69, 71, 77, .1 ); - background: #fff; -} -.messages-qtd -{ - position: absolute; - background: #b43e34; - color: #fff; - padding: 3px; - line-height: 12px; - font-size: 8px; - margin-top: 4px; -} -.userMenu-connections .messages-qtd -{ - margin: 4px 0 0 10px; -} -/******************************************************* -****************** CONFIG SUBMENU & SEARCH RESULTS ***** -*******************************************************/ -.dialog-modal -{ - display: none; - background: rgba( 255, 255, 255, 1 ); - position: absolute; - top: 45px; - right: 10px; - width: 250px; - box-shadow: 0 2px 5px #65686f; - border: solid 1px rgba( 69, 71, 77, .1 ); -} -.dialog-modal:after -{ - content:""; - width: 1px; - background: transparent; - position: absolute; - top: -10px; - right: 30px; - border-right: solid 10px transparent; - border-left: solid 10px transparent; - border-bottom: solid 10px rgba( 255, 255, 255, 1 ); -} -.userMenu-search .dialog-modal:after -{ - right: auto; - left: 80px; -} -.direct-messages, -.dropdown-menu-item -{ - display: block; - padding: 10px; - font-size: 12px; - border-top: solid 1px rgba( 69, 71, 77, .1 ); - color: rgba( 0, 0, 0, .7 ); -} -.direct-messages:hover, -.userMenu-search-sugestions a:hover, -.userMenu-search-profiles li:hover a -{ - background: #45474d; - color: #fff; -} -.userMenu-search-profiles li:hover span -{ - color: #fff; -} -.userMenu-search-profiles button -{ - position: absolute; - right: 5px; - bottom: 5px; - background: #fff; - z-index: 2; -} -.userMenu-search input[type="text"] -{ - float: right; - padding: 3px 10px; - margin: 9px 20px 0 0; - border-radius: 10px; - border: none; -} -.userMenu-search-sugestions -{ - border-bottom: solid 1px rgba( 69, 71, 77, .1 ); -} -.userMenu-search-sugestions a -{ - color: rgba( 0, 0, 0, .7 ); - padding: 5px 20px; - font-size: 12px; - display: block; -} -.userMenu-search-profiles a -{ - padding: 7px 4px; - display: block; - position: relative; - z-index: 1; -} -.userMenu-search-profiles .mini-profile-info -{ - padding: 0; -} -.userMenu-search-profiles .mini-profile-photo -{ - width: 36px; - height: 36px; - margin: 0 5px; -} -.userMenu-search-profiles .mini-profile-name -{ - font-size: 12px; - font-weight: bold; - color: rgba( 0, 0, 0, .7 ); - padding: 0 75px 0 15px; -} -/*********************************** -********************* MINI PROFILE -***********************************/ -.mini-profile -{ - margin-bottom: 10px; -} -.mini-profile-info -{ - position: relative; - padding: 5px; -} -.mini-profile-view -{ - display: block; - color: rgba( 0, 0, 0, .5 ); - font-size: 12px; - position: absolute; - top: 32px; - left: 65px; - z-index: 1; -} -.mini-profile-name -{ - padding: 10px 5px 30px 5px; - display: block; - position: relative; - z-index: 2; -} -.following-list .mini-profile-name -{ - padding: 5px 5px 5px 5px; -} -.profile-data -{ - border-left: none; - border-right: none; - height: 60px; -} -.profile-data li -{ - border-right: solid 1px rgba( 69, 71, 77, .1 ); - padding: 10px 15px 2px 10px; - float: left; - height: 100%; -} -.profile-data li:last-child -{ - border-right: none; -} -.profile-data li a -{ - color: rgba( 0, 0, 0, .5 ); - font-size: 13px; -} -.profile-data li a:hover -{ - color: #b43e34; -} -.profile-data li a span.posts-count, .profile-data li a span.following-count, .profile-data li a span.followers-count -{ - font-weight: bold; - display: block; - font-size: 16px; -} -.mini-profile-actions -{ - position: relative; - width: auto; - display: inline-block; -} -.mini-profile-actions span -{ - color: #e34f42; - cursor: pointer; - font-size: 14px; - display: inline-block; - width: 70px; - transition: all .2s linear; -} -.mini-profile-actions ul -{ - height: 0; - overflow: hidden; - position: absolute; - transition: height .2s linear; - background: #fff; - z-index: 3; -} -.mini-profile-actions:hover span -{ -} -.mini-profile-actions:hover span:after -{ -} -.mini-profile-actions:hover ul -{ - height: 118px; - box-shadow: 0 2px 5px #65686f; -} -.mini-profile-actions ul li -{ - white-space: nowrap; - color: rgba( 0, 0, 0, .7 ); - font-size: 13px; - cursor: pointer; - padding: 5px; - margin: 2px; -} -.mini-profile-actions ul li + li -{ - margin: 0 2px; -} -.mini-profile-actions:hover ul li:hover -{ - background: rgba( 0, 0, 0, .7 ); - color: #fff; -} -.mini-profile-info a:hover -{ - text-decoration: none; -} -/*********************************** -********************* POST AREA **** -***********************************/ -.post-area-new { - padding-bottom: 4px; -} -.post-area-new textarea -{ - resize: none; - width: 445px; - display: block; - transition: all .3s linear; - height: 28px; - border-radius: 3px; - border: solid 1px rgba(0, 0, 0, .3 ); - margin-left: 55px; - margin-bottom: 10px; - padding: 4px; - font-size: 13px; -} -.mini-profile .post-area-new -{ - padding: 9px; -} -.mini-profile .post-area-new textarea -{ - margin-left: 0; - width: 100%; -} -.post-area-new.open textarea -{ - height: 80px; - border: solid 1px rgba( 227, 79, 66, .5 ); - box-shadow: 0 0 10px rgba(0, 0, 0, .3 ); -} -.post-area-extras -{ - overflow: hidden; - height: 0; - text-align: right; -} -.post-submit -{ - background: #45474d; - color: rgba( 255, 255, 255, .8 ); - border: none; - padding: 5px 10px; - cursor: pointer; - display: inline-block; - margin-top: 4px; -} -.post-area-new.open > .post-area-extras -{ - height: 35px; - transition: all .6s linear; -} -.post-area-remaining -{ - font-size: 13px; -} -.post-area-remaining.warn -{ - color: #ff0000; -} -/*********************************** -********************* WHO TO FOLLOW -***********************************/ -.who-to-follow -{ - padding: 10px; -} -.who-to-follow h3 -{ - display: inline; -} -.twister-user -{ - clear: both; - padding-bottom: 10px; - margin-top: 4px; - border-bottom: solid 1px rgba( 69, 71, 77, .1 ); - border-top: solid 1px rgba( 69, 71, 77, .1 ); -} -.twister-user + .twister-user -{ - border-top: none; -} -.twister-user-photo -{ - margin: 5px; - display: inline-block; - float: left; - vertical-align: middle; - width: 48px; - height: 48px; - overflow: hidden; - border-radius: 20%; - /*transform: rotate( 45deg );*/ -} -.twister-user-info -{ - position: relative; -} -.twister-user-info span -{ - vertical-align: top; -} -.followers -{ - font-size: 12px; - color: rgba( 0, 0, 0, .6 ); -} -.followed-by -{ - color: #e34f42; - font-size: 13px; - cursor: pointer; -} -.twister-user-name, -.twister-by-user-name -{ - font-weight: bold; - font-size: 14px; - color: #e34f42; - text-decoration: none; -} -.twister-user-tag -{ - font-style: italic; - font-size: 12px; - opacity: .6; - margin-top: 4px; - display: inline-block; - letter-spacing: 0px; -} -.twister-user-remove -{ - float: right; - font-size: 12px; - margin: 5px; - opacity: .5; - text-decoration: none; - font-weight: bold; - cursor: pointer; - position: absolute; - top: 0; - right: 0; - font-size: 120%; -} -.twister-user-remove:hover -{ - opacity: 1; - text-decoration: none; -} -.follow -{ - background: none; - border: solid 1px rgba( 0, 0, 0 ,.2 ); - padding: 3px 15px; - color: rgba( 0, 0, 0 ,.4 ); -} -.follow:hover -{ - color: rgba( 0, 0, 0 ,.7 ); -} -.refresh-users, -.view-all-users -{ - color: #e34f42; - cursor: pointer; - font-size: 12px; - border-left: solid 1px rgba( 69, 71, 77, .1 ); - padding-left: 8px; -} -/*********************************** -********************* POST BOARD *** -***********************************/ -.postboard -{ - margin-left: 335px; - /*height: 150%;*/ - background: rgba( 255, 255, 255, .5 ); - border: solid 1px rgba( 69, 71, 77, .05 ); - padding: 10px; -} -.postboard h2 -{ - font-weight: bold; - line-height: 40px; - color: rgba( 255, 255, 255, 1 ); - font-variant: small-caps; - border-bottom: solid 1px rgba( 69, 71, 77, .1 ); - margin: 0 0 5px 0; - padding-left: 5px; - background: #e34f42; - width: 513px; -} -.postboard h2.fixed -{ - z-index: 2; - border-top: solid 4px #fbf9f6; -} -.postboard-posts -{ - position: relative; - z-index: 1; -} -.postboard-news -{ - float: right; - background: rgba( 0, 0, 0, .2 ); - border: none; - display: inline-block; - margin: 0; - color: rgba( 255, 255, 255, .8 ); - padding: 0 15px; - line-height: 40px; - cursor: pointer; - transition: all .2s linear; - -moz-transition: all .2s linear; -} -.postboard-news:hover -{ - color: #fff; - padding: 0 15px 0 25px; -} -.post, -.post .post, -.post .original.post, -.post .post.open -{ - background: #fff; - position: relative; - margin: 0 0 1px 0; - transition: background .1s linear; - -moz-transition: background .1s linear; -} -.post.open -{ - margin: 10px 0; -} -.postboard-posts > .post.open -{ - /*border-left: none; - border-right: none; - border-top: solid 2px #e34f42; - border-bottom: solid 2px #e34f42;*/ - border: none; -} -.postboard-posts > .post:after -{ - content: ""; - position: absolute; - right: 0; - top: 0; - width: 0; - height: 100%; - background: #e34f42; - transition: all .2s linear; -} -.postboard-posts > .post.open:after -{ - width: 5px; - /*right: -5px;*/ -} -.post:hover, -.post .post -{ - background: #ececed; -} -.post:hover -{ - cursor: pointer; -} -.post.open:hover -{ - background: #fff; -} -.post-photo, -.mini-profile-photo -{ - margin: 5px; - display: inline-block; - float: left; - vertical-align: middle; - width: 48px; - height: 48px; - overflow: hidden; - border-radius: 20%; - /*transform: rotate( 45deg );*/ -} -.post-photo img, -.mini-profile-photo img -{ - width: 48px; - height: 48px; -} -.post-info span -{ - vertical-align: top; -} -.post-info-name, -.mini-profile-name -{ - font-weight: bold; - font-size: 14px; - color: #e34f42; - text-decoration: none; - padding-left: 2px; -} -.post-info-tag -{ - font-style: italic; - font-size: 12px; - opacity: .6; - margin-top: 4px; - display: inline-block; - letter-spacing: 0px; -} -.post-info-time -{ - float: right; - font-size: 12px; - margin: 5px; - opacity: .5; - text-decoration: none; -} -.post-text -{ - font-size: 13px; - margin: 2px 10px 4px 60px; - word-wrap: break-word; -} -.post-context -{ - font-size: 11px; - margin: 2px 10px 4px 60px; -} -.post-text a, -.post-context a, -.mini-screen-name -{ - color: #e34f42; -} -.mini-screen-name -{ - font-size: 13px; - top: 40px; -} -.post-retransmited-icon -{ - display: inline-block; - width: 16px; - height: 16px; - background: url(../img/repost.png) no-repeat left center; - vertical-align: middle; -} -.post-interactions -{ - margin: 2px 10px 10px 60px; - text-align: right; - height: 23px; -} -.post-interactions span, -.post-expand -{ - color: #e34f42; - cursor: pointer; - font-size: 12px; -} -.post-expand -{ - position: absolute; - left: 60px; - padding-top: 3px; -} -.related .post-expand -{ - display: none; -} -.post-reply, -.post-propagate, -.post-favorite -{ - background: url(../img/reply.png) no-repeat left center; - padding-left: 18px; - margin-right: 3px; - opacity: .7; - display: none; -} -.post:hover .post-reply, -.post:hover .post-propagate, -.post:hover .post-favorite, -.original.open .post-interactions .post-reply, -.original.open .post-interactions .post-propagate, -.original.open .post-interactions .post-favorite, -.post:hover .original .post-interactions .post-reply, -.post:hover .original .post-interactions .post-propagate, -.post:hover .original .post-interactions .post-favorite -{ - display: inline-block; -} -.related.post:hover .post-reply, -.related.post:hover .post-propagate, -.related.post:hover .post-favorite -{ - display: inline-block; -} -.open .related .post-reply, -.open .related .post-propagate, -.open .related .post-favorite -{ - display: none!important; -} -.open .related:hover .post-reply, -.open .related:hover .post-propagate, -.open .related:hover .post-favorite -{ - display: inline-block!important; -} -.post-propagate -{ - background: url(../img/repost.png) no-repeat left center; -} -.post-favorite -{ - background: none; - padding-left: 0; -} -.post-favorite:before -{ - content: "★"; -} -.post-reply:hover, -.post-propagate:hover, -.post-favorite:hover -{ - text-decoration: underline; - opacity: 1; -} -.expanded-content -{ - display: none; - padding: 5px 5px 0 5px; -} -.post-stats -{ - margin: 0 10px 0 55px; - border-top: solid 1px rgba( 69, 71, 77, .1 ); - border-bottom: solid 1px rgba( 69, 71, 77, .1 ); -} -.post-stats li -{ - display: inline-block; -} -.post-stats li.stat-count -{ - border-right: solid 1px rgba( 69, 71, 77, .1 ); - padding-right: 10px; -} -.post-stats li.stat-count span -{ - display: block; - font-weight: bold; - color: rgba( 0, 0, 0, .5 ); - font-size: 13px; -} -.post-stats li.stat-count span:last-child -{ - font-weight: normal; -} -.post-stats a -{ - position: relative; -} -.post-stats a img -{ - width: 24px; - height: 24px; - border-radius: 100%; -} -.user-name-tooltip -{ - display: none; - position: absolute; - background: #e34f42; - font-size: 12px; - white-space: nowrap; - padding: 3px 5px; - color: #fff; - top: -42px; - left: 0px; - border-radius: 5px; -} -.user-name-tooltip:after -{ - content: ""; - position: absolute; - width: 0; - left: 4px; - bottom: -5px; - border-top: solid 5px #e34f42; - border-left: solid 5px transparent; - border-right: solid 5px transparent; -} -.post-stats a:hover .user-name-tooltip -{ - display: inline-block; -} -/*********************************** -******** LOGIN AND NETWORK PAGES *** -***********************************/ -.singleBlock -{ - background: rgba( 255, 255, 255, .5 ); - border: solid 1px rgba( 69, 71, 77, .05 ); - padding: 10px; -} -.singleBlock h2 -{ - font-weight: bold; - line-height: 40px; - color: rgba( 255, 255, 255, 1 ); - font-variant: small-caps; - border-bottom: solid 1px rgba( 69, 71, 77, .1 ); - margin: 15px 0 0 0; - padding-left: 5px; - background: #e34f42; -} -.singleBlock h3 -{ - font-weight: bold; - margin: 10px 20% 10px 10px; - border-bottom: solid 1px rgba( 0, 0, 0, .2 ); - padding-bottom: 10px; -} -.network.singleBlock ul -{ - padding-left: 20px; - margin-left: 20px; -} -.network.singleBlock ul li -{ - line-height: 36px; - font-size: 13px; - list-style: circle; -} -.network.singleBlock button -{ - padding: 3px 10px; -} -.network.singleBlock ul li > span -{ - font-weight: bold; - opacity: .7; -} -.singleBlock .spam-msg -{ - resize: none; - width: 100%; - display: block; - border-radius: 3px; - padding: 4px; - font-size: 13px; - height: 80px; - border: solid 1px rgba( 227, 79, 66, .5 ); - box-shadow: 0 0 10px rgba(0, 0, 0, .3 ); - line-height: 20px; - position: relative; - margin-left: -20px; - margin-bottom: 10px; -} -.highlight { - background: rgba(255, 230, 0, 0.5); - padding: 3px 5px; - margin: -3px -5px; - line-height: 1.7; - border-radius: 3px; - display:inline-block; -} -.connection-status -{ - border: 2px solid red; -} -.connection-status.connected -{ - border: 2px solid green; -} -.character-limit -{ - float: right; - margin-right: 18px; -} -/************************************* -**************************** POPUP MODAL -**************************************/ -.modal-blackout -{ - position: fixed; - width: 100%; - height: 100%; - left: 0; - top: 0; - background: rgba( 0, 0, 0, .6 ); - display: none; - z-index: 3; -} -.modal-blackout.reply .post -{ - background: #ececed; - padding: 10px 15px; -} -.modal-wrapper -{ - position: absolute; - top: 50%; - left: 50%; - background: rgba( 255, 255, 255, 1.0 ); - box-shadow: 0 0 30px rgba( 0, 0, 0, .6 ); -} -.modal-header -{ - position: relative; -} -.modal-header h3 -{ - padding: 5px; - font-weight: bold; - background: #e34f42; - color: #fff; -} -.modal-close -{ - position: absolute; - right: 0; - top: 0; - padding: 3px 10px; - cursor: pointer; - color: rgba( 255, 255, 255, .7 ); - font-weight: bold; - border-left: solid 1px rgba( 255, 255, 255, .3 ); - transition: all .1s linear; -} -.modal-close:hover -{ - color: #fff; - background: rgba( 0, 0, 0, .1 ); -} -.modal-back { - position: absolute; - right: 30px; - top: 0; - padding: 3px 10px; - cursor: pointer; - color: rgba( 255, 255, 255, .7 ); - font-weight: bold; - border-left: solid 1px rgba( 255, 255, 255, .3 ); - transition: all .1s linear; - display: none; -} -.modal-back:hover -{ - color: #fff; - background: rgba( 0, 0, 0, .1 ); -} -.modal-buttons -{ - padding: 10px; - text-align: right; -} -.modal-buttons button:last-child -{ - padding: 5px 20px; -} -/************************************* -****************** RETWIST POSTS MODAL -**************************************/ -.reTwist .modal-wrapper -{ - width: 520px; - margin: -100px 0 0 -260px; -} -.reTwist .post-expand, -.reTwist .post-interactions -{ - display: none; -} -/************************************* -****************** REPLY POSTS MODAL -**************************************/ -.reply .modal-wrapper -{ - width: 520px; - margin: -100px 0 0 -260px; -} -.reply .modal-buttons -{ - display: none; -} -.reply .post-expand, -.reply .post-interactions -{ - display: none; -} -/************************************* -****************** DIRECT MESSAGES MODAL -**************************************/ -.directMessages .modal-wrapper -{ - width: 540px; - height: 470px; - margin: -200px 0 0 -280px; - overflow-x: hidden; -} -.directMessages .modal-content -{ - overflow-y: auto; - height: 300px; -} -.directMessages .modal-buttons -{ - display: none; -} -.direct-messages-list .post -{ - padding: 10px 30px 10px 15px; - cursor: pointer; -} -.direct-messages-list .post:after -{ - content: "►"; - position: absolute; - right: 10px; - top: 50%; - margin: -6px 0 0 0; - color: rgba( 0, 0, 0, .4 ); -} -.direct-messages-thread -{ - padding: 10px; -} -.direct-messages-thread .post -{ - min-height: 82px; - margin-left: 65px; -} -.direct-messages-thread .post:after, -.direct-messages-thread .post:nth-child(2n):after -{ - content: ""; - width: 1px; - background: transparent; - position: absolute; - top: 25px; -} -.direct-messages-thread .post:after -{ - border-top: solid 10px transparent; - border-bottom: solid 10px transparent; - border-right: solid 10px #ececed; - left: -10px; -} -.direct-messages-thread .post-text -{ - margin: 2px 10px 4px 4px; - word-wrap: break-word; -} -.direct-messages-thread .post-photo -{ - position: absolute; - left: -65px; -} -.direct-messages-thread .post.sent -{ - margin-right: 60px; - margin-left: 0; -} -.direct-messages-thread .post.sent:after -{ - border-top: solid 10px transparent; - border-bottom: solid 10px transparent; - border-right: none; - border-left: solid 10px #ececed; - right: -10px; - left: auto; -} -.direct-messages-thread .post.sent .post-text -{ - margin: 2px 10px 4px 4px; -} -.direct-messages-thread .post.sent .post-photo -{ - position: absolute; - right: -65px; - left: auto; -} -/************************************* -****************** NEW USER MODAL -**************************************/ -.new-user .modal-wrapper -{ - width: 720px; - height: 400px; - margin: -200px 0 0 -280px; - overflow-x: hidden; - overflow-y: hidden; -} -.new-user .modal-content -{ - margin: 10px 10px 10px 10px; -} -.new-user .modal-buttons, -.new-user .modal-close -{ - display: none; -} -.new-user .text -{ - margin: 0 0 15px 0; -} -.new-user .emphasis -{ - font-size: 18px; - text-align: center; -} -.new-user .secret-key -{ - color: rgba( .5, 0, 0, 1.0 ); - font-weight: bold; -} -/************************************* -****************** HASHTAG MODAL -**************************************/ -.hashtag-modal .modal-wrapper -{ - width: 560px; - height: 470px; - margin: -200px 0 0 -280px; - overflow: hidden; -} -.hashtag-modal .modal-content -{ - overflow-y: auto; - height: 440px; -} -.hashtag-modal .modal-buttons -{ - display: none; -} -.hashtag-modal .postboard -{ - margin-left: 0; -} -/************************************* -****************** FOLLOWING MODAL -**************************************/ -.following-modal .modal-wrapper -{ - width: 560px; - height: 470px; - margin: -200px 0 0 -280px; - overflow-x: hidden; -} -.following-modal .modal-content -{ - padding: 15px; - height: 400px; - overflow-y: auto; -} -.following-modal .modal-buttons -{ - display: none; -} -.following-modal ol -{ - margin: 5px; -} -.following-modal .open-profile-modal:hover -{ - text-decoration: none; -} -.following-modal .open-profile-modal img -{ - float: none; -} -.following-modal .open-profile-modal span -{ - vertical-align: middle; -} -.following-modal .open-profile-modal span:hover -{ - text-decoration: underline; -} -/************************************* -****************** LOADER ************ -**************************************/ -.postboard-loading -{ - text-align: right; -} -.postboard-loading div -{ - display: inline-block; - width: 120px; - height: 10px; - background-color: #b43e34; - border-radius: 100px; - box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.05); - position: relative; - margin: 10px 0 0 0; -} -.postboard-loading div:after -{ - border-radius: 50px; - content: ""; - position: absolute; - background-color: white; - left: 2px; - top: 2px; - bottom: 2px; - z-index: 999; - animation-name: slide; - animation-duration: 1.5s; - animation-easing-function: linear; - animation-iteration-count: infinite; - -webkit-animation-name: slide; - -webkit-animation-duration: 1.5s; - -webkit-animation-easing-function: linear; - -webkit-animation-iteration-count: infinite; - -moz-animation-name: slide; - -moz-animation-duration: 1.5s; - -moz-animation-easing-function: linear; - -moz-animation-iteration-count: infinite; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); -} -@keyframes slide -{ - 0% { - right: 60px; - left: 2px; - } - - 5% { - left: 2px; - } - - 50% { - right: 2px; - left: 60px; - } - - 55% { - right: 2px; - } - - 100% { - right: 60px; - left: 2px; - } -} -@-webkit-keyframes slide -{ - 0% { - right: 100px; - left: 2px; - } - - 5% { - left: 2px; - } - - 50% { - right: 2px; - left: 100px; - } - - 55% { - right: 2px; - } - - 100% { - right: 100px; - left: 2px; - } -} -@-moz-keyframes slide -{ - 0% { - right: 60px; - left: 2px; - } - - 5% { - left: 2px; - } - - 50% { - right: 2px; - left: 60px; - } - - 55% { - right: 2px; - } - - 100% { - right: 60px; - left: 2px; - } -} - -/* Options */ -#playerVol { - float: right; - margin-right: 20px; -} -.volValue { - float: right; - margin-right: -163px; - font: 12px "Open Sans", sans-serif; -} -#notifyForm p, #choseLanguage p, #keysOpt p { - margin-top: 15px; -} - -/* Autocomplite*/ -.textcomplete-wrapper textarea { - display: inline; -} -ul.dropdown-menu { - position: absolute; - top: 23px; - left: 170px; - z-index: 100; - display: block; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #fff; - border: 1px solid rgba(0,0,0, .2); - border-radius: 6px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0,0,0, .2); - -moz-box-shadow: 0 5px 10px rgba(0,0,0, .2); - box-shadow: 0 5px 10px rgba(0,0,0, .2); - -} -ul.dropdown-menu li { - line-height: 20px; - -} -ul.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font: 13px/20px "Open Sans", sans-serif; - white-space: nowrap; - -webkit-transition: all 200ms; - -moz-transition: all 200ms; - -ms-transition: all 200ms; - -o-transition: all 200ms; - transition: all 200ms; -} diff --git a/css/style.css b/css/style.css index f4d7186..e947bce 100644 --- a/css/style.css +++ b/css/style.css @@ -378,6 +378,19 @@ input.userMenu-search-field:focus::-ms-input-placeholder { z-index: 1; min-height: 100%; } +.optionsPage:after, .profileEditPage:after, .loginPage:after +{ + content: ''; + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: .05; + z-index: -1; + background: url('../img/wrapperBg.png') repeat; +} .dashboard { width: 320px; diff --git a/following.html b/following.html index 5ffb435..b9aca5a 100644 --- a/following.html +++ b/following.html @@ -13,6 +13,7 @@ + @@ -39,8 +40,7 @@ - - - - - - -
+ + +
diff --git a/home.html b/home.html index 0a751b3..961e26b 100644 --- a/home.html +++ b/home.html @@ -13,6 +13,7 @@ + @@ -29,14 +30,11 @@ - @@ -44,8 +42,7 @@ - - - - - -
- - - - -
diff --git a/img/wrapperBg.png b/img/wrapperBg.png new file mode 100644 index 0000000..82331e7 Binary files /dev/null and b/img/wrapperBg.png differ diff --git a/js/calm.js b/js/calm.js index b6884f7..0309b2c 100644 --- a/js/calm.js +++ b/js/calm.js @@ -1,10 +1,15 @@ $(function(){ $('.post-text, #descWrap').on('click', 'a', function(e){e.stopPropagation();}); + $('#showqr').on('click', function(){ - if($('#qrcode img')[0]) return; + if($('#qrcode img')[0]) { + $('#qrcode').empty(); + return; + }; var skey = document.getElementById('skey').innerText; new QRCode(document.getElementById("qrcode"), skey); }); + $('.tox-ctc').on('click', function(){ window.prompt('Press Ctrl/Cmd+C to copy then Enter to close', $(this).attr('data')) }) diff --git a/js/interface_common.js b/js/interface_common.js index 92d3c71..aadfabe 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -400,7 +400,7 @@ var unfocusThis = function() } function replyTextKeypress(e) { - e = e || event; + var e = e || event; var $this = $( this ); var tweetForm = $this.parents("form"); if( tweetForm != undefined ) { @@ -418,21 +418,29 @@ function replyTextKeypress(e) { } else { $.MAL.disableButton(tweetAction); } + } +} - if(localStorage['keysSend'] == 1 && $('.dropdown-menu').css('display') == 'none'){ - if (e.keyCode === 13 && (!e.metaKey && !e.ctrlKey)) { - $this.val($this.val().trim()); - if( !tweetAction.hasClass("disabled")) { - tweetAction.click(); - } +var replyTextSendKeys = function(e) { + var $this = $(this); + var tweetAction = $this.parents("form").find('.post-submit'); + + if($.Options.getOption('keysSend', 2) === 1){ + if (!(e.metaKey || e.ctrlKey) && e.keyCode === 13) { + $this.val($this.val().trim()); + if( !tweetAction.hasClass("disabled")) { + tweetAction.click(); + } + }else if((e.metaKey || e.ctrlKey) && e.keyCode === 13){ + e.preventDefault(); + var val = $this.val(); + $this.val(val += '\r') } - }else if(localStorage['keysSend'] == 2){ - if (e.keyCode === 13 && (e.metaKey || e.ctrlKey)) { - - $this.val($this.val().trim()); - if( !tweetAction.hasClass("disabled") ) { - tweetAction.click(); - } + }else if($.Options.getOption('keysSend', 2) === 2){ + if ((e.metaKey || e.ctrlKey) && e.keyCode === 13) { + $this.val($this.val().trim()); + if( !tweetAction.hasClass("disabled") ) { + tweetAction.click(); } } } @@ -499,7 +507,8 @@ function initInterfaceCommon() { $( ".modal-propagate").click( retweetSubmit ); var $replyText = $( ".post-area-new textarea" ); - $replyText.on("keyup", replyTextKeypress ); + $replyText.on('keyup', replyTextKeypress ); + $replyText.on('keydown', replyTextSendKeys); $( ".open-profile-modal").bind( "click", openProfileModal ); $( ".open-hashtag-modal").bind( "click", openHashtagModal ); diff --git a/js/interface_localization.js b/js/interface_localization.js index 9738c2d..57576f2 100644 --- a/js/interface_localization.js +++ b/js/interface_localization.js @@ -6,8 +6,7 @@ // translators: add your language code here such as "es" for Spanish, "ru" for Russian var knownLanguages = ["en","es","nl","it","fr","ru","de","zh","ja","pt-BR","tr","uk"], preferredLanguage; -if(!localStorage['locLang'] || localStorage['locLang'] == 'auto'){ - if(!localStorage['locLang']) localStorage['locLang'] = 'auto'; +if($.Options.getOption('locLang', 'auto') === 'auto'){ // detect language with JavaScript preferredLanguage = window.navigator.userLanguage || window.navigator.language || "en"; if(knownLanguages.indexOf(preferredLanguage) > -1){ @@ -23,7 +22,7 @@ if(!localStorage['locLang'] || localStorage['locLang'] == 'auto'){ preferredLanguage = "en"; } }else{ - preferredLanguage = localStorage['locLang']; + preferredLanguage = $.Options.getOption('locLang', 'en'); } // set up Polyglot polyglot = new Polyglot(); diff --git a/js/mobile_abstract.js b/js/mobile_abstract.js index 40c3bfc..d8dc8ef 100644 --- a/js/mobile_abstract.js +++ b/js/mobile_abstract.js @@ -94,7 +94,7 @@ var MAL = function() newTweetsBar.text("Refresh"); } } else { - var newTweetsBar = $(".postboard-news"); + var newTweetsBar = $(".wrapper").find(".postboard-news"); if( newPosts ) { document.title = "(" + String(newPosts) + ") twister"; newTweetsBar.text(String(newPosts) + " new posts"); @@ -338,7 +338,7 @@ var MAL = function() $button.addClass("disabled"); $button.attr("disabled","true"); } - } + } this.changedUser = function() { if( $.hasOwnProperty("mobile") ) { @@ -351,6 +351,20 @@ var MAL = function() window.location.href = "home.html"; } } + + this.soundNotifyMentions = function() { + if( $.hasOwnProperty("mobile") ) { + } else { + $.Options.mensNotif(); + } + } + + this.soundNotifyDM = function() { + if( $.hasOwnProperty("mobile") ) { + } else { + $.Options.DMsNotif(); + } + } } jQuery.MAL = new MAL; diff --git a/js/options.js b/js/options.js index 46c8365..91050b4 100644 --- a/js/options.js +++ b/js/options.js @@ -1,147 +1,146 @@ -$(function() { - -}); +var TwisterOptions = function() +{ + this.getOption = function(optionName, defaultValue) { + var keyName = 'options:' + optionName; + if ($.localStorage.isSet(keyName)) { + return $.localStorage.get(keyName); + }else{ + return defaultValue; + } + }; -function soundNotifOptions() { - if(!localStorage['sndDM']) localStorage['sndDM'] = false; - if(!localStorage['sndMention']) localStorage['sndMention'] = false; - $('.sndOpt').each(function(){ - this.value = localStorage[this.id]; - }); + this.setOption = function(optionName, value) { + var keyName = 'options:' + optionName; + $.localStorage.set(keyName, value); + }; - var player = $('#player'); - player[0].pause(); - $('#player').empty(); + this.soundNotifOptions = function() { + $('.sndOpt').each(function(){ + this.value = $.Options.getOption(this.id, 'false'); + }); - $('.sndOpt').on('change',function(){ - localStorage.setItem(this.id, this.value); + var player = $('#player'); + player[0].pause(); + $('#player').empty(); - if(this.value == false) {player[0].pause(); return;} - if (player[0].canPlayType('audio/mpeg;')) { - player.attr('type', 'audio/mpeg'); - player.attr('src', 'sound/'+this.value+'.mp3'); - } else { - player.attr('type', 'audio/ogg'); - player.attr('src', 'sound/'+this.value+'.ogg'); - } - - player[0].play(); - }); -} -function volumeControl () { - var playerVol = $('#playerVol'); - if(!localStorage[playerVol[0].id]) localStorage[playerVol[0].id] = 1; - playerVol[0].value = localStorage[playerVol[0].id]; - $('.volValue').text((localStorage[playerVol[0].id] * 100).toFixed()); - - playerVol.on('change',function(){ - localStorage.setItem(this.id, this.value); - $('#player')[0].volume = (this.value); - $('.volValue').text((this.value * 100).toFixed()); - }); -} + $('.sndOpt').on('change',function(){ + $.Options.setOption(this.id, this.value); -function DMsNotif() { - if(localStorage['sndDM'] == "false") return; - var player = $('#player'); - $('#player').empty(); - - if (player[0].canPlayType('audio/mpeg;')) { - player.attr('type', 'audio/mpeg'); - player.attr('src', 'sound/'+localStorage['sndDM']+'.mp3'); - } else { - player.attr('type', 'audio/ogg'); - player.attr('src', 'sound/'+localStorage['sndDM']+'.ogg'); - } - player[0].volume = localStorage['playerVol']; - player[0].play(); -} + if(this.value == false) {player[0].pause(); return;} + if (player[0].canPlayType('audio/mpeg;')) { + player.attr('type', 'audio/mpeg'); + player.attr('src', 'sound/'+this.value+'.mp3'); + } else { + player.attr('type', 'audio/ogg'); + player.attr('src', 'sound/'+this.value+'.ogg'); + } + + player[0].play(); + }); + } -function mensNotif() { - if(localStorage['sndMention'] == "false") return; - var player = $('#player'); - $('#playerSec').empty(); - - if (player[0].canPlayType('audio/mpeg;')) { - player.attr('type', 'audio/mpeg'); - player.attr('src', 'sound/'+localStorage['sndMention']+'.mp3'); - } else { - player.attr('type', 'audio/ogg'); - player.attr('src', 'sound/'+localStorage['sndMention']+'.ogg'); - } - player[0].volume = localStorage['playerVol']; - player[0].play(); -}; + this.volumeControl = function() { + var playerVol = $('#playerVol'); -function keysSend() { - if(!localStorage['keysSend']) localStorage['keysSend'] = 1; - $('#keysSend')[0].value = localStorage['keysSend']; - - $('#keysSend').on('change', function(){ - localStorage[this.id] = this.value; - - }) -} + playerVol[0].value = $.Options.getOption(playerVol[0].id, 1) + + $('.volValue').text((playerVol[0].value * 100).toFixed()); + + playerVol.on('change',function(){ + $.Options.setOption(this.id, this.value) + $('#player')[0].volume = (this.value); + $('.volValue').text((this.value * 100).toFixed()); + }); + } -function setLang() { + this.DMsNotif = function() { + if($.Options.getOption('sndDM', 'false') === "false") return; + var player = $('#player'); + $('#player').empty(); - $('#language').val(localStorage['locLang'] || 'auto') - $('#language').on('change', function(){ - localStorage['locLang'] = $(this).val(); - location.reload(); - }) -} + if (player[0].canPlayType('audio/mpeg;')) { + player.attr('type', 'audio/mpeg'); + player.attr('src', 'sound/'+localStorage['sndDM']+'.mp3'); + } else { + player.attr('type', 'audio/ogg'); + player.attr('src', 'sound/'+localStorage['sndDM']+'.ogg'); + } + player[0].volume = $.Options.getOption('playerVol', 1); + player[0].play(); + } -function setTheme() { - if(!localStorage['theme']) localStorage['theme'] = 'calm'; - $('#theme').val(localStorage['theme']).on('change', function(){ - localStorage['theme'] = $(this).val(); - location.reload(); - }); + this.mensNotif = function() { + if($.Options.getOption('sndMention', 'false' === 'false')) return; -} + var player = $('#player'); + $('#playerSec').empty(); -function setShowPreviewOpt(){ - if(!localStorage['imagesPreview']) localStorage['imagesPreview'] = 'enable'; - if(!localStorage['imagesPreviewGif']) localStorage['imagesPreviewGif'] = 'true'; - if(!localStorage['youtubePreview']) localStorage['youtubePreview'] = 'enable'; - if(!localStorage['vimeoPreview']) localStorage['vimeoPreview'] = 'enable'; + if (player[0].canPlayType('audio/mpeg;')) { + player.attr('type', 'audio/mpeg'); + player.attr('src', 'sound/'+localStorage['sndMention']+'.mp3'); + } else { + player.attr('type', 'audio/ogg'); + player.attr('src', 'sound/'+localStorage['sndMention']+'.ogg'); + } + player[0].volume = $.Options.getOption('playerVol', 1); + player[0].play(); + }; - $('.previewOpt').each(function() { - this.value = localStorage[this.id]; - }) - - $('.gifCheckBox').prop('checked', localStorage['imagesPreviewGif'] === 'true') + this.keysSend = function() { + + $('#keysSend')[0].value = $.Options.getOption('keysSend', 2) + + $('#keysSend').on('change', function(){ + $.Options.setOption(this.id, this.value); - if(localStorage['imagesPreview'] == 'disable'){ - $('input[type="checkbox"]').prop('disabled', localStorage['imagesPreviewGif']) + }) } - - $('.previewOpt').on('change', function(){ - localStorage[this.id] = $(this).val(); - if (this.id === 'imagesPreview'){ - switch($(this).val()){ - case 'enable': $('.gifCheckBox').prop('disabled', false); break; - case 'disable': $('.gifCheckBox').prop('disabled', true); break; - } + + this.locLang = function() { + $('#locLang').val($.Options.getOption('locLang', 'auto')) + $('#locLang').on('change', function(){ + $.Options.setOption(this.id, this.value); + location.reload(); + }) + } + + this.showPreviewOpt = function() { + + $('.previewOpt').each(function() { + this.value = $.Options.getOption(this.id, 'enable'); + }) + + $('.gifCheckBox').prop('checked', $.Options.getOption('imagesPreviewGif', 'true')) + + if($.Options.getOption('imagesPreview', 'enable') === 'disable'){ + $('input[type="checkbox"]').prop('disabled', 'true') } - }) - - $('input[type="checkbox"]').on('click', function(){ - localStorage[$(this).attr('name')] = $(this).prop('checked') - }) -} + + $('.previewOpt').on('change', function(){ + $.Options.setOption(this.id, this.value) + if (this.id === 'imagesPreview'){ + switch(this.value){ + case 'enable': $('.gifCheckBox').prop('disabled', false); break; + case 'disable': $('.gifCheckBox').prop('disabled', true); break; + } + } + }) + + $('input[type="checkbox"]').on('click', function(){ + $.Options.setOption(this.name, this.checked) + }) + } + + this.initOptions = function() { + this.soundNotifOptions(); + this.volumeControl(); + this.keysSend(); + this.locLang(); + this.showPreviewOpt(); + } -function InitOptions() { - soundNotifOptions(); - volumeControl(); - keysSend(); - setLang(); - setTheme(); - setShowPreviewOpt(); } -function InitOptionsforHome() { - setShowPreviewOpt(); -} \ No newline at end of file + +jQuery.Options = new TwisterOptions; \ No newline at end of file diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index 096b3ae..e70552e 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -107,15 +107,15 @@ function postToElem( post, kind ) { var ytRegExp = /(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?/i; var vimeoRegExp = /http[s]?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/i; - if (postLink && localStorage['imagesPreview'] == 'enable' && (/(\.jpg)|(\.gif)|(\.png)|(\.jpeg)|(\.jpe)/i.test(postLink) || /https:\/\/img.bi/i.test(postLink))){ + if (postLink && $.Options.getOption('imagesPreview', 'enable') === 'enable' && (/(\.jpg)|(\.gif)|(\.png)|(\.jpeg)|(\.jpe)/i.test(postLink) || /https:\/\/img.bi/i.test(postLink))){ previewContainer.show(); previewContainer.append(imagePreview(postLink)); - }else if(postLink && ytRegExp.test(postLink) && localStorage['youtubePreview'] === 'enable'){ + }else if(postLink && ytRegExp.test(postLink) && $.Options.getOption('youtubePreview', 'enable') === 'enable'){ var ytid = postLink.match(ytRegExp) ? RegExp.$1 : false; previewContainer.show(); previewContainer.attr('data-youtube-id', ytid); previewContainer.append(getYoutubePreview(postLink, ytid)); - }else if(postLink && vimeoRegExp.test(postLink) && localStorage['vimeoPreview'] === 'enable'){ + }else if(postLink && vimeoRegExp.test(postLink) && $.Options.getOptions('vimeoPreview', 'enable') === 'enable'){ var vimid = postLink.match(vimeoRegExp) ? RegExp.$2 : false; previewContainer.show(); previewContainer.attr('data-vimeo-id', vimid); @@ -314,8 +314,9 @@ function imagePreview(link) { return ''; //imgBiJS(); }else{ - var cleanLink = link.replace(/^http[s]?:\/\//i, ''); - if(/\.gif\b/i.test(cleanLink) && localStorage['imagesPreviewGif'] == 'false') return; + var cleanLink; + if(/\.gif\b/i.test(cleanLink) && $.Options.getOption('imagesPreviewGif', 'true') === 'false') return; + cleanLink = link.replace(/^http[s]?:\/\//i, ''); return ''; } } diff --git a/js/twister_newmsgs.js b/js/twister_newmsgs.js index 5eb714f..c021187 100644 --- a/js/twister_newmsgs.js +++ b/js/twister_newmsgs.js @@ -18,17 +18,21 @@ function processMention(user, mentionTime, data) { if( mentionTime > curTime + 3600 ) { console.log("mention from the future will be ignored"); } else { + var newMentionsUpdated = false; if( !(key in _knownMentions) ) { - mensNotif(); // sound notification // mention must be somewhat recent compared to last known one to be considered new if( mentionTime + 3600 > _lastMentionTime ) { _newMentions++; + newMentionsUpdated = true; _lastMentionTime = mentionTime; } _knownMentions[key] = {mentionTime:mentionTime, data:data}; purgeOldMentions(); saveMentionsToStorage(); } + if(newMentionsUpdated){ + $.MAL.soundNotifyMentions(); + } } } @@ -158,7 +162,7 @@ function getNewDMsCount() { } } for (key in _newDMsPerUser){if(_newDMsPerUser[key] * 1)reslt = true}; - if(newDMs > 0 && reslt) DMsNotif(); //sound notification + if(newDMs > 0 && reslt) $.MAL.soundNotifyDM(); return newDMs; } diff --git a/login.html b/login.html index 072a58f..e401fa5 100644 --- a/login.html +++ b/login.html @@ -11,6 +11,7 @@ + @@ -19,7 +20,6 @@ - + @@ -33,8 +34,7 @@ - - - - - - - +
diff --git a/options.html b/options.html index e36e7f2..cb07fd9 100644 --- a/options.html +++ b/options.html @@ -11,6 +11,7 @@ + @@ -20,17 +21,17 @@ - - - - - - - +

Use language

- @@ -94,16 +73,6 @@
-
-

Theme

-
- -
-
-

Sound notifications

Mentions

@@ -141,19 +110,19 @@

Media links preview

Images preview

Youtube links preview

Vimeo links preview

diff --git a/profile-edit.html b/profile-edit.html index bda938b..72f3a12 100644 --- a/profile-edit.html +++ b/profile-edit.html @@ -11,6 +11,7 @@ + @@ -54,7 +55,7 @@ -
+
@@ -76,11 +77,12 @@
- Secret key:
- + Secret key:
+ +
-
+