4 .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
7 @input="setCurPrefix($event)"
8 :placeholder="st.tr['Prefix?']"
10 .variant.col-sm-12.col-md-5.col-lg-4(
11 v-for="(v,idx) in filteredVariants"
12 :class="getVclasses(filteredVariants, idx)"
14 router-link(:to="getLink(v.name)")
15 h4.boxtitle.text-center {{ v.display }}
16 p.description.text-center {{ st.tr[v.desc] }}
20 import { store } from "@/store";
30 document.getElementById("prefixFilter").focus();
33 filteredVariants: function() {
34 const capitalizedPrefix = this.curPrefix.replace(/^\w/, c =>
37 const variants = this.st.variants
39 return v.display.startsWith(capitalizedPrefix);
49 return a.display.localeCompare(b.display);
55 // oninput listener, required for smartphones:
56 setCurPrefix: function(e) {
57 this.curPrefix = e.target.value;
59 getLink: function(vname) {
60 return "/variants/" + vname;
62 getVclasses: function(varray, idx) {
63 const idxMod2 = idx % 2;
65 'col-md-offset-1': idxMod2 == 0,
66 'col-lg-offset-2': idxMod2 == 0,
67 'last-noneighb': idxMod2 == 0 && idx == varray.length - 1
74 <style lang="sass" scoped>
80 box-sizing: border-box
81 border: 1px solid brown
82 background-color: lightyellow
84 background-color: yellow
92 @media screen and (max-width: 767px)