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.name }}
16 p.description.text-center {{ st.tr[v.desc] }}
20 import { store } from "@/store";
30 filteredVariants: function() {
31 const capitalizedPrefix = this.curPrefix.replace(/^\w/, c =>
34 const variants = this.st.variants
36 return v.name.startsWith(capitalizedPrefix);
45 return a.name.localeCompare(b.name);
51 // oninput listener, required for smartphones:
52 setCurPrefix: function(e) {
53 this.curPrefix = e.target.value;
55 getLink: function(vname) {
56 return "/variants/" + vname;
58 getVclasses: function(varray, idx) {
59 const idxMod2 = idx % 2;
61 'col-md-offset-1': idxMod2 == 0,
62 'col-lg-offset-2': idxMod2 == 0,
63 'last-noneighb': idxMod2 == 0 && idx == varray.length - 1
70 <style lang="sass" scoped>
76 box-sizing: border-box
77 border: 1px solid brown
78 background-color: lightyellow
80 background-color: yellow
88 @media screen and (max-width: 767px)