{% load i18n storybase_tags %}
{% comment %}
context:
- more_link_text, eg "View Projects" or "View Stories"
- more_link_url, a link to full listing of projects or stories
- objects, a list of dicts with keys:
    type
    title
    author
    date
    image_html
    excerpt
    url
    more_link_text
    more_link_url
{% endcomment %}
<ul class="slides">
    {% for object in objects %}
    <li>
        <div class="image">
            {{ object.image_html|safe }}
        </div>
        <div class="text">
            <p class="featured-type">{{ object.type }}</p>
            <h3><a href="{{ object.url }}" title="{{ object.title }}">{{ object.title }}</a></h3>
            <p class="byline">{% if object.author %}<span class="author">{{ object.author }}</span> {% endif %}<span class="date">{{ object.date|date:"F j, Y" }}</span></p>
            <div class="excerpt">{{ object.excerpt|safe }}</div>
            {% if object.more_link_url %}<p><a class="more" href="{{ object.more_link_url }}">{{ object.more_link_text }}</a></p>{% endif %}
        </div>
    </li>
    {% endfor %}
</ul>

{% load i18n storybase_tags %}
{% comment %}
context:
- more_link_text, eg "View Projects" or "View Stories"
- more_link_url, a link to full listing of projects or stories
- objects, a list of dicts with keys:
    type
    title
    author
    date
    image_html
    excerpt
    url
    more_link_text
    more_link_url
{% endcomment %}
<ul class="slides">
    {% for object in objects %}
    <li>
        <div class="image">
            {{ object.image_html|safe }}
        </div>
        <div class="text">
            <p class="featured-type">{{ object.type }}</p>
            <h3><a href="{{ object.url }}" title="{{ object.title }}">{{ object.title }}</a></h3>
            <p class="byline">{% if object.author %}<span class="author">{{ object.author }}</span> {% endif %}<span class="date">{{ object.date|date:"F j, Y" }}</span></p>
            <div class="excerpt">
            {% if object.type == "News" %}
                {{ object.excerpt|safe }}
            {% else %}
                {{ object.excerpt|truncatewords_html:75|safe }}
            {% endif %}
            </div>
            {% if object.more_link_url %}<p><a class="more" href="{{ object.more_link_url }}">{{ object.more_link_text }}</a></p>{% endif %}
        </div>
    </li>
    {% endfor %}
</ul>

Truncate non-news featured item excerpts
Truncate non-news featured item excerpts

Truncate non-news featured items to 75 words.  I opted not to include a
"Read more" link because that would be redundant to the title and image
links.  Also, it's messy to check whether the text has been truncated or
not at the template layer and show the link conditionally.

Closes #589
