diff options
Diffstat (limited to 'p')
| -rw-r--r-- | p/api/greader.php | 1 | ||||
| -rw-r--r-- | p/i/.gitignore | 1 | ||||
| -rw-r--r-- | p/scripts/main.js | 76 | ||||
| -rw-r--r-- | p/themes/Dark/dark.css | 6 | ||||
| -rw-r--r-- | p/themes/Flat/flat.css | 11 | ||||
| -rw-r--r-- | p/themes/Origine/origine.css | 20 | ||||
| -rw-r--r-- | p/themes/Screwdriver/metadata.json | 2 | ||||
| -rw-r--r-- | p/themes/Screwdriver/screwdriver.css | 23 | ||||
| -rw-r--r-- | p/themes/Screwdriver/template.css | 3 | ||||
| -rw-r--r-- | p/themes/base-theme/base.css | 12 |
10 files changed, 115 insertions, 40 deletions
diff --git a/p/api/greader.php b/p/api/greader.php index 7a961225f..5a6fdad7d 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -135,6 +135,7 @@ function checkCompatibility() { } if ((!array_key_exists('HTTP_AUTHORIZATION', $_SERVER)) && //Apache mod_rewrite trick should be fine (empty($_SERVER['SERVER_SOFTWARE']) || (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') === false)) && //nginx should be fine + (empty($_SERVER['SERVER_SOFTWARE']) || (stripos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') === false)) && //lighttpd should be fine ((!function_exists('getallheaders')) || (stripos(php_sapi_name(), 'cgi') !== false))) { //Main problem is Apache/CGI mode die('FAIL getallheaders! (probably)'); } diff --git a/p/i/.gitignore b/p/i/.gitignore new file mode 100644 index 000000000..03c88fd7a --- /dev/null +++ b/p/i/.gitignore @@ -0,0 +1 @@ +.htaccess diff --git a/p/scripts/main.js b/p/scripts/main.js index ae7b69364..2108eece2 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -297,7 +297,7 @@ function next_entry() { function prev_feed() { var active_feed = $("#aside_flux .feeds li.active"); if (active_feed.length > 0) { - active_feed.prev().find('a.feed').each(function(){this.click();}); + active_feed.prevAll(':visible:first').find('a.feed').each(function(){this.click();}); } else { last_feed(); } @@ -306,21 +306,21 @@ function prev_feed() { function next_feed() { var active_feed = $("#aside_flux .feeds li.active"); if (active_feed.length > 0) { - active_feed.next().find('a.feed').each(function(){this.click();}); + active_feed.nextAll(':visible:first').find('a.feed').each(function(){this.click();}); } else { first_feed(); } } function first_feed() { - var feed = $("#aside_flux .feeds.active li:first"); + var feed = $("#aside_flux .feeds.active li:visible:first"); if (feed.length > 0) { feed.find('a')[1].click(); } } function last_feed() { - var feed = $("#aside_flux .feeds.active li:last"); + var feed = $("#aside_flux .feeds.active li:visible:last"); if (feed.length > 0) { feed.find('a')[1].click(); } @@ -330,7 +330,7 @@ function prev_category() { var active_cat = $("#aside_flux .category.stick.active"); if (active_cat.length > 0) { - var prev_cat = active_cat.parent('li').prev().find('.category.stick a.btn'); + var prev_cat = active_cat.parent('li').prevAll(':visible:first').find('.category.stick a.btn'); if (prev_cat.length > 0) { prev_cat[0].click(); } @@ -344,7 +344,7 @@ function next_category() { var active_cat = $("#aside_flux .category.stick.active"); if (active_cat.length > 0) { - var next_cat = active_cat.parent('li').next().find('.category.stick a.btn'); + var next_cat = active_cat.parent('li').nextAll(':visible:first').find('.category.stick a.btn'); if (next_cat.length > 0) { next_cat[0].click(); } @@ -355,14 +355,14 @@ function next_category() { } function first_category() { - var cat = $("#aside_flux .category.stick:first"); + var cat = $("#aside_flux .category.stick:visible:first"); if (cat.length > 0) { cat.find('a.btn')[0].click(); } } function last_category() { - var cat = $("#aside_flux .category.stick:last"); + var cat = $("#aside_flux .category.stick:visible:last"); if (cat.length > 0) { cat.find('a.btn')[0].click(); } @@ -373,11 +373,41 @@ function collapse_entry() { var flux_current = $(".flux.current"); flux_current.toggleClass("active"); - if (isCollapsed) { + if (isCollapsed && auto_mark_article) { mark_read(flux_current, true); } } +function user_filter(key) { + console.log('user filter'); + console.warn(key); + var filter = $('#dropdown-query'); + var filters = filter.siblings('.dropdown-menu').find('.item.query a'); + if (typeof key === "undefined") { + if (!filter.length) { + return; + } + // Display the filter div + window.location.hash = filter.attr('id'); + // Force scrolling to the filter div + var scroll = needsScroll($('.header')); + if (scroll !== 0) { + $('html,body').scrollTop(scroll); + } + // Force the key value if there is only one action, so we can trigger it automatically + if (filters.length === 1) { + key = 1; + } else { + return; + } + } + // Trigger selected share action + key = parseInt(key); + if (key <= filters.length) { + filters[key - 1].click(); + } +} + function auto_share(key) { var share = $(".flux.current.active").find('.dropdown-target[id^="dropdown-share"]'); var shares = share.siblings('.dropdown-menu').find('.item a'); @@ -531,9 +561,19 @@ function init_shortcuts() { }, { 'disable_in_input': true }); + + shortcut.add(shortcuts.user_filter, function () { + user_filter(); + }, { + 'disable_in_input': true + }); for(var i = 1; i < 10; i++){ shortcut.add(i.toString(), function (e) { - auto_share(String.fromCharCode(e.keyCode)); + if ($('#dropdown-query').siblings('.dropdown-menu').is(':visible')) { + user_filter(String.fromCharCode(e.keyCode)); + } else { + auto_share(String.fromCharCode(e.keyCode)); + } }, { 'disable_in_input': true }); @@ -618,6 +658,13 @@ function init_shortcuts() { }, { 'disable_in_input': true }); + + shortcut.add(shortcuts.help, function () { + redirect(help_url, true); + }, { + 'disable_in_input': true + }); + } function init_stream(divStream) { @@ -663,7 +710,7 @@ function init_stream(divStream) { if (auto_mark_site) { divStream.on('click', '.flux .link > a', function () { - mark_read($(this).parent().parent().parent(), true); + mark_read($(this).parents(".flux"), true); }); } } @@ -1063,6 +1110,12 @@ function init_share_observers() { }); } +function init_stats_observers() { + $('#feed_select').on('change', function(e) { + redirect($(this).find(':selected').data('url')); + }); +} + function init_remove_observers() { $('.post').on('click', 'a.remove', function(e) { var remove_what = $(this).attr('data-remove'); @@ -1177,6 +1230,7 @@ function init_all() { init_remove_observers(); init_feed_observers(); init_password_observers(); + init_stats_observers(); } if (window.console) { diff --git a/p/themes/Dark/dark.css b/p/themes/Dark/dark.css index 5edc09042..2ef48c406 100644 --- a/p/themes/Dark/dark.css +++ b/p/themes/Dark/dark.css @@ -515,15 +515,13 @@ a.btn { .categories .feeds .item.empty.active { background: #c95; } -.categories .feeds .item.empty.active .feed { - color: #fff; -} .categories .feeds .item.error .feed { color: #a44; } .categories .feeds .item.error.active { background: #a44; } +.categories .feeds .item.empty.active .feed, .categories .feeds .item.error.active .feed { color: #fff; } @@ -570,7 +568,7 @@ a.btn { } .prompt form { margin: 10px auto 20px auto; - width: 180px; + width: 200px; } .prompt input { margin: 5px auto; diff --git a/p/themes/Flat/flat.css b/p/themes/Flat/flat.css index 4ae3e98e9..fcfbb1424 100644 --- a/p/themes/Flat/flat.css +++ b/p/themes/Flat/flat.css @@ -492,10 +492,6 @@ a.btn { .categories .feeds .item.active { background: #2980b9; } -.categories .feeds .item.active .feed, -.categories .feeds .item.empty.active .feed { - color: #fff; -} .categories .feeds .item.empty.active { background: #f39c12; } @@ -508,6 +504,11 @@ a.btn { .categories .feeds .item.error .feed { color: #bd362f; } +.categories .feeds .item.active .feed, +.categories .feeds .item.empty.active .feed, +.categories .feeds .item.error.active .feed { + color: #fff; +} .categories .feeds .item .feed { margin: 0; width: 165px; @@ -551,7 +552,7 @@ a.btn { } .prompt form { margin: 10px auto 20px auto; - width: 180px; + width: 200px; } .prompt input { margin: 5px auto; diff --git a/p/themes/Origine/origine.css b/p/themes/Origine/origine.css index 0b95e2d70..0d1d95bad 100644 --- a/p/themes/Origine/origine.css +++ b/p/themes/Origine/origine.css @@ -540,21 +540,23 @@ a.btn { .categories .feeds .item.active { background: #0062BE; } -.categories .feeds .item.active .feed { - color: #fff; -} -.categories .feeds .item.empty .feed { - color: #e67e22; -} .categories .feeds .item.empty.active { background: #e67e22; } -.categories .feeds .item.empty.active .feed { - color: #fff; +.categories .feeds .item.error.active { + background: #BD362F; +} +.categories .feeds .item.empty .feed { + color: #e67e22; } .categories .feeds .item.error .feed { color: #BD362F; } +.categories .feeds .item.active .feed, +.categories .feeds .item.empty.active .feed, +.categories .feeds .item.error.active .feed { + color: #fff; +} .categories .feeds .item .feed { margin: 0; width: 165px; @@ -598,7 +600,7 @@ a.btn { } .prompt form { margin: 10px auto 20px auto; - width: 180px; + width: 200px; } .prompt input { margin: 5px auto; diff --git a/p/themes/Screwdriver/metadata.json b/p/themes/Screwdriver/metadata.json index e04c6e806..f45f1a98a 100644 --- a/p/themes/Screwdriver/metadata.json +++ b/p/themes/Screwdriver/metadata.json @@ -2,6 +2,6 @@ "name": "Screwdriver", "author": "Mister aiR", "description": "C'est un cocktail ! C'est chaud mais « fresh » à la fois. Ce thème tue du chaton.", - "version": 1.0, + "version": 1.1, "files": ["template.css","screwdriver.css"] } diff --git a/p/themes/Screwdriver/screwdriver.css b/p/themes/Screwdriver/screwdriver.css index 683eece88..665f89c71 100644 --- a/p/themes/Screwdriver/screwdriver.css +++ b/p/themes/Screwdriver/screwdriver.css @@ -206,6 +206,10 @@ a.btn { background: linear-gradient(180deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; background: -webkit-linear-gradient(top, #EDE7DE 0%, #FFF 100%); } +#loginButton.btn{ + border:none; + box-shadow: 0px 1px rgba(255, 255, 255, 0.08) inset,0 -1px #171717,0px 1px rgba(255, 255, 255, 0.08); +} .nav_menu .btn.active, .nav_menu .btn:active, .nav_menu .dropdown-target:target ~ .btn.dropdown-toggle{ box-shadow: 0px 2px #E2972A; border-radius: 0; @@ -333,7 +337,7 @@ a.btn { .nav-head { margin: 0; background: linear-gradient(0deg, #EDE7DE 0%, #FFF 100%) #EDE7DE; - background: -webkit-linear-gradient(0deg, #EDE7DE 0%, #FFF 100%); + background: -webkit-linear-gradient(bottom, #EDE7DE 0%, #FFF 100%); text-align: right; } .nav-head .item { @@ -674,6 +678,15 @@ ul.feeds.active{ .prompt p { margin: 20px 0; } +.prompt input#username,.prompt input#passwordPlain{ + border:none; + box-shadow: 0px 1px rgba(255, 255, 255, 0.08) inset,0 -1px #171717,0px 1px rgba(255, 255, 255, 0.08); + background:#EDE7DE; +} +.prompt input#username:focus,.prompt input#passwordPlain:focus{ + border: solid 1px #E7AB34; + box-shadow: 0 0 3px #E7AB34; +} /*=== New article notification */ #new-article { @@ -755,13 +768,13 @@ ul.feeds.active{ } .flux .item.title { -text-decoration: line-through; +opacity: 0.35; } .flux.favorite .item.title { -text-decoration: none; +opacity: 1; } .flux.not_read .item.title { -text-decoration: none; +opacity: 1; } .flux.current .item.title a { color: #0f0f0f; @@ -1084,7 +1097,7 @@ text-decoration: none; text-align: center; background: #171717; box-shadow: 0 1px rgba(255,255,255,0.08); - border-radius: 0 0 0 5px; + border-radius: 0 8px 0 8px; } .aside .btn-important { display: inline-block; diff --git a/p/themes/Screwdriver/template.css b/p/themes/Screwdriver/template.css index bf421e322..ddb3f376f 100644 --- a/p/themes/Screwdriver/template.css +++ b/p/themes/Screwdriver/template.css @@ -309,6 +309,9 @@ a.btn { list-style: none; margin: 0; } +.state_unread li:not(.active)[data-unread="0"] { + display: none; +} .category { display: block; overflow: hidden; diff --git a/p/themes/base-theme/base.css b/p/themes/base-theme/base.css index c45b1812e..76ac37933 100644 --- a/p/themes/base-theme/base.css +++ b/p/themes/base-theme/base.css @@ -390,16 +390,18 @@ a.btn { /*=== Aside main page (feeds) */ .categories .feeds .item.active { } -.categories .feeds .item.active .feed { -} -.categories .feeds .item.empty .feed { -} .categories .feeds .item.empty.active { } -.categories .feeds .item.empty.active .feed { +.categories .feeds .item.error.active { +} +.categories .feeds .item.empty .feed { } .categories .feeds .item.error .feed { } +.categories .feeds .item.active .feed, +.categories .feeds .item.empty.active .feed, +.categories .feeds .item.error.active .feed { +} .categories .feeds .item .feed { margin: 0; width: 165px; |
