From fa878dca069590257514b149ff938472391ee760 Mon Sep 17 00:00:00 2001 From: cskksc Date: Thu, 9 Jul 2015 17:43:33 +0000 Subject: [PATCH] Use variants. --- lib/DDG/Goodie/IndependenceDay.pm | 12 ++++++------ share/goodie/independence_day/independence_day.css | 3 --- share/goodie/independence_day/independence_day.js | 13 ++----------- 3 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 share/goodie/independence_day/independence_day.css diff --git a/lib/DDG/Goodie/IndependenceDay.pm b/lib/DDG/Goodie/IndependenceDay.pm index 6e5ac8a1a..dcc6c71e8 100644 --- a/lib/DDG/Goodie/IndependenceDay.pm +++ b/lib/DDG/Goodie/IndependenceDay.pm @@ -83,18 +83,18 @@ handle query_clean => sub { templates => { group => "icon", item => 0, - elClass => { - iconTitle => "t-xxl", - iconSubtitle => "tx--15" + variants => { + iconTitle => 'large', + iconImage => 'large' } }, data => { country_code => country2code($country_key), - date => $date_str, - info => $prolog + title => $date_str, + subtitle => $prolog } }; }; -1; \ No newline at end of file +1; diff --git a/share/goodie/independence_day/independence_day.css b/share/goodie/independence_day/independence_day.css deleted file mode 100644 index d5e19dbd8..000000000 --- a/share/goodie/independence_day/independence_day.css +++ /dev/null @@ -1,3 +0,0 @@ -.zci__body{ - display: inline-block; -} \ No newline at end of file diff --git a/share/goodie/independence_day/independence_day.js b/share/goodie/independence_day/independence_day.js index 4fccf6822..0430e21a8 100644 --- a/share/goodie/independence_day/independence_day.js +++ b/share/goodie/independence_day/independence_day.js @@ -1,19 +1,10 @@ DDH.independence_day = DDH.independence_day || {}; - DDH.independence_day.build = function(ops) { return { normalize: function(item) { - var isMobile = ($('.is-mobile').length > 0) ? true : false; - var info = { - title: ops.data.date, - subtitle: ops.data.info + return { + image: DDG.settings.region.getLargeIconURL(ops.data.country_code) }; - if (isMobile) { - info.image = DDG.settings.region.getSmallIconURL(ops.data.country_code); - } else { - info.image = DDG.settings.region.getLargeIconURL(ops.data.country_code); - } - return info; } }; }; \ No newline at end of file