File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change 2020        Upcoming Events
2121      </ h2 > 
2222
23-       {% assign upcoming_events = false %}
23+     {% assign upcoming_events = site.posts | where_exp: 'post', 'post.date > = site.time' %}
24+     {% if upcoming_events.size == 0 %}
25+       < p > There are no upcoming workshops.</ p > 
26+     {% else %}
2427      < ul  id ="events-list "> 
25-         {% for post in site.posts reversed %}
26-           {% if post.date > = site.time %}
27-             {% assign upcoming_events = true %}
28-             < li > 
29-               < div  class ="background-image city " style ="background-image: url({{ post.city_image_url }}) "> </ div > 
30-               < div  class ="background-image organizer " style ="background-image: url({{ post.organizer_image_url }}) "> </ div > 
31-               < h3 > < a  class ="post-link " href ="{{ post.url }} "> {{ post.title }}</ a > </ h3 > 
32-               < p > {{ post.workshop_dates }}</ li > 
33-             </ li > 
34-           {% endif %}
35-         {% endfor %}
28+       {% for post in upcoming_events reversed %}
29+         < li > 
30+           < div  class ="background-image city " style ="background-image: url({{ post.city_image_url }}) "> </ div > 
31+           < div  class ="background-image organizer " style ="background-image: url({{ post.organizer_image_url }}) "> </ div > 
32+           < h3 > < a  class ="post-link " href ="{{ post.url }} "> {{ post.title }}</ a > </ h3 > 
33+           < p > {{ post.workshop_dates }}</ li > 
34+         </ li > 
35+       {% endfor %}
3636      </ ul > 
37-       {% unless upcoming_events %}
38-         < p > There are no upcoming workshops.</ p > 
39-       {% endunless %}
37+     {% endif %}
4038
4139    </ div > 
4240  </ div > 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments