diff options
| -rw-r--r-- | app/layout/layout.phtml | 4 | ||||
| -rw-r--r-- | app/models/RSSThemes.php | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index 6fc5c1cf0..ac00e8fd0 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -20,6 +20,10 @@ <?php if (isset ($this->rss_url)) { ?> <link rel="alternate" type="application/rss+xml" title="<?php echo $this->rss_title; ?>" href="<?php echo Url::display ($this->rss_url); ?>" /> <?php } ?> + <link rel="prefetch" href="<?php echo RSSThemes::icon('starred', true); ?>"> + <link rel="prefetch" href="<?php echo RSSThemes::icon('non-starred', true); ?>"> + <link rel="prefetch" href="<?php echo RSSThemes::icon('read', true); ?>"> + <link rel="prefetch" href="<?php echo RSSThemes::icon('unread', true); ?>"> <meta name="robots" content="noindex,nofollow" /> </head> <body> diff --git a/app/models/RSSThemes.php b/app/models/RSSThemes.php index 7a6deaf3c..a3e67f8b1 100644 --- a/app/models/RSSThemes.php +++ b/app/models/RSSThemes.php @@ -47,7 +47,7 @@ class RSSThemes extends Model { ), 1) : array(); } - public static function icon($name) { + public static function icon($name, $urlOnly = false) { static $alts = array( 'add' => '✚', 'all' => '☰', @@ -82,6 +82,7 @@ class RSSThemes extends Model { $url = isset(self::$themeIcons[$url]) ? (self::$themeIconsUrl . $url) : (self::$defaultIconsUrl . $url); - return '<img class="icon" src="' . Url::display($url) . '" alt="' . $alts[$name] . '" />'; + return $urlOnly ? Url::display($url) : + '<img class="icon" src="' . Url::display($url) . '" alt="' . $alts[$name] . '" />'; } } |
