jarrekk/Jalpc

Adding a fourth project destroys alignment

steremma opened this issue · 2 comments

I am trying to add 4 records in the projects section, but the alignment is off. I initially posted a question on SO but I then tested it on a friends blog and I get the same issue. The problem gets even worse when adding a 5th project. Is this a known issue? Or am I doing something wrong?

@steremma Found any workaround for this?

The accepted solution of stackoverflow did the trick for me.

I changed line 10 of _includes/sections/projects.html:

            {% assign loopindex = forloop.index | modulo: 2 %}

by:

            {% assign loopindex = forloop.index | modulo: 2 %}
            {% if loopindex == 1 && forloop.index != 1 %}
                </div><div class="row">
            {% endif %}