|
|
|
<div class="aside aside_flux" id="aside_flux">
|
|
|
|
<a class="toggle_aside" href="#close"><?php echo icon('close'); ?></a>
|
|
|
|
|
|
|
|
<ul class="categories">
|
|
|
|
<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
|
|
|
|
<li>
|
|
|
|
<div class="stick">
|
|
|
|
<a class="btn btn-important" href="<?php echo _url ('configure', 'feed'); ?>"><?php echo Translate::t ('subscription_management'); ?></a>
|
|
|
|
<a class="btn btn-important" href="<?php echo _url ('configure', 'categorize'); ?>" title="<?php echo Translate::t ('categories_management'); ?>"><?php echo icon('category-white'); ?></a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<?php } elseif (login_is_conf ($this->conf)) { ?>
|
|
|
|
<li><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Translate::t ('about_freshrss'); ?></a></li>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<div class="category all">
|
|
|
|
<a data-unread="<?php echo $this->nb_not_read; ?>" class="btn<?php echo $this->get_c == 'all' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>">
|
|
|
|
<?php echo icon('all'); ?>
|
|
|
|
<?php echo Translate::t ('all_feeds'); ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
<div class="category favorites">
|
|
|
|
<a data-unread="<?php echo $this->nb_favorites['unread']; ?>" class="btn<?php echo $this->get_c == 'favoris' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'favoris'); ?>">
|
|
|
|
<?php echo icon('bookmark'); ?>
|
|
|
|
<?php echo Translate::t ('favorite_feeds', $this->nb_favorites['all']); ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<?php foreach ($this->cat_aside as $cat) { ?>
|
|
|
|
<?php $feeds = $cat->feeds (); ?>
|
|
|
|
<?php if (!empty ($feeds)) { ?>
|
|
|
|
<li>
|
|
|
|
<?php $c_active = false; if ($this->get_c == $cat->id ()) { $c_active = true; } ?>
|
Grosse optimisation JavaScript
* Fusion de endless_mode.js dans main.js car endless_mode.js est
toujours chargé et assez petit.
* Suppression des changements de style en JavaScript lors du chargement
(genre boucle de .hide(), ou d'ajout de classe ".stick") et
implémentation en PHP + CSS à la place.
* Chargement JavaScript asynchrone (defer + async) pour de meilleurs
performances.
* Utilisation préférable des événements globaux plutôt que des
événements pour chaque élément avec jQuery.on(events, selector) pour un
chargement plus rapide et moins de mémoire utilisée.
* Optimisation manuelle du JavaScript (sélecteurs CSS plus performants,
méthodes jQuery plus appropriées, etc.).
* Désactivation de init_img() qui était coûteux, lancé à un moment où
les images ne sont de toute manière pas encore chargées, et qui
n'apporte rien car il y a déjà un img {max-width:100%} en CSS.
* JavaScript en mode strict.
* Enfin, passage du code JavaScript dans JSLint et du coup nombreuses
corrections (syntaxe, variables, méthodes dépréciées...).
* Devrait permettre de fermer
https://github.com/marienfressinaud/FreshRSS/issues/121
* Au passage, quelques simplifications CSS pour de meilleures
performances.
11 years ago
|
|
|
<div class="category stick<?php echo $c_active ? ' active' : ''; ?>">
|
|
|
|
<a data-unread="<?php echo $cat->nbNotRead (); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id ()); ?>"><?php echo $cat->name (); ?></a>
|
|
|
|
<a class="btn dropdown-toggle" href="#"><?php echo icon($c_active ? 'up' : 'down'); ?></a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<ul class="feeds<?php echo $c_active ? ' active' : ''; ?>">
|
|
|
|
<?php foreach ($feeds as $feed) {
|
|
|
|
$feed_id = $feed->id (); $nbEntries = $feed->nbEntries ();
|
|
|
|
$f_active = ($this->get_f == $feed_id);
|
|
|
|
?>
|
|
|
|
<li id="f_<?php echo $feed_id; ?>" class="item<?php echo $f_active ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>">
|
|
|
|
<div class="dropdown">
|
|
|
|
<div class="dropdown-target"></div>
|
|
|
|
<a class="dropdown-toggle" data-fweb="<?php echo $feed->website (); ?>"><?php echo icon('configure'); ?></a>
|
|
|
|
<?php /* feed_config_template */ ?>
|
|
|
|
</div>
|
|
|
|
<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />
|
|
|
|
<a class="feed" data-unread="<?php echo $feed->nbNotRead (); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed_id); ?>"><?php echo $feed->name(); ?></a>
|
|
|
|
</li>
|
|
|
|
<?php } ?>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<?php } } ?>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<span class="aside_flux_ender"><!-- For fixed menu --></span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script id="feed_config_template" type="text/html">
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li class="dropdown-close"><a href="#close">❌</a></li>
|
|
|
|
<li class="item"><a href="<?php echo _url ('index', 'index', 'get', 'f_!!!!!!'); ?>"><?php echo Translate::t ('filter'); ?></a></li>
|
|
|
|
<li class="item"><a target="_blank" href="http://example.net/"><?php echo Translate::t ('see_website'); ?></a></li>
|
|
|
|
<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
|
|
|
|
<li class="separator"></li>
|
|
|
|
<li class="item"><a href="<?php echo _url ('configure', 'feed', 'id', '!!!!!!'); ?>"><?php echo Translate::t ('administration'); ?></a></li>
|
|
|
|
<li class="item"><a href="<?php echo _url ('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo Translate::t ('actualize'); ?></a></li>
|
|
|
|
<li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', 'f_!!!!!!'); ?>"><?php echo Translate::t ('mark_read'); ?></a></li>
|
|
|
|
<?php } ?>
|
|
|
|
</ul>
|
|
|
|
</script>
|