Use variants.

master
cskksc 2015-07-09 17:43:33 +00:00
parent 274bda4043
commit fa878dca06
3 changed files with 8 additions and 20 deletions

View File

@ -83,18 +83,18 @@ handle query_clean => sub {
templates => { templates => {
group => "icon", group => "icon",
item => 0, item => 0,
elClass => { variants => {
iconTitle => "t-xxl", iconTitle => 'large',
iconSubtitle => "tx--15" iconImage => 'large'
} }
}, },
data => { data => {
country_code => country2code($country_key), country_code => country2code($country_key),
date => $date_str, title => $date_str,
info => $prolog subtitle => $prolog
} }
}; };
}; };
1; 1;

View File

@ -1,3 +0,0 @@
.zci__body{
display: inline-block;
}

View File

@ -1,19 +1,10 @@
DDH.independence_day = DDH.independence_day || {}; DDH.independence_day = DDH.independence_day || {};
DDH.independence_day.build = function(ops) { DDH.independence_day.build = function(ops) {
return { return {
normalize: function(item) { normalize: function(item) {
var isMobile = ($('.is-mobile').length > 0) ? true : false; return {
var info = { image: DDG.settings.region.getLargeIconURL(ops.data.country_code)
title: ops.data.date,
subtitle: ops.data.info
}; };
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;
} }
}; };
}; };