diff options
| author | 2013-08-21 14:36:18 +0200 | |
|---|---|---|
| committer | 2013-08-21 14:36:18 +0200 | |
| commit | 9ae0652d9f88610e44be7409c0287bac1327a68e (patch) | |
| tree | 6ebdb1c002fddb52319de4365f0f67eedb1f9503 | |
| parent | 96a2076d5eab5473eaa6389f669c477ee81bffcb (diff) | |
Fix issue #131 : pied d'article
Ajout de la date et du lien vers site externe au pied des articles
Modification comportement raccourci "up" : si la fenêtre est sous
l'article actif, on remonte en haut de cet article. Si la fenêtre est au
début de l'article actif ou au-dessus, on remonte en haut de l'écran
| -rw-r--r-- | app/layout/nav_entries.phtml | 2 | ||||
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 2 | ||||
| -rw-r--r-- | app/views/javascript/main.phtml | 12 | ||||
| -rw-r--r-- | public/themes/default/freshrss.css | 10 | ||||
| -rw-r--r-- | public/themes/flat-design/freshrss.css | 10 |
5 files changed, 25 insertions, 11 deletions
diff --git a/app/layout/nav_entries.phtml b/app/layout/nav_entries.phtml index 101e7443e..5501f1725 100644 --- a/app/layout/nav_entries.phtml +++ b/app/layout/nav_entries.phtml @@ -1,5 +1,5 @@ <ul class="nav_entries"> <li class="item"><a class="previous_entry" href="#"><i class="icon i_prev"></i></a></li> - <li class="item"><a href="#"><i class="icon i_up"></i></a></li> + <li class="item"><a class="up" href="#"><i class="icon i_up"></i></a></li> <li class="item"><a class="next_entry" href="#"><i class="icon i_next"></i></a></li> </ul>
\ No newline at end of file diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 4f08bea7f..05b2a08e2 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -114,6 +114,8 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) { </div> </li> <?php } ?> + <li class="item date"><?php echo $item->date (); ?></li> + <li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"> </a></li> </ul> </div> </div> diff --git a/app/views/javascript/main.phtml b/app/views/javascript/main.phtml index 4c128b082..e81ae831a 100644 --- a/app/views/javascript/main.phtml +++ b/app/views/javascript/main.phtml @@ -313,6 +313,18 @@ function init_nav_entries() { next_entry(); return false; }); + $('.nav_entries a.up').click(function() { + var active_item = $(".flux.active"); + var windowTop = $(window).scrollTop(); + var item_top = active_item.position ().top; + + if(windowTop > item_top) { + $("html,body").scrollTop (item_top); + } else { + $("html,body").scrollTop (0); + } + return false; + }); } $(document).ready (function () { diff --git a/public/themes/default/freshrss.css b/public/themes/default/freshrss.css index cf32e9561..107318dde 100644 --- a/public/themes/default/freshrss.css +++ b/public/themes/default/freshrss.css @@ -262,7 +262,7 @@ .flux.not_read .flux_header .item.title { font-weight: bold; } - .flux_header .item.date { + .item.date { width: 200px; overflow: hidden; white-space: nowrap; @@ -272,11 +272,11 @@ color: #666; cursor: pointer; } - .flux_header .item.link { + .item.link { width: 40px; text-align: center; } - .flux_header .item.link a { + .item.link a { display: inline-block; width: 40px; height: 40px; @@ -284,7 +284,7 @@ background: url("icons/link.svg") center center no-repeat; vertical-align: middle; } - .flux_header .item.link a:hover { + .item.link a:hover { text-decoration: none; } @@ -553,7 +553,7 @@ .aside .btn-important, .aside .feeds .dropdown, .flux_header .item.website span, - .flux_header .item.date { + .item.date { display: none; } .flux_header .item.website { diff --git a/public/themes/flat-design/freshrss.css b/public/themes/flat-design/freshrss.css index d3a51d05e..193fa3d6f 100644 --- a/public/themes/flat-design/freshrss.css +++ b/public/themes/flat-design/freshrss.css @@ -256,7 +256,7 @@ body { .flux.not_read .flux_header .item.title { font-weight: bold; } - .flux_header .item.date { + .item.date { width: 200px; overflow: hidden; white-space: nowrap; @@ -266,11 +266,11 @@ body { color: #666; cursor: pointer; } - .flux_header .item.link { + .item.link { width: 40px; text-align: center; } - .flux_header .item.link a { + .item.link a { display: inline-block; width: 40px; height: 40px; @@ -278,7 +278,7 @@ body { background: url("icons/link.svg") center center no-repeat; vertical-align: middle; } - .flux_header .item.link a:hover { + .item.link a:hover { text-decoration: none; } @@ -559,7 +559,7 @@ body { .aside .btn-important, .aside .feeds .dropdown, .flux_header .item.website span, - .flux_header .item.date { + .item.date { display: none; } .flux_header .item.website { |
