4 .nopadding.col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
5 label(for="prefixFilter") Type first letters...
6 input#prefixFilter(v-model="curPrefix")
7 .variant.col-sm-12.col-md-5.col-lg-4(
8 v-for="(v,idx) in filteredVariants"
9 :class="{'col-md-offset-1': idx%2==0, 'col-lg-offset-2': idx%2==0}"
11 router-link(:to="getLink(v.name)")
12 h4.boxtitle.text-center {{ v.name }}
13 p.description.text-center {{ st.tr[v.desc] }}
17 import { store } from "@/store";
27 filteredVariants: function () {
28 const capitalizedPrefix = this.curPrefix.replace(/^\w/, c => c.toUpperCase());
29 const variants = this.st.variants
31 return v.name.startsWith(capitalizedPrefix);
40 return a.name.localeCompare(b.name);
46 getLink: function(vname) {
47 return "/variants/" + vname;
53 <style lang="sass" scoped>
54 // TODO: box-shadow or box-sizing ? https://stackoverflow.com/a/13517809
56 box-sizing: border-box
57 border: 1px solid brown
58 background-color: lightyellow
60 background-color: yellow
68 @media screen and (max-width: 767px)