Fix computer mode in rules tab
[vchess.git] / public / javascripts / components / variantSummary.js
CommitLineData
92342261 1// Show a variant summary on index
1d184b4c 2Vue.component('my-variant-summary', {
d5973790 3 props: ['vobj','index'],
1d184b4c 4 template: `
d5973790
BA
5 <div class="variant col-sm-12 col-md-5 col-lg-4" :id="vobj.name"
6 :class="{'col-md-offset-1': index%2==0, 'col-lg-offset-2': index%2==0}">
1d184b4c
BA
7 <a :href="url">
8 <h4 class="boxtitle text-center">
9 {{ vobj.name }}
10 <span class="count-players">
11 / {{ vobj.count }}
12 </span>
13 </h4>
14 <p class="description text-center">
247356cd 15 {{ translate(vobj.desc) }}
1d184b4c
BA
16 </p>
17 </a>
18 </div>
19 `,
20 computed: {
21 url: function() {
22 return "/" + this.vobj.name;
23 },
24 },
247356cd
BA
25 methods: {
26 translate: function(text) {
27 return translations[text];
28 },
29 },
1d184b4c 30})