Skip to content

Commit 7e61554

Browse files
committed
#267 CountryGallery: item => more content
1 parent 8a51db9 commit 7e61554

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

examples/component/coronaGallery/CountryGallery.mjs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,33 @@ class CountryGallery extends Gallery {
5050
}]
5151
}, {
5252
tag: 'table',
53+
cls: ['neo-content-table'],
5354
cn : [{
5455
tag: 'tr',
5556
cn : [
5657
{tag: 'td', html: 'Cases'},
58+
{tag: 'td', cls: ['neo-align-right']},
59+
{tag: 'td', style: {width: '100%'}},
60+
{tag: 'td', html: 'Cases today'},
5761
{tag: 'td', cls: ['neo-align-right']}
5862
]
5963
}, {
6064
tag: 'tr',
6165
cn : [
6266
{tag: 'td', html: 'Deaths'},
67+
{tag: 'td', cls: ['neo-align-right', 'neo-content-deaths']},
68+
{tag: 'td', style: {width: '100%'}},
69+
{tag: 'td', html: 'Deaths today'},
6370
{tag: 'td', cls: ['neo-align-right', 'neo-content-deaths']}
6471
]
6572
}, {
6673
tag: 'tr',
6774
cn : [
6875
{tag: 'td', html: 'Recovered'},
69-
{tag: 'td', cls: ['neo-align-right', 'neo-content-recovered']}
76+
{tag: 'td', cls: ['neo-align-right', 'neo-content-recovered']},
77+
{tag: 'td', style: {width: '100%'}},
78+
{tag: 'td', html: 'Critical'},
79+
{tag: 'td', cls: ['neo-align-right', 'neo-content-critical']}
7080
]
7181
}]
7282
}]
@@ -115,6 +125,10 @@ class CountryGallery extends Gallery {
115125
table.cn[1].cn[1].html = record.deaths;
116126
table.cn[2].cn[1].html = record.recovered;
117127

128+
table.cn[0].cn[4].html = record.todayCases;
129+
table.cn[1].cn[4].html = record.todayDeaths;
130+
table.cn[2].cn[4].html = record.critical;
131+
118132
return vdomItem;
119133
}
120134

resources/scss/src/examples/_CountryGallery.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
text-align: right;
66
}
77

8+
.neo-content-critical {
9+
color: orange;
10+
}
11+
812
.neo-content-deaths {
913
color: red;
1014
}
@@ -13,6 +17,10 @@
1317
color: green;
1418
}
1519

20+
.neo-content-table {
21+
white-space: nowrap;
22+
}
23+
1624
.neo-flag {
1725
height : 40px;
1826
margin-right: 10px;

0 commit comments

Comments
 (0)