title: Change widths of elements from 50% to 100% if array length is odd or even
body: <p>I want to show some elements(soundcloud widgets) to my page.</p>
  
  <p>And depending of if they are <code>odd</code> or <code>even</code> they should have either <code>50%</code> or <code>100%</code> width.</p>
  
  <p>Basically the rules i want to meet are:</p>
  
  <p>-If there is only one element, make it 100% width</p>
  
  <p>-If there are more than one element and the lenght of the array is even, make all elements 50%</p>
  
  <p>-Otherwaays if the length of array is odd, make all but the very last one 50%, and the last one 100% width.</p>
  
  <p>Im using pug, and cant figure out how to do this. maybe even flexbox could help here?</p>
  
  <p>This is my code, the class <code>w-50</code> is setting the elements to 50% right now:</p>
  
  <pre><code>    each link in soundcloudEmbedableLinks
        .pb4.w-50.dib.pa2!=link
  </code></pre>
  
  <p>And this is how it looks now, all set to 50%.. but as I said i do want it to meet the rules i said above.</p>
  
  <p>Thanks
  <a href="https://i.stack.imgur.com/nKuAL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nKuAL.png" alt="enter image description here"></a></p>