a(href="https://www.chessvariants.com/why.html")
| {{ st.tr["Why play chess variants?"] }}
p
- a(href="/#/variants/Chess") Chess
- | {{ st.tr["chess_v"] }}
+ a(href="/#/variants/Chess960") Chess960
+ | {{ st.tr["chess960_v"] }}
div(v-for="g of sortedGroups")
h3 {{ st.tr["vt" + g] }}
p {{ st.tr["vg" + g] }}
ul
- li(v-for="v of variantGroup.get(g)")
+ li(v-for="v of sortVariants(variantGroup.get(g))")
a(:href="getLink(v)") {{ v.display }}
|  –
- | {{ v.description }}
+ | {{ st.tr[v.description] }}
</template>
<script>
}
},
methods: {
+ sortVariants: function(group) {
+ return group.sort( (v1, v2) => v1.name.localeCompare(v2.name) );
+ },
// oninput listener, required for smartphones:
setCurPrefix: function(e) {
this.curPrefix = e.target.value;