1 class WordFinder extends WordQuiz {
2 add(parentitem, rows) {
3 const catitem = put(parentitem, 'ul');
5 const [title, level, imgid, subs] = this.data[ref];
6 const worditem = put(catitem, 'li');
7 const figitem = put(worditem, 'figure');
9 put(figitem, 'img[src=$]', `/data/word/32/${imgid}.jpg`);
12 let html = title.replace(/\/(.*)/, ' <small>($1)</small>');
13 put(figitem, 'figcaption', {
17 if (level <= 1 && subs.length >= 2) {
18 put(worditem, '.large');
21 // delve into subcategory
22 put(worditem, '.parent');
23 this.add(worditem, subs);
29 this.gallery = document.getElementById('gallery');
30 put(this.gallery, '-p', 'Under construction.');
31 this.add(this.gallery, this.preset.cat ? [this.preset.cat] : this.data[''][3]);