diff --git a/app/controllers/indexController.php b/app/controllers/indexController.php index 7d42de67a..bd5f31b08 100755 --- a/app/controllers/indexController.php +++ b/app/controllers/indexController.php @@ -5,8 +5,6 @@ class indexController extends ActionController { View::appendScript (Url::display ('/scripts/smoothscroll.js')); View::appendScript (Url::display ('/scripts/shortcut.js')); View::appendScript (Url::display (array ('c' => 'javascript', 'a' => 'main'))); - View::appendScript (Url::display ('/scripts/endless_mode.js')); - View::appendScript (Url::display ('/scripts/read_mode.js')); $entryDAO = new EntryDAO (); $catDAO = new CategoryDAO (); diff --git a/app/layout/aside.phtml b/app/layout/aside.phtml index 82bd2b051..1432c10ca 100644 --- a/app/layout/aside.phtml +++ b/app/layout/aside.phtml @@ -17,10 +17,6 @@ -
  • - Mettre les flux à jour -
  • - conf)) { ?>
  • @@ -47,7 +43,7 @@
  • name (); ?> - nbFeed (); ?> flux (nbNotRead (); ?>) + nbNotRead (); ?> non lu
  • diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index de9b76775..5b2adae1e 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -19,9 +19,9 @@ partial ('persona'); ?> notification)) { ?> -
    -notification['content']; ?> -X +
    + notification['content']; ?> + X
    diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index fe9feb0e8..d116302d0 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -4,31 +4,24 @@ $params = Request::params (); ?> -nbPage > 1) { ?> - diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml index 711ed5b2c..429792b71 100644 --- a/app/views/index/index.phtml +++ b/app/views/index/index.phtml @@ -2,38 +2,38 @@
    + + conf) || is_logged ()) { ?> - Tout marquer comme luTout afficher + -->Tout afficher - -->Afficher les non lus + -->Afficher les non lus
    - entryPaginator->render ('pagination.phtml', 'page'); ?> -
    • conf) || is_logged ()) { ?> isRead ()) { ?> -   +    -   + --> 
    • feed (true); ?> -
    • name (); ?>
    • +
    • name (); ?>
    • title (); ?>

    • le date (); ?>
    • diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index cb8f0c0c4..7ea16737b 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -20,11 +20,11 @@ function slide (new_active, old_active) { old_active.removeClass ("active"); new_active.addClass ("active"); - if (hide_posts && !read_mode_on ) { + if (hide_posts) { old_active.children (".content").slideUp (500); new_active.children (".content").slideDown (500, function () { $.smoothScroll({ - offset: new_active.position ().top - 50 + offset: new_active.position ().top }); }); } else { @@ -104,7 +104,7 @@ function mark_favorite (active) { } function init_posts () { - if (hide_posts && !read_mode_on) { + if (hide_posts) { $(".post.flux:not(.active) .content").slideUp (); } @@ -212,10 +212,8 @@ $(document).ready (function () { redirect (url, false); }); shortcut.add("", function () { - url = $(".post.flux.active h1.title a").attr ("href"); + url = $(".post.flux.active .link a").attr ("href"); redirect (url, true); }); - - $("#categories").height ($('body').height () - $("#categories").position ().top); }); diff --git a/public/scripts/endless_mode.js b/public/scripts/endless_mode.js deleted file mode 100644 index 7a9840cd4..000000000 --- a/public/scripts/endless_mode.js +++ /dev/null @@ -1,41 +0,0 @@ -var url_next_page = ""; -var load = false; - -function load_more_refresh () { - if (url_next_page === undefined) { - $("#load_more").html ("Il n'y a rien à charger"); - $("#load_more").addClass ("disable"); - } else { - $("#load_more").html ("Charger plus d'articles"); - } -} - -function load_more_posts (f_callback) { - load = true; - $.get (url_next_page, function (data) { - $("#load_more").before ($("#stream .post", data)); - - url_next_page = $(".pagination:last li.pager-next a", data).attr ("href"); - - init_posts (); - load_more_refresh (); - if (typeof f_callback == 'function') { - f_callback.call (this); - } - load = false; - }); -} - -$(document).ready (function () { - url_next_page = $(".pagination:last li.pager-next a").attr ("href"); - $(".pagination:last").remove (); - - $("#stream").append (""); - load_more_refresh (); - - $("#load_more").click (function () { - load_more_posts (); - - return false; - }); -}); diff --git a/public/scripts/read_mode.js b/public/scripts/read_mode.js deleted file mode 100644 index 13b3ecf5a..000000000 --- a/public/scripts/read_mode.js +++ /dev/null @@ -1,85 +0,0 @@ -var read_mode_on = false; -var scroll_auto = false; - -function read_mode () { - read_mode_on = true; - - // global - $('#global').css({ - 'background': '#ddd' - }); - $('#main_aside').animate ({width: 0}, 500, function () { - $('#main_aside').hide (); - }); - $('#top').animate ({height: 0}, 500, function () { - $('#top').hide (); - }); - $('#main').animate({ - 'width': 800, - 'padding-left': ($(window).width() - 800) / 2, - }); - $('#main').css({ - 'background': '#ddd' - }); - $('#stream').addClass ('read_mode'); - $('ul.pagination').fadeOut (500); - - // posts - $('.post.flux .content').slideDown (500); - - // mode endless auto - scroll_auto = true; - $(window).scroll (function () { - offset = $('#load_more').offset (); - - if (offset.top - $(window).height () <= $(window).scrollTop () - && !load - && url_next_page !== undefined - && scroll_auto) { - load_more_posts (); - } - }); -} -function un_read_mode () { - read_mode_on = false; - - // global - $('#global').css({ - 'background': '#fafafa' - }); - $('#main_aside').show (); - $('#main_aside').animate ({width: 250}); - $('#top').show (); - $('#top').animate ({height: 50}); - $('#main').animate({ - 'width': '100%', - 'padding-left': 250, - }); - $('#main').css({ - 'background': '#fafafa' - }); - $('#stream').removeClass ('read_mode'); - $('ul.pagination').fadeIn (500); - - // posts - if (hide_posts) { - $('.post.flux .content').slideUp (500); - } - - // mode endless auto desactivé - scroll_auto = false; -} - -$(document).ready (function () { - $('#global').append (' '); - - $('a#read_mode').click (function () { - if (read_mode_on) { - un_read_mode (); - } else { - read_mode (); - } - - return false; - }); -}); diff --git a/public/theme/base.css b/public/theme/base.css index ec1d015d8..af2744c6e 100644 --- a/public/theme/base.css +++ b/public/theme/base.css @@ -5,7 +5,7 @@ html, body { height: 100%; font-size: 95%; - font-family: "Cantarell", "sans-serif"; + font-family: "Cantarell", "Helvetica", "Arial", "sans-serif"; } /* LIENS */ @@ -98,6 +98,35 @@ form { padding: 0 0 0 5px; font-weight: normal; } +.btn { + display: inline-block; + height: 30px; + padding: 5px 10px; + background: linear-gradient(#fff, #eee); + border-radius: 3px; + border: 1px solid #ddd; + border-bottom: 1px solid #aaa; + border-right: 1px solid #aaa; + color: #666; + text-shadow: 0px 1px 1px #ddd; + line-height: 30px; + vertical-align: middle; +} + .btn:hover { + background: linear-gradient(#fafafa, #f0f0f0); + text-decoration: none; + } + .btn:active { + box-shadow: 0px 2px 4px #e0e0e0 inset, 0px 1px 2px #fafafa; + } + +/* *** */ +.refresh { + display: inline-block; + width: 30px; + height: 30px; + background: url("refresh.svg") center center no-repeat; +} /* STRUCTURE */ #global { @@ -183,10 +212,6 @@ form { border: none; border-radius: 0; } - #main_aside { - position: fixed; - z-index: 10; - } #categories { height: 69%; overflow: auto; @@ -195,40 +220,25 @@ form { #main { display: table-cell; height: 100%; - max-width: 800px; - padding: 0 0 0 250px; line-height: 180%; background: #fafafa; vertical-align: top; } #top { - position: fixed; - top: 0; - width: 85%; - background: #eee; + width: 100%; + background: #fafafa; border-bottom: 1px solid #aaa; - box-shadow: 0 1px 3px #aaa; text-align: center; - z-index: 0; + padding: 5px 0; } - #top a { - display: inline-block; - height: 50px; - width: 50%; - line-height: 50px; - font-weight: bold; + #top .btn { + margin: 0 10px; } - #top a:hover { - background: #fafafa; - text-decoration: none; - } - #stream { - padding: 50px 0 0; - } #main .table { display: table; width: 100%; height: 100%; + table-layout: fixed; } #main .nothing { display: table-cell; @@ -253,13 +263,13 @@ form { line-height: 170%; } .post.flux .content h1, .post.flux .content h2, .post.flux .content h3 { - margin: 20px 0; + margin: 20px 0 5px; } .post.flux .content p { - margin: 20px 0; + margin: 10px 0; } .post.flux .content img { - margin: 10px; + margin: 0; border-radius: 5px; } .post.flux .content pre { @@ -308,12 +318,12 @@ form { vertical-align: middle; } .flux_header .item.manage { - width: 40px; + width: 50px; } .flux_header .item.manage .read { display: inline-block; - width: 16px; - height: 16px; + width: 25px; + height: 25px; background: url("read.svg") center center no-repeat; vertical-align: middle; } @@ -325,8 +335,8 @@ form { } .flux_header .item.manage .bookmark { display: inline-block; - width: 16px; - height: 16px; + width: 25px; + height: 25px; background: url("non-starred.svg") center center no-repeat; vertical-align: middle; } @@ -361,110 +371,49 @@ form { white-space: nowrap; text-overflow: ellipsis; text-align: right; + font-size: 10px; + color: #666; } .flux_header .item.link { - width: 25px; + width: 35px; text-align: center; } .flux_header .item.link a { display: inline-block; - width: 16px; - height: 16px; + width: 25px; + height: 25px; background: url("website.svg") center center no-repeat; vertical-align: middle; } .flux_header .item.link a:hover { text-decoration: none; } - -#stream.read_mode { - background: #fff; - box-shadow: 0 0 5px #000; -} - #stream.read_mode .post.flux { - border-left: 0; - padding: 50px 20px; - background: #fff; - } - #stream.read_mode .post.flux a { - color: #363; - } - #stream.read_mode .post.flux .content a { - text-decoration: underline; - } - #stream.read_mode .post.flux .content a:hover { - text-decoration: none; - } - #stream.read_mode .post.flux .after { - display: none; - } /*** PAGINATION ***/ .pagination { - height: 50px; + display: block; margin: 0; - list-style: none; + background: #fafafa; text-align: center; - font-size: 100%; - line-height: 50px; - } - .pagination li { + color: #333; + font-size: 80%; + line-height: 200%; + border-top: 1px solid #aaa; +} + .pagination .item { display: inline-block; - width: 30px; - height: 30px; - } - .pagination li.pager-next, .pagination li.pager-previous, .pagination li.pager-first, .pagination li.pager-last { - width: 100px; - } - .pagination li.pager-current { - font-weight: bold; - } - .pagination li a { - display: block; - color: #F09600; - } -a#load_more { - display: block; - height: 50px; - background: #eee; - line-height: 50px; - text-align: center; - font-weight: bold; - border-top: 1px solid #aaa; -} - a#load_more:hover { - background: #fff; - text-decoration: none; + padding: 5px 10px; } - a#load_more.disable { - cursor: default; - background: #eee; - color: #666; - } - -a#read_mode { - display: block; - position: fixed; - bottom: 0; - right: 0; - width: 50px; - height: 50px; - background: url("read_mode.png") 9px 9px no-repeat #ddd; - border-top: 1px solid #aaa; - border-left: 1px solid #aaa; - border-radius: 20px 0 0 0; - box-shadow: -2px -2px 5px #aaa; - transition: all 100ms linear 0s; -} - a#read_mode:hover { - width: 60px; - height: 60px; - background-color: #eee; - text-decoration: none; + .pagination .item a { + color: #333; + font-style: italic; + } + .pagination .item.pager-current { + font-weight: bold; } /*** NOTIFICATION ***/ -#notification { +.notification { position: fixed; bottom: 0; left: 25%; @@ -479,13 +428,13 @@ a#read_mode { color: #666; font-weight: bold; } - #notification.good { + .notification.good { background: #f4f899; } - #notification.bad { + .notification.bad { background: #f4a899; } - #notification a.close { + .notification a.close { display: inline-block; width: 25px; height: 25px; @@ -497,7 +446,7 @@ a#read_mode { line-height: 25px; color: #666; } - #notification a.close:hover { + .notification a.close:hover { text-decoration: none; } @@ -519,9 +468,12 @@ a#read_mode { #stream { padding: 0; } - .flux_header .item.website, + .flux_header .item.website span, .flux_header .item.date { - width: 100px; + display: none; + } + .flux_header .item.website { + width: 20px; } .post.flux .content { padding: 10px; diff --git a/public/theme/refresh.svg b/public/theme/refresh.svg new file mode 100644 index 000000000..11728fc5d --- /dev/null +++ b/public/theme/refresh.svg @@ -0,0 +1,31 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + + + +