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 <!-- Add "scoped" attribute to limit CSS to this component only -->
54 <style scoped lang="sass">
55 // TODO: box-shadow or box-sizing ? https://stackoverflow.com/a/13517809
57 box-sizing: border-box
58 border: 1px solid brown
59 background-color: lightyellow
61 background-color: yellow
69 @media screen and (max-width: 767px)