summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-04-15 15:27:35 +0400
committerAndrew Dolgov <[email protected]>2013-04-15 15:27:35 +0400
commite0deff393383982d33045a2a1ec47862141b988b (patch)
tree2693ac40ed57d877e0feefad1be1d8f8de96ed6d /classes
parent63c323f73610d81216801d1023dca724cfd32699 (diff)
implement basic moz gradient for feedicon color
Diffstat (limited to 'classes')
-rw-r--r--classes/feeds.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 22c3497d4..07cc427a9 100644
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -150,6 +150,8 @@ class Feeds extends Handler_Protected {
$reply = array();
+ $rgba_cache = array();
+
$timing_info = microtime(true);
$topmost_article_ids = array();
@@ -530,7 +532,22 @@ class Feeds extends Handler_Protected {
//setting feed headline background color, needs to change text color based on dark/light
$fav_color = $line['favicon_avg_color'];
- $reply['content'] .= "<div class=\"cdmHeader\" style=\"background-color: $fav_color;\">";
+
+ require_once "colors.php";
+
+ if ($fav_color) {
+ if (!isset($rgba_cache[$feed_id]))
+ $rgba_cache[$feed_id] = join(",", _color_unpack($fav_color));
+
+ $rgba = $rgba_cache[$feed_id];
+
+ $row_background = "background-image : -moz-linear-gradient(left, rgba(255, 255, 255, 0) 50%, rgba($rgba, 0.2) 95%";
+
+ } else {
+ $row_background = "";
+ }
+
+ $reply['content'] .= "<div class=\"cdmHeader\" style=\"$row_background\">";
$reply['content'] .= "<div style=\"vertical-align : middle\">";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"