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="{'col-md-offset-1': idx%2==0, 'col-lg-offset-2': idx%2==0}"
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;
62 <style lang="sass" scoped>
68 box-sizing: border-box
69 border: 1px solid brown
70 background-color: lightyellow
72 background-color: yellow
80 @media screen and (max-width: 767px)