}
@media (min-width: 603px) and (min-height: 400px) {
/* fit 3 cells of 200x133 */
- .gallery > ul > li:first-child > figure,
+ .gallery > li:first-child > figure,
.gallery li.huge > figure {
grid-row: span 3;
grid-column: span 3;
class WordFinder extends WordQuiz {
- add(parentitem, rows) {
- const catitem = put(parentitem, 'ul');
+ add(catitem, rows) {
rows.forEach(ref => {
const [title, level, imgid, subs] = this.data[ref];
const worditem = put(catitem, 'li');
if (subs.length) {
// delve into subcategory
put(worditem, '.parent');
- this.add(worditem, subs);
+ this.add(put(worditem, 'ul'), subs);
}
});
}
setup() {
this.gallery = document.getElementById('gallery');
- put(this.gallery, '-p', 'Under construction.');
- this.add(this.gallery, this.preset.cat ? [this.preset.cat] : this.data[''][3]);
+ this.gallery.innerHTML = '';
+ put(this.gallery, 'p', 'Under construction.');
+ for (let cat of this.preset.cat ? [this.preset.cat] : this.data[''][3]) {
+ this.add(put(this.gallery, 'ul.gallery'), [cat]);
+ }
}
stop() {}