word/finder: .large images with multiple subcategories
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 10 Feb 2022 03:17:00 +0000 (04:17 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 1 Mar 2022 20:02:26 +0000 (21:02 +0100)
Automatic subdivision for a result similar to the previous cover attribute
without requiring manual maintenance.

word/finder.js

index b1db273415ae27e51f7c40026c014673fd115543..a45dee4a06db6e3c7fc1c6fc4b808d4759dd9755 100644 (file)
@@ -14,6 +14,10 @@ class WordFinder extends WordQuiz {
                                        innerHTML: html,
                                });
                        }
                                        innerHTML: html,
                                });
                        }
+                       let levelpart = level <= 1 && this.cats[ref] && this.cats[ref].length > 1;
+                       if (levelpart) {
+                               put(worditem, '.large');
+                       }
                        if (this.cats[ref]) {
                                // delve into subcategory
                                put(worditem, '.parent');
                        if (this.cats[ref]) {
                                // delve into subcategory
                                put(worditem, '.parent');