Explorar o código

Nouvelle fonction icon() pour générer le code HTML des icônes

Centralisation de la génération du code des icônes pour pouvoir plus
facilement le changer, en particulier en préparation d'améliorations
futures :
* ajouter des alternatives lorsque l'image n'est pas affichée ;
* améliorer l'accessibilité ;
* permettre de changer les icônes selon le thème graphique choisi ;
* simplifier les CSS.

Contribue à https://github.com/marienfressinaud/FreshRSS/issues/284
Alexandre Alapetite %!s(int64=12) %!d(string=hai) anos
pai
achega
29137c0b04

+ 2 - 2
app/layout/aside_feed.phtml

@@ -7,7 +7,7 @@
 			<div class="dropdown">
 			<div class="dropdown">
 				<div id="dropdown-cat" class="dropdown-target"></div>
 				<div id="dropdown-cat" class="dropdown-target"></div>
 
 
-				<a class="dropdown-toggle btn" href="#dropdown-cat"><i class="icon i_down">▽</i></a>
+				<a class="dropdown-toggle btn" href="#dropdown-cat"><?php echo icon('down'); ?></a>
 				<ul class="dropdown-menu">
 				<ul class="dropdown-menu">
 					<li class="dropdown-close"><a href="#close">❌</a></li>
 					<li class="dropdown-close"><a href="#close">❌</a></li>
 
 
@@ -34,7 +34,7 @@
 					</li>
 					</li>
 				</ul>
 				</ul>
 			</div>
 			</div>
-			<button class="btn" type="submit"><i class="icon i_add">✚</i></button>
+			<button class="btn" type="submit"><?php echo icon('add'); ?></button>
 		</div>
 		</div>
 	</form></li>
 	</form></li>
 
 

+ 6 - 6
app/layout/aside_flux.phtml

@@ -1,12 +1,12 @@
 <div class="aside aside_flux" id="aside_flux">
 <div class="aside aside_flux" id="aside_flux">
-	<a class="toggle_aside" href="#close"><i class="icon i_close">❌</i></a>
+	<a class="toggle_aside" href="#close"><?php echo icon('close'); ?></a>
 
 
 	<ul class="categories">
 	<ul class="categories">
 		<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
 		<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
 		<li>
 		<li>
 			<div class="stick">
 			<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', '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'); ?>"><i class="icon i_category">☷</i></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>
 			</div>
 		</li>
 		</li>
 		<?php } elseif (login_is_conf ($this->conf)) { ?>
 		<?php } elseif (login_is_conf ($this->conf)) { ?>
@@ -16,7 +16,7 @@
 		<li>
 		<li>
 			<div class="category all">
 			<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'); ?>">
 				<a data-unread="<?php echo $this->nb_not_read; ?>" class="btn<?php echo $this->get_c == 'all' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>">
-					<i class="icon i_all">☰</i>
+					<?php echo icon('all'); ?>
 					<?php echo Translate::t ('all_feeds'); ?>
 					<?php echo Translate::t ('all_feeds'); ?>
 				</a>
 				</a>
 			</div>
 			</div>
@@ -25,7 +25,7 @@
 		<li>
 		<li>
 			<div class="category favorites">
 			<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'); ?>">
 				<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'); ?>">
-					<i class="icon i_bookmark">★</i>
+					<?php echo icon('bookmark'); ?>
 					<?php echo Translate::t ('favorite_feeds', $this->nb_favorites['all']); ?>
 					<?php echo Translate::t ('favorite_feeds', $this->nb_favorites['all']); ?>
 				</a>
 				</a>
 			</div>
 			</div>
@@ -38,7 +38,7 @@
 			<?php $c_active = false; if ($this->get_c == $cat->id ()) { $c_active = true; } ?>
 			<?php $c_active = false; if ($this->get_c == $cat->id ()) { $c_active = true; } ?>
 			<div class="category stick<?php echo $c_active ? ' active' : ''; ?>">
 			<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 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="#"><i class="icon <?php echo $c_active ? 'i_up' : 'i_down'; ?>"><?php echo $c_active ? '△' : '▽'; ?></i></a>
+				<a class="btn dropdown-toggle" href="#"><?php echo icon($c_active ? 'up' : 'down'); ?></a>
 			</div>
 			</div>
 
 
 			<ul class="feeds<?php echo $c_active ? ' active' : ''; ?>">
 			<ul class="feeds<?php echo $c_active ? ' active' : ''; ?>">
@@ -49,7 +49,7 @@
 				<li id="f_<?php echo $feed_id; ?>" class="item<?php echo $f_active ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>">
 				<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">
 						<div class="dropdown-target"></div>
 						<div class="dropdown-target"></div>
-						<a class="dropdown-toggle" data-fweb="<?php echo $feed->website (); ?>"><i class="icon i_configure">⚙</i></a>
+						<a class="dropdown-toggle" data-fweb="<?php echo $feed->website (); ?>"><?php echo icon('configure'); ?></a>
 <?php /* feed_config_template */ ?>
 <?php /* feed_config_template */ ?>
 					</div>
 					</div>
 					<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />
 					<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />

+ 6 - 6
app/layout/header.phtml

@@ -1,9 +1,9 @@
 <?php if (login_is_conf ($this->conf)) { ?>
 <?php if (login_is_conf ($this->conf)) { ?>
 <ul class="nav nav-head nav-login">
 <ul class="nav nav-head nav-login">
 	<?php if (!is_logged ()) { ?>
 	<?php if (!is_logged ()) { ?>
-	<li class="item"><i class="icon i_login">🔒</i> <a class="signin" href="#"><?php echo Translate::t ('login'); ?></a></li>
+	<li class="item"><?php echo icon('login'); ?> <a class="signin" href="#"><?php echo Translate::t ('login'); ?></a></li>
 	<?php } else { ?>
 	<?php } else { ?>
-	<li class="item"><i class="icon i_logout">🔓</i> <a class="signout" href="#"><?php echo Translate::t ('logout'); ?></a></li>
+	<li class="item"><?php echo icon('logout'); ?> <a class="signout" href="#"><?php echo Translate::t ('logout'); ?></a></li>
 	<?php } ?>
 	<?php } ?>
 </ul>
 </ul>
 <?php } ?>
 <?php } ?>
@@ -42,7 +42,7 @@
 				<input type="hidden" name="state" value="<?php echo $state; ?>" />
 				<input type="hidden" name="state" value="<?php echo $state; ?>" />
 				<?php } ?>
 				<?php } ?>
 
 
-				<button class="btn" type="submit"><i class="icon i_search">🔍</i></button>
+				<button class="btn" type="submit"><?php echo icon('search'); ?></button>
 			</div>
 			</div>
 		</form>
 		</form>
 		<?php } ?>
 		<?php } ?>
@@ -53,7 +53,7 @@
 		<div class="dropdown">
 		<div class="dropdown">
 			<div id="dropdown-configure" class="dropdown-target"></div>
 			<div id="dropdown-configure" class="dropdown-target"></div>
 
 
-			<a class="btn dropdown-toggle" href="#dropdown-configure"><i class="icon i_configure">⚙</i></a>
+			<a class="btn dropdown-toggle" href="#dropdown-configure"><?php echo icon('configure'); ?></a>
 			<ul class="dropdown-menu">
 			<ul class="dropdown-menu">
 				<li class="dropdown-close"><a href="#close">❌</a></li>
 				<li class="dropdown-close"><a href="#close">❌</a></li>
 				<li class="dropdown-header"><?php echo Translate::t ('configuration'); ?></li>
 				<li class="dropdown-header"><?php echo Translate::t ('configuration'); ?></li>
@@ -64,7 +64,7 @@
 				<li class="item"><a href="<?php echo _url ('index', 'logs'); ?>"><?php echo Translate::t ('logs'); ?></a></li>
 				<li class="item"><a href="<?php echo _url ('index', 'logs'); ?>"><?php echo Translate::t ('logs'); ?></a></li>
 				<?php if (login_is_conf ($this->conf) && is_logged ()) { ?>
 				<?php if (login_is_conf ($this->conf) && is_logged ()) { ?>
 				<li class="separator"></li>
 				<li class="separator"></li>
-				<li class="item"><a class="signout" href="#"><i class="icon i_logout">🔓</i> <?php echo Translate::t ('logout'); ?></a></li>
+				<li class="item"><a class="signout" href="#"><?php echo icon('logout'); ?> <?php echo Translate::t ('logout'); ?></a></li>
 				<?php } ?>
 				<?php } ?>
 			</ul>
 			</ul>
 		</div>
 		</div>
@@ -73,7 +73,7 @@
 
 
 	if (login_is_conf ($this->conf) && !is_logged ()) { ?>
 	if (login_is_conf ($this->conf) && !is_logged ()) { ?>
 	<div class="item configure">
 	<div class="item configure">
-		<i class="icon i_login">🔒</i> <a class="signin" href="#"><?php echo Translate::t ('login'); ?></a>
+		<?php echo icon('login'); ?> <a class="signin" href="#"><?php echo Translate::t ('login'); ?></a>
 	</div>
 	</div>
 	<?php } ?>
 	<?php } ?>
 </div>
 </div>

+ 1 - 1
app/layout/layout.phtml

@@ -36,7 +36,7 @@
 ?>
 ?>
 <div class="notification <?php echo $this->notification['type']; ?>">
 <div class="notification <?php echo $this->notification['type']; ?>">
 	<?php echo $this->notification['content']; ?>
 	<?php echo $this->notification['content']; ?>
-	<a class="close" href=""><i class="icon i_close">❌</i></a>
+	<a class="close" href=""><?php echo icon('close'); ?></a>
 </div>
 </div>
 <?php } ?>
 <?php } ?>
 	</body>
 	</body>

+ 3 - 3
app/layout/nav_entries.phtml

@@ -1,5 +1,5 @@
 <ul id="nav_entries">
 <ul id="nav_entries">
-	<li class="item"><a class="previous_entry" href="#"><i class="icon i_prev">⏪</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>
+	<li class="item"><a class="previous_entry" href="#"><?php echo icon('prev'); ?></a></li>
+	<li class="item"><a class="up" href="#"><?php echo icon('up'); ?></a></li>
+	<li class="item"><a class="next_entry" href="#"><?php echo icon('next'); ?></a></li>
 </ul>
 </ul>

+ 4 - 4
app/layout/nav_menu.phtml

@@ -1,8 +1,8 @@
 <div class="nav_menu">
 <div class="nav_menu">
-	<a class="btn toggle_aside" href="#aside_flux"><i class="icon i_category">☷</i></a>
+	<a class="btn toggle_aside" href="#aside_flux"><?php echo icon('category-white'); ?></a>
 
 
 	<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
 	<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
-	<a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><i class="icon i_refresh">↻</i></a>
+	<a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo icon('refresh'); ?></a>
 
 
 	<?php
 	<?php
 		$get = false;
 		$get = false;
@@ -62,7 +62,7 @@
 		<div class="dropdown">
 		<div class="dropdown">
 			<div id="dropdown-read" class="dropdown-target"></div>
 			<div id="dropdown-read" class="dropdown-target"></div>
 
 
-			<a class="dropdown-toggle btn" href="#dropdown-read"><i class="icon i_down">▽</i></a>
+			<a class="dropdown-toggle btn" href="#dropdown-read"><?php echo icon('down'); ?></a>
 			<ul class="dropdown-menu">
 			<ul class="dropdown-menu">
 				<li class="dropdown-close"><a href="#close">❌</a></li>
 				<li class="dropdown-close"><a href="#close">❌</a></li>
 
 
@@ -93,7 +93,7 @@
 	?>
 	?>
 	<div class="dropdown" id="nav_menu_views">
 	<div class="dropdown" id="nav_menu_views">
 		<div id="dropdown-views" class="dropdown-target"></div>
 		<div id="dropdown-views" class="dropdown-target"></div>
-		<a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Translate::t ('display'); ?> <i class="icon i_down">▽</i></a>
+		<a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Translate::t ('display'); ?> <?php echo icon('down'); ?></a>
 		<ul class="dropdown-menu">
 		<ul class="dropdown-menu">
 			<li class="dropdown-close"><a href="#close">❌</a></li>
 			<li class="dropdown-close"><a href="#close">❌</a></li>
 
 

+ 1 - 1
app/views/configure/categorize.phtml

@@ -22,7 +22,7 @@
 				(<?php echo Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
 				(<?php echo Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
 
 
 				<?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
 				<?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
-				<i class="icon i_help">ⓘ</i> <?php echo Translate::t ('can_not_be_deleted'); ?>
+				<?php echo icon('help'); ?> <?php echo Translate::t ('can_not_be_deleted'); ?>
 				<?php } ?>
 				<?php } ?>
 
 
 				<input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />
 				<input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />

+ 5 - 5
app/views/configure/display.phtml

@@ -56,7 +56,7 @@
 			<?php $token = $this->conf->token (); ?>
 			<?php $token = $this->conf->token (); ?>
 			<div class="group-controls">
 			<div class="group-controls">
 				<input type="text" id="token" name="token" value="<?php echo $token; ?>"  placeholder="<?php echo Translate::t ('blank_to_disable'); ?>"/>
 				<input type="text" id="token" name="token" value="<?php echo $token; ?>"  placeholder="<?php echo Translate::t ('blank_to_disable'); ?>"/>
-				<i class="icon i_help">ⓘ</i> <?php echo Translate::t('explain_token', Url::display(null, 'html', true), $token); ?>
+				<?php echo icon('help'); ?> <?php echo Translate::t('explain_token', Url::display(null, 'html', true), $token); ?>
 			</div>
 			</div>
 		</div>
 		</div>
 	
 	
@@ -162,12 +162,12 @@
 				<thead>
 				<thead>
 					<tr>
 					<tr>
 						<th> </th>
 						<th> </th>
-						<th><a class="icon read" title="<?php echo Translate::t ('mark_read'); ?>">☑</a></th>
-						<th><a class="icon bookmark" title="<?php echo Translate::t ('mark_favorite'); ?>">★</a></th>
+						<th title="<?php echo Translate::t ('mark_read'); ?>"><?php echo icon('read'); ?></th>
+						<th title="<?php echo Translate::t ('mark_favorite'); ?>"><?php echo icon('bookmark'); ?></th>
 						<th><?php echo Translate::t ('sharing'); ?></th>
 						<th><?php echo Translate::t ('sharing'); ?></th>
 						<th><?php echo Translate::t ('related_tags'); ?></th>
 						<th><?php echo Translate::t ('related_tags'); ?></th>
 						<th><?php echo Translate::t ('publication_date'); ?></th>
 						<th><?php echo Translate::t ('publication_date'); ?></th>
-						<th class="link"><a class="icon">↗</a></th>
+						<th><?php echo icon('link'); ?></th>
 					</tr>
 					</tr>
 				</thead>
 				</thead>
 				<tbody>
 				<tbody>
@@ -208,7 +208,7 @@
 				<p><a class="btn" href="<?php echo _url('entry', 'optimize'); ?>">
 				<p><a class="btn" href="<?php echo _url('entry', 'optimize'); ?>">
 					<?php echo Translate::t('optimize_bdd'); ?>
 					<?php echo Translate::t('optimize_bdd'); ?>
 				</a></p>
 				</a></p>
-				<i class="icon i_help">ⓘ</i> <?php echo Translate::t('optimize_todo_sometimes'); ?>
+				<?php echo icon('help'); ?> <?php echo Translate::t('optimize_todo_sometimes'); ?>
 			</div>
 			</div>
 		</div>
 		</div>
 
 

+ 5 - 5
app/views/configure/feed.phtml

@@ -29,21 +29,21 @@
 			<label class="group-name"><?php echo Translate::t ('website_url'); ?></label>
 			<label class="group-name"><?php echo Translate::t ('website_url'); ?></label>
 			<div class="group-controls">
 			<div class="group-controls">
 				<input type="text" name="website" id="website" value="<?php echo $this->flux->website (); ?>" />
 				<input type="text" name="website" id="website" value="<?php echo $this->flux->website (); ?>" />
-				<a target="_blank" href="<?php echo $this->flux->website (); ?>"><i class="icon i_link">↗</i></a>
+				<a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo icon('link'); ?></a>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="form-group">
 		<div class="form-group">
 			<label class="group-name"><?php echo Translate::t ('feed_url'); ?></label>
 			<label class="group-name"><?php echo Translate::t ('feed_url'); ?></label>
 			<div class="group-controls">
 			<div class="group-controls">
 				<input type="text" name="url" id="url" value="<?php echo $this->flux->url (); ?>" />
 				<input type="text" name="url" id="url" value="<?php echo $this->flux->url (); ?>" />
-				<a target="_blank" href="<?php echo $this->flux->url (); ?>"><i class="icon i_link">↗</i></a>
+				<a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo icon('link'); ?></a>
 			</div>
 			</div>
 		</div>
 		</div>
 		<div class="form-group">
 		<div class="form-group">
 			<label class="group-name"></label>
 			<label class="group-name"></label>
 			<div class="group-controls">
 			<div class="group-controls">
 				<a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
 				<a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
-					<i class="icon i_refresh">↻</i> <?php echo Translate::t('actualize'); ?>
+					<?php echo icon('refresh'); ?> <?php echo Translate::t('actualize'); ?>
 				</a>
 				</a>
 			</div>
 			</div>
 		</div>
 		</div>
@@ -85,7 +85,7 @@
 			<label class="group-name" for="path_entries"><?php echo Translate::t ('css_path_on_website'); ?></label>
 			<label class="group-name" for="path_entries"><?php echo Translate::t ('css_path_on_website'); ?></label>
 			<div class="group-controls">
 			<div class="group-controls">
 				<input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
 				<input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
-				<i class="icon i_help">ⓘ</i> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
+				<?php echo icon('help'); ?> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
 			</div>
 			</div>
 		</div>
 		</div>
 
 
@@ -94,7 +94,7 @@
 			<label class="group-name" for="http_user"><?php echo Translate::t ('http_username'); ?></label>
 			<label class="group-name" for="http_user"><?php echo Translate::t ('http_username'); ?></label>
 			<div class="group-controls">
 			<div class="group-controls">
 				<input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
 				<input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
-				<i class="icon i_help">ⓘ</i> <?php echo Translate::t ('access_protected_feeds'); ?>
+				<?php echo icon('help'); ?> <?php echo Translate::t ('access_protected_feeds'); ?>
 			</div>
 			</div>
 
 
 			<label class="group-name" for="http_pass"><?php echo Translate::t ('http_password'); ?></label>
 			<label class="group-name" for="http_pass"><?php echo Translate::t ('http_password'); ?></label>

+ 1 - 1
app/views/helpers/view/global_view.phtml

@@ -32,5 +32,5 @@
 
 
 <div id="overlay"></div>
 <div id="overlay"></div>
 <div id="panel"<?php echo $this->conf->displayPosts () === 'no' ? ' class="hide_posts"' : ''; ?>>
 <div id="panel"<?php echo $this->conf->displayPosts () === 'no' ? ' class="hide_posts"' : ''; ?>>
-	<a class="close" href="#"><i class="icon i_close">❌</i></a>
+	<a class="close" href="#"><?php echo icon('close'); ?></a>
 </div>
 </div>

+ 8 - 8
app/views/helpers/view/normal_view.phtml

@@ -42,13 +42,13 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
 				if ($this->conf->toplineRead ()) {
 				if ($this->conf->toplineRead ()) {
 					?><li class="item manage"><?php
 					?><li class="item manage"><?php
 						?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
 						?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
-							echo $item->isRead () ? '☑' : '☐'; ?></a><?php
+							echo icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
 					?></li><?php
 					?></li><?php
 				}
 				}
 				if ($this->conf->toplineFavorite ()) {
 				if ($this->conf->toplineFavorite ()) {
 					 ?><li class="item manage"><?php
 					 ?><li class="item manage"><?php
 						?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
 						?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
-							echo $item->isFavorite () ? '★' : '☆'; ?></a><?php
+							echo icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
 					?></li><?php
 					?></li><?php
 				}
 				}
 			}
 			}
@@ -58,7 +58,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
 			<li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li>
 			<li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span></a></li>
 			<li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li>
 			<li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li>
 			<?php if ($this->conf->toplineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
 			<?php if ($this->conf->toplineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
-			<?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a class="icon" target="_blank" href="<?php echo $item->link (); ?>"></a></li><?php } ?>
+			<?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo icon('link'); ?></a></li><?php } ?>
 		</ul>
 		</ul>
 
 
 		<div class="flux_content">
 		<div class="flux_content">
@@ -79,13 +79,13 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
 					if ($this->conf->bottomlineRead ()) {
 					if ($this->conf->bottomlineRead ()) {
 						?><li class="item manage"><?php
 						?><li class="item manage"><?php
 							?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
 							?><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>"><?php
-								echo $item->isRead () ? '☑' : '☐'; ?></a><?php
+								echo icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
 						?></li><?php
 						?></li><?php
 					}
 					}
 					if ($this->conf->bottomlineFavorite ()) {
 					if ($this->conf->bottomlineFavorite ()) {
 						?><li class="item manage"><?php
 						?><li class="item manage"><?php
 							?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
 							?><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>"><?php
-								echo $item->isFavorite () ? '★' : '☆'; ?></a><?php
+								echo icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
 						?></li><?php
 						?></li><?php
 					}
 					}
 				} ?>
 				} ?>
@@ -97,7 +97,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
 					?>
 					?>
 						<div class="dropdown">
 						<div class="dropdown">
 						<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
 						<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
-						<i class="icon i_share">♺</i> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>
+						<?php echo icon('share'); ?> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>
 
 
 						<ul class="dropdown-menu">
 						<ul class="dropdown-menu">
 							<li class="dropdown-close"><a href="#close">❌</a></li>
 							<li class="dropdown-close"><a href="#close">❌</a></li>
@@ -141,7 +141,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
 				<li class="item">
 				<li class="item">
 					<div class="dropdown">
 					<div class="dropdown">
 						<div id="dropdown-tags-<?php echo $item->id ();?>" class="dropdown-target"></div>
 						<div id="dropdown-tags-<?php echo $item->id ();?>" class="dropdown-target"></div>
-						<i class="icon i_tag">⚐</i> <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $item->id ();?>"><?php echo Translate::t ('related_tags'); ?></a>
+						<?php echo icon('tag'); ?> <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $item->id ();?>"><?php echo Translate::t ('related_tags'); ?></a>
 						<ul class="dropdown-menu">
 						<ul class="dropdown-menu">
 							<li class="dropdown-close"><a href="#close">❌</a></li>
 							<li class="dropdown-close"><a href="#close">❌</a></li>
 							<?php foreach($tags as $tag) { ?>
 							<?php foreach($tags as $tag) { ?>
@@ -152,7 +152,7 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
 				</li>
 				</li>
 				<?php } ?>
 				<?php } ?>
 				<?php if ($this->conf->bottomlineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
 				<?php if ($this->conf->bottomlineDate ()) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
-				<?php if ($this->conf->bottomlineLink ()) { ?><li class="item link"><a class="icon" target="_blank" href="<?php echo $item->link (); ?>"></a></li><?php } ?>
+				<?php if ($this->conf->bottomlineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo icon('link'); ?></a></li><?php } ?>
 			</ul>
 			</ul>
 		</div>
 		</div>
 	</div>
 	</div>

+ 30 - 0
lib/lib_rss.php

@@ -215,3 +215,33 @@ function lazyimg($content) {
 		$content
 		$content
 	);
 	);
 }
 }
+
+function icon($name) {	//<?php echo icon('share');
+	static $alts = array(
+		'add' => '✚',
+		'all' => '☰',
+		'bookmark' => '★',
+		'category' => '☷',
+		'category-white' => '☷',
+		'close' => '❌',
+		'configure' => '⚙',
+		'down' => '▽',
+		'favorite' => '★',
+		'help' => 'ⓘ',
+		'link' => '↗',
+		'login' => '🔒',
+		'logout' => '🔓',
+		'next' => '⏩',
+		'non-starred' => '☆',
+		'prev' => '⏪',
+		'read' => '☑',
+		'unread' => '☐',
+		'refresh' => '🔃',	//↻
+		'search' => '🔍',
+		'share' => '♺',
+		'starred' => '★',
+		'tag' => '⚐',
+		'up' => '△',
+	);
+	return '<i class="icon i_' . $name . '">' . $alts[$name] . '</i>';
+}

+ 2 - 1
public/install.php

@@ -1,5 +1,6 @@
 <?php
 <?php
 require('../constants.php');
 require('../constants.php');
+include(LIB_PATH . '/lib_rss.php');
 
 
 session_start ();
 session_start ();
 
 
@@ -505,7 +506,7 @@ function printStep2 () {
 			<!-- TODO: if no problem during version 0.6, remove for version 0.7 -->
 			<!-- TODO: if no problem during version 0.6, remove for version 0.7 -->
 			<label class="group-name" for="base_url"><?php echo _t ('base_url'); ?></label>
 			<label class="group-name" for="base_url"><?php echo _t ('base_url'); ?></label>
 			<div class="group-controls">
 			<div class="group-controls">
-				<input type="text" id="base_url" name="base_url" value="<?php echo isset ($_SESSION['base_url']) ? $_SESSION['base_url'] : $url; ?>" /> <i class="icon i_help">ⓘ</i> <?php echo _t ('do_not_change_if_doubt'); ?>
+				<input type="text" id="base_url" name="base_url" value="<?php echo isset ($_SESSION['base_url']) ? $_SESSION['base_url'] : $url; ?>" /> <?php echo @icon('help'); ?> <?php echo _t ('do_not_change_if_doubt'); ?>
 			</div>
 			</div>
 		</div>
 		</div>
 
 

+ 4 - 4
public/scripts/main.js

@@ -43,11 +43,11 @@ function mark_read(active, only_not_read) {
 			$r = active.find("a.read").attr("href", res.url),
 			$r = active.find("a.read").attr("href", res.url),
 			inc = 0;
 			inc = 0;
 		if (active.hasClass("not_read")) {
 		if (active.hasClass("not_read")) {
-			$r.text('☑');
+			$r.find('.icon').removeClass('i_unread').addClass('i_read').text('☑');
 			active.removeClass("not_read");
 			active.removeClass("not_read");
 			inc--;
 			inc--;
 		} else if (only_not_read !== true || active.hasClass("not_read")) {
 		} else if (only_not_read !== true || active.hasClass("not_read")) {
-			$r.text('☐');
+			$r.find('.icon').removeClass('i_read').addClass('i_unread').text('☐');
 			active.addClass("not_read");
 			active.addClass("not_read");
 			inc++;
 			inc++;
 		}
 		}
@@ -113,11 +113,11 @@ function mark_favorite(active) {
 			$b = active.find("a.bookmark").attr("href", res.url),
 			$b = active.find("a.bookmark").attr("href", res.url),
 			inc = 0;
 			inc = 0;
 		if (active.hasClass("favorite")) {
 		if (active.hasClass("favorite")) {
-			$b.text('☆');
+			$b.find('.icon').removeClass('i_starred').addClass('i_non-starred').text('☆');
 			active.removeClass("favorite");
 			active.removeClass("favorite");
 			inc--;
 			inc--;
 		} else {
 		} else {
-			$b.text('★');
+			$b.find('.icon').removeClass('i_non-starred').addClass('i_starred').text('★');
 			active.addClass("favorite").find('.bookmark');
 			active.addClass("favorite").find('.bookmark');
 			inc++;
 			inc++;
 		}
 		}

+ 4 - 52
public/themes/default/freshrss.css

@@ -25,9 +25,6 @@
 				margin: 0;
 				margin: 0;
 				text-shadow: 1px -1px 0 #ccc;
 				text-shadow: 1px -1px 0 #ccc;
 			}
 			}
-			.header > .item.title a:hover {
-				text-decoration: none;
-			}
 		.header > .item.search input {
 		.header > .item.search input {
 			width: 230px;
 			width: 230px;
 			transition: width 200ms linear;
 			transition: width 200ms linear;
@@ -39,6 +36,10 @@
 			width: 100px;
 			width: 100px;
 		}
 		}
 
 
+.item a:hover {
+	text-decoration: none;
+}
+
 #global {
 #global {
 	display: table;
 	display: table;
 	width: 100%;
 	width: 100%;
@@ -70,11 +71,6 @@
 			right: 33px;
 			right: 33px;
 		}
 		}
 
 
-		.aside.aside_flux .i_category {
-			background-image: url("../icons/category-white.png");
-			background-image: url("../icons/category-white.svg");
-		}
-
 	.nav-login {
 	.nav-login {
 		display: none;
 		display: none;
 	}
 	}
@@ -259,36 +255,6 @@
 			font-size: 0px;
 			font-size: 0px;
 			text-align: center;
 			text-align: center;
 		}
 		}
-			.read {
-				display: inline-block;
-				width: 40px;
-				height: 40px;
-				background: url("../icons/read.png") center center no-repeat;
-				background: url("../icons/read.svg") center center no-repeat;
-				vertical-align: middle;
-			}
-				.read:hover {
-					text-decoration: none;
-				}
-				.flux.not_read .read {
-					background: url("../icons/unread.png") center center no-repeat;
-					background: url("../icons/unread.svg") center center no-repeat;
-				}
-			.bookmark {
-				display: inline-block;
-				width: 40px;
-				height: 40px;
-				background: url("../icons/non-starred.png") center center no-repeat;
-				background: url("../icons/non-starred.svg") center center no-repeat;
-				vertical-align: middle;
-			}
-				.bookmark:hover {
-					text-decoration: none;
-				}
-				.flux.favorite .bookmark {
-					background: url("../icons/starred.png") center center no-repeat;
-					background: url("../icons/starred.svg") center center no-repeat;
-				}
 		.flux_header .item.website {
 		.flux_header .item.website {
 			width: 200px;
 			width: 200px;
 			overflow: hidden;
 			overflow: hidden;
@@ -313,9 +279,6 @@
 				color: #000;
 				color: #000;
 				outline: none;
 				outline: none;
 			}
 			}
-				.flux_header .item.title a:hover {
-					text-decoration: none
-				}
 			.flux.not_read .flux_header .item.title {
 			.flux.not_read .flux_header .item.title {
 				font-weight: bold;
 				font-weight: bold;
 			}
 			}
@@ -334,17 +297,6 @@
 			width: 40px;
 			width: 40px;
 			text-align: center;
 			text-align: center;
 		}
 		}
-			.link a {
-				display: inline-block;
-				width: 40px;
-				height: 40px;
-				background: url("../icons/link.png") center center no-repeat;
-				background: url("../icons/link.svg") center center no-repeat;
-				vertical-align: middle;
-			}
-				.link a:hover {
-					text-decoration: none;
-				}
 
 
 #stream.reader .flux {
 #stream.reader .flux {
 	padding: 0 0 30px;
 	padding: 0 0 30px;

+ 12 - 0
public/themes/default/global.css

@@ -572,6 +572,10 @@ input, select, textarea {
 		background-image: url("../icons/category.png");
 		background-image: url("../icons/category.png");
 		background-image: url("../icons/category.svg");
 		background-image: url("../icons/category.svg");
 	}
 	}
+	.i_category-white {
+		background-image: url("../icons/category-white.png");
+		background-image: url("../icons/category-white.svg");
+	}
 	.i_rss {
 	.i_rss {
 		background-image: url("../icons/rss.png");
 		background-image: url("../icons/rss.png");
 		background-image: url("../icons/rss.svg");
 		background-image: url("../icons/rss.svg");
@@ -580,6 +584,14 @@ input, select, textarea {
 		background-image: url("../icons/share.png");
 		background-image: url("../icons/share.png");
 		background-image: url("../icons/share.svg");
 		background-image: url("../icons/share.svg");
 	}
 	}
+	.i_starred {
+		background-image: url("../icons/starred.png");
+		background-image: url("../icons/starred.svg");
+	}
+	.i_non-starred {
+		background-image: url("../icons/non-starred.png");
+		background-image: url("../icons/non-starred.svg");
+	}
 	.i_tag {
 	.i_tag {
 		background-image: url("../icons/tag.png");
 		background-image: url("../icons/tag.png");
 		background-image: url("../icons/tag.svg");
 		background-image: url("../icons/tag.svg");

+ 4 - 52
public/themes/flat-design/freshrss.css

@@ -28,9 +28,6 @@ body {
 				display: inline-block;
 				display: inline-block;
 				margin: 0;
 				margin: 0;
 			}
 			}
-			.header > .item.title a:hover {
-				text-decoration: none;
-			}
 		.header > .item.search input {
 		.header > .item.search input {
 			width: 230px;
 			width: 230px;
 			transition: width 200ms linear;
 			transition: width 200ms linear;
@@ -42,6 +39,10 @@ body {
 			width: 100px;
 			width: 100px;
 		}
 		}
 
 
+.item a:hover {
+	text-decoration: none;
+}
+
 #global {
 #global {
 	display: table;
 	display: table;
 	width: 100%;
 	width: 100%;
@@ -238,36 +239,6 @@ body {
 			font-size: 0px;
 			font-size: 0px;
 			text-align: center;
 			text-align: center;
 		}
 		}
-			.read {
-				display: inline-block;
-				width: 40px;
-				height: 40px;
-				background: url("../icons/read.png") center center no-repeat;
-				background: url("../icons/read.svg") center center no-repeat;
-				vertical-align: middle;
-			}
-				.read:hover {
-					text-decoration: none;
-				}
-				.flux.not_read .read {
-					background: url("../icons/unread.png") center center no-repeat;
-					background: url("../icons/unread.svg") center center no-repeat;
-				}
-			.bookmark {
-				display: inline-block;
-				width: 40px;
-				height: 40px;
-				background: url("../icons/non-starred.png") center center no-repeat;
-				background: url("../icons/non-starred.svg") center center no-repeat;
-				vertical-align: middle;
-			}
-				.bookmark:hover {
-					text-decoration: none;
-				}
-				.flux.favorite .bookmark {
-					background: url("../icons/starred.png") center center no-repeat;
-					background: url("../icons/starred.svg") center center no-repeat;
-				}
 		.flux_header .item.website {
 		.flux_header .item.website {
 			width: 200px;
 			width: 200px;
 			overflow: hidden;
 			overflow: hidden;
@@ -278,10 +249,6 @@ body {
 			.flux_header .item.website .favicon {
 			.flux_header .item.website .favicon {
 				padding: 5px;
 				padding: 5px;
 			}
 			}
-			.flux_header .item.website a {
-				display: block;
-				height: 40px;
-			}
 		.flux_header .item.title {
 		.flux_header .item.title {
 			overflow: hidden;
 			overflow: hidden;
 			white-space: nowrap;
 			white-space: nowrap;
@@ -292,9 +259,6 @@ body {
 				color: #333;
 				color: #333;
 				outline: none;
 				outline: none;
 			}
 			}
-				.flux_header .item.title a:hover {
-					text-decoration: none
-				}
 			.flux.not_read .flux_header .item.title {
 			.flux.not_read .flux_header .item.title {
 				font-weight: bold;
 				font-weight: bold;
 			}
 			}
@@ -313,17 +277,6 @@ body {
 			width: 40px;
 			width: 40px;
 			text-align: center;
 			text-align: center;
 		}
 		}
-			.link a {
-				display: inline-block;
-				width: 40px;
-				height: 40px;
-				background: url("../icons/link.png") center center no-repeat;
-				background: url("../icons/link.svg") center center no-repeat;
-				vertical-align: middle;
-			}
-				.link a:hover {
-					text-decoration: none;
-				}
 
 
 #stream.reader .flux {
 #stream.reader .flux {
 	position: relative;
 	position: relative;
@@ -529,7 +482,6 @@ body {
 			.pagination .item a:hover {
 			.pagination .item a:hover {
 				color: #ecf0f1;
 				color: #ecf0f1;
 				background: #34495e;
 				background: #34495e;
-				text-decoration: none;
 			}
 			}
 
 
 #nav_entries {
 #nav_entries {

+ 12 - 0
public/themes/flat-design/global.css

@@ -556,6 +556,10 @@ input, select, textarea {
 		background-image: url("../icons/category-white.png");
 		background-image: url("../icons/category-white.png");
 		background-image: url("../icons/category-white.svg");
 		background-image: url("../icons/category-white.svg");
 	}
 	}
+	.i_category-white {
+		background-image: url("../icons/category-white.png");
+		background-image: url("../icons/category-white.svg");
+	}
 	.i_rss {
 	.i_rss {
 		background-image: url("../icons/rss.png");
 		background-image: url("../icons/rss.png");
 		background-image: url("../icons/rss.svg");
 		background-image: url("../icons/rss.svg");
@@ -564,6 +568,14 @@ input, select, textarea {
 		background-image: url("../icons/share.png");
 		background-image: url("../icons/share.png");
 		background-image: url("../icons/share.svg");
 		background-image: url("../icons/share.svg");
 	}
 	}
+	.i_starred {
+		background-image: url("../icons/starred.png");
+		background-image: url("../icons/starred.svg");
+	}
+	.i_non-starred {
+		background-image: url("../icons/non-starred.png");
+		background-image: url("../icons/non-starred.svg");
+	}
 	.i_tag {
 	.i_tag {
 		background-image: url("../icons/tag.png");
 		background-image: url("../icons/tag.png");
 		background-image: url("../icons/tag.svg");
 		background-image: url("../icons/tag.svg");