Skip to content

Commit 178f4c3

Browse files
Moved liquid logic deciding if events section is displayed above the column and section definition to completely skip rendering any html for this section if no future events are present.
1 parent 3d441f4 commit 178f4c3

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ <h2 class="navigation__subtitle">All About Open Source</h2>
3838
</div>
3939
<div class="upcoming-chapters-container container-fluid">
4040
<div class="row">
41-
<div class="col-lg-6 no-padding-x">
42-
<!--Upcoming Events section-->
43-
{% include events_array_generator.html future_events = true %}
44-
{% if posts.size > 0 %}
45-
{% assign upcoming_event = true %}
46-
{% assign chapters_col = "col-lg-6" %}
47-
{% assign posts = posts | reverse %}
48-
{% else %}
49-
{% assign chapters_col = "col-12" %}
50-
{% endif %}
51-
{% if upcoming_event == true %}
41+
{% include events_array_generator.html future_events = true %}
42+
{% if posts.size > 0 %}
43+
{% assign upcoming_event = true %}
44+
{% assign chapters_col = "col-lg-6" %}
45+
{% assign posts = posts | reverse %}
46+
{% else %}
47+
{% assign chapters_col = "col-12" %}
48+
{% endif %}
49+
{% if upcoming_event == true %}
50+
<div class="col-lg-6 no-padding-x">
51+
<!--Upcoming Events section-->
5252
<section class="upcoming">
5353
<div class="row container-fluid">
5454
<div class="col-md-12 no-padding-x">
@@ -102,8 +102,8 @@ <h2 class="upcoming__event-subtitle"> {{ post.subtitle }}</h2>
102102
{% endfor %}
103103
</div>
104104
</section>
105-
{% endif %}
106-
</div>
105+
</div>
106+
{% endif %}
107107

108108
<div class="{{ chapters_col }} no-padding-x">
109109
<section class="chapters">

0 commit comments

Comments
 (0)