X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FVariants.vue;h=2a3f6cf02384f8b948ea1df983918f6bc90a1095;hb=09d375717c256a2cbd71a5d3b3a4e21aee17c0ec;hp=3fccae59be564e29f516de1db9fc2eadb38179a2;hpb=9e3f662f10d803ef4f491f9339fb41f341ec8549;p=vchess.git diff --git a/client/src/views/Variants.vue b/client/src/views/Variants.vue index 3fccae59..2a3f6cf0 100644 --- a/client/src/views/Variants.vue +++ b/client/src/views/Variants.vue @@ -9,7 +9,7 @@ main ) .variant.col-sm-12.col-md-5.col-lg-4( v-for="(v,idx) in filteredVariants" - :class="{'col-md-offset-1': idx%2==0, 'col-lg-offset-2': idx%2==0}" + :class="getVclasses(filteredVariants, idx)" ) router-link(:to="getLink(v.name)") h4.boxtitle.text-center {{ v.name }} @@ -54,7 +54,15 @@ export default { }, getLink: function(vname) { return "/variants/" + vname; - } + }, + getVclasses: function(varray, idx) { + const idxMod2 = idx % 2; + return { + 'col-md-offset-1': idxMod2 == 0, + 'col-lg-offset-2': idxMod2 == 0, + 'last-noneighb': idxMod2 == 0 && idx == varray.length - 1 + }; + }, } }; @@ -79,4 +87,7 @@ input#prefixFilter .description @media screen and (max-width: 767px) margin-top: 0 + +.last-noneighb + margin: 0 auto