Display sections for cards

This commit is contained in:
Ian Gulliver
2017-06-15 04:30:49 +00:00
parent 26f34c46da
commit 98713282b5
2 changed files with 27 additions and 8 deletions

View File

@@ -29,7 +29,12 @@ class TagSlice {
title.addEventListener('click', () => {
elem.classList.toggle('expanded');
});
this.createElement_(elem, 'cardText', object['description']);
let detail = this.createElement_(elem, 'cardDetail');
for (let sectionName in object['content']) {
let section = this.createElement_(detail, 'cardSection');
this.createElement_(section, 'cardSectionTitle', sectionName);
this.createElement_(section, 'cardSectionText', object['content'][sectionName]);
}
}
parseHash_() {