Skip to content

Commit

Permalink
show message if no upcoming activities #24
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Jul 1, 2012
1 parent 8c87225 commit bb00670
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions index.html
Expand Up @@ -44,16 +44,29 @@ <h2>
<a href="/activities.html" class="all">View All</a>
</h2>
<ul class="posts">
<!-- all just to assign has_activity_post variable -->
{% for activity in site.tags.frontpage reversed%}
{% if activity.category == 'activities' %}
<li>
<a href="{{activity.url}}">
{{ activity.title }}
<span class="date">{{activity.date | date: "%Y %B %d"}}</span>
</a>
</li>
{% assign has_activity_posts = true %}
{% else %}
{% assign has_activity_posts = false %}
{% endif %}
{% endfor %}

{% if has_activity_posts %}
{% for activity in site.tags.frontpage reversed%}
{% if activity.category == 'activities' %}
<li>
<a href="{{activity.url}}">
{{ activity.title }}
<span class="date">{{activity.date | date: "%Y %B %d"}}</span>
</a>
</li>
{% endif %}
{% endfor %}
{% else %}
Sorry, no upcoming activities
{% endif %}
</ul>
</div>
<div class="clear"></div>
Expand Down

0 comments on commit bb00670

Please sign in to comment.