{% macro star(star) %}
<!-- STAR: {{star.id}} -->
<span class="content">
    {% if star.title %}
        <a href="{{ url_for('star', id=star.id) }}">
            <h1>{{ star.title }}</h1>
        </a>
    {% endif %}

    {% if star.text %}
        <p>{{ star.text }}</p>
    {% endif %}
</span>

<span class="meta">
    <span class="attribute">
        <form action="{{ url_for('oneup', star_id=star.id) }}" method="POST">
            <button class="oneup btn btn-mini {% if star.oneupped() %}btn-primary{% else %}btn-inverse{% endif %}" id="oneup-{{star.id}}" type="button">
                <span class="oneup-count" id="oneup-count-{{star.id}}">{{star.oneup_count()}}</span> <i class="fa fa-white fa-arrow-up"></i>
            </button>
        </form>
    </span>

    <span class="attribute">
        <i class="fa fa-asterisk"></i>
        <span class="caption">
            <a href="{{ url_for('star', id=star.id) }}" title="{{star.created}}">{{star.created|naturaltime}}</a>
        </span>
    </span>

    <span class="inline-semantic"> by </span>

    <span class="attribute">
        <i class="fa fa-circle-blank"></i>
        <span class="caption">
            <a href="{{ url_for('persona', id=star.author.id) }}">{{ star.author.username}}</a>
        </span>
    </span>
</span>
{% endmacro %}
