{% load theme_tags %}
{% load event_tags %}
{% list_events as featured_events limit=TEMPLATE_EVENTS_LIST_DAYBOX_LIMIT %}
<section id="events-list">
<h3>{% firstof TEMPLATE_EVENTS_LIST_DAYBOX_TITLE "Upcoming Events" %}</h3>
    <ul>
    {% if featured_events %}
    {% for event in featured_events %}
        <li>
            <div class="numeral"><a href="{{ event.get_absolute_url }}">{{ event.start_dt|date:"d" }}</a></div>
            <div class="month"><a href="{{ event.get_absolute_url }}">{{ event.start_dt|date:"b"|title }}</a></div>
            <div class="title"><a href="{{ event.get_absolute_url }}">{{ event.title }}</a></div>
            <div class="blurb"><p>{{ event.description|striptags|truncatewords:10|safe }} <a href="{{ event.get_absolute_url }}" class="readmore">Read More</a></p></div>
        </li>
    {% endfor %}
    {% else %}
        <li>
            <div class="numeral"><a href="#">10</a></div>
            <div class="month"><a href="#">{% now "b" %}</a></div>
            <div class="title"><a href="#">Great event</a></div>
            <div class="blurb"><p>Your latest events will be displayed here.</p></div>
        </li>
        <li>
            <div class="numeral"><a href="#">18</a></div>
            <div class="month"><a href="#">{% now "b" %}</a></div>
            <div class="title"><a href="#">Board Meeting</a></div>
            <div class="blurb"><p>{% if request.user.is_authenticated %}<a href="/events/add/">Add your first event</a> to take the place of these examples.{% else %}Great new upcoming event for the organization...{% endif %}</p></div>
        </li>
        <li>
            <div class="numeral"><a href="#">26</a></div>
            <div class="month"><a href="#">{% now "b" %}</a></div>
            <div class="title"><a href="#">Monthly Roundup</a></div>
            <div class="blurb"><p>We are excited about this fantastic upcoming event on the 22nd...</p></div>
        </li>
    {% endif %}
    </ul>
</section>
{% theme_setting setting_name %}