home ยป zplus/freepost.git
ID: 99ac99cf2af5e6b5808384d398304ae34d748039
39 lines โ€” 1K โ€” View raw


{% include 'header.twig' %}

<div class="posts">
    
    {% for post in search_results %}
    
        <div class="post">
            <div class="title">
                {% if post.link|length > 0 %}
                    <a href="{{ post.link }}">
                        {{ post.title }}
                    </a>
                {% else %}
                    <a href="post/{{ post.hashId }}">
                        {{ post.title }}
                    </a>
                {% endif %}
            </div>
            
            <div class="info">
                <em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
                by <a href="{{ ('user/' ~ post.username|url_encode)|docroot }}">{{ post.username }}</a>
                โ€”
                <a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount }} comments</a>
            </div>
        </div>
        
    {% endfor %}
    
    {# Add once I'll have fulltext search
    <div class="more">
        <a href="?page={{ page + 1 }}" class="button button_default1">
            More
        </a>
    </div>
    #}
</div>

{% include 'footer.twig' %}