{% if current_contests %}
  <div class="blog-sidebox sidebox">
    <h3><i class="fa fa-trophy"></i> {{ _('Ongoing contests') }}</h3>
    <div class="sidebox-content">
      {% for contest in current_contests %}
        <div class="contest">
          <div class="contest-list-title">
            <a href="{{ url('contest_view', contest.key) }}">{{ contest.name }}</a>
          </div>
          <div class="time">
            {{ _('Ends in') }} {{ _('%(countdown)s.', countdown=contest.end_time|as_countdown) }}
          </div>
        </div>
      {% endfor %}
    </div>
  </div>
{% endif %}

{% if future_contests %}
  <div class="blog-sidebox sidebox">
    <h3><i class="fa fa-trophy"></i>{{ _('Upcoming contests') }}</h3>
    <div class="sidebox-content">
      {% for contest in future_contests %}
        <div class="contest">
          <div class="contest-list-title">
            <a href="{{ url('contest_view', contest.key) }}">{{ contest.name }}</a>
          </div>
          <div class="time">
            {{ _('Starting in %(countdown)s.', countdown=contest.start_time|as_countdown) }}
          </div>
        </div>
      {% endfor %}
    </div>
  </div>
{% endif %}
