home » zplus/freepost.git
ID: 50faca5cea01fbcae1c597ea47f1a031c589963b
80 lines — 3K — View raw


{% include 'header.twig' %}

<script>
/*
This is the code powering <http://freepo.st>.
Copyright © 2014-2016 zPlus
Copyright © 2016 Adonay "adfeno" Felipe Nogueira <adfeno@openmailbox.org> <https://libreplanet.org/wiki/User:Adfeno>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
</script>

<div class="posts">
    
    {# banner
        <div class="bg-success" style="margin: 0 0 2em 0; padding: .5em;">
            <img alt="" title="" src="images/pulse.gif" style="height: 1em;" />
            miniLAC conference (Berlin)
            <a href="https://streaming.media.ccc.de/minilac16/mainhall/">Mainhall</a>

            <a href="https://streaming.media.ccc.de/minilac16/seminar-room/">Seminar room</a>

            <a href="http://minilac.linuxaudio.org/index.php/Schedule">Schedule</a>
        </div>
    #}
    
    {% for post in posts %}
    
        <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">
                {%
                    include 'vote.twig' with {
                        target: 'post',
                        hash_id: post.hashId,
                        vote: votes[post.id] is defined ? votes[post.id].vote : null,
                        vote_count: post.vote,
                        user: user is defined ? user : null
                    } only
                %}
                
                <em><a href="post/{{ post.hashId }}">{{ post.created|ago }}</a></em>
                by <a href="{{ ('user/' ~ post.username)|docroot }}">{{ post.username }}</a>
                <a href="post/{{ post.hashId }}#comments">{{ post.commentsCount ? post.commentsCount }} comments</a>
            </div>
        </div>
        
    {% endfor %}
    
    <div class="more">
        <a href="?page={{ page + 1 }}" class="btn btn-sm btn-danger">
            More <span style="margin-left: 1em"></span>
        </a>
    </div>
</div>

{% include 'footer.twig' %}