all repos — nasg @ 0d1663d0dae1748a3d3da4204866b4389950ea57

templates/Category.html (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
{% include 'block_header_open.html' %}
    <title>{{ taxonomy.title }}</title>
    <link rel="alternate" type="application/atom+xml" title="{{ taxonomy.title }} feed" href="{{ taxonomy.feed }}" />
    <link rel="self" href="{{ site.url }}{{ taxonomy.feed }}/" />

{% include 'block_header_close.html' %}

{% if taxonomy.add_welcome %}
<aside class="siteinfo limit">
    <p>Hi!</p>
    <p>Your are on a personal homepage. It has been my home one the Internet for many years, although the URL had changed a few times. It's <a href="https://indieweb.org/">IndieWeb</a>-compatible, and all content is produced by me. </p>
    <p>This page is a feed of everything that gets on the site.</p>
</aside>
{% endif %}

<section class="content-body h-feed">
    <nav>
        <p class="follow">
            <a title="follow {{ taxonomy.title }}" rel="feed" href="{{ site.url }}{{ taxonomy.feed }}">
                <svg class="icon" width="16" height="16">
                    <use xlink:href="#icon-rss" />
                </svg>
            </a>
        </p>
    </nav>

    <h1 class="p-name hide">{{ taxonomy.name }}</h1>
    {% for post in posts %}
        <article class="h-entry hentry" lang="{{ post.lang }}">
            <header>
                <h2>{% include 'Singular_title.html' %}</h2>
            </header>


            {% if post.summary %}
            <div class="e-summary entry-summary">
                {{ post.summary }}
                <span class="more">
                    <a href="/{{ post.slug }}" title="{{ post.title }}">
                    {% if post.lang == 'hu' %}Tovább »{% else %}Continue »{% endif %}
                    </a>
                </span>
            </div>
            {% else %}
            <div class="e-content entry-content">
                {% if post.photo %}
                    {{ post.photo }}
                {% endif %}
                {{ post.html }}
            </div>
            {% endif %}
        </article>

    {% endfor %}
</section>

{% if taxonomy.total > 1 %}

    {# based on: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/ #}
    <nav class="pagination">
        <ul>
    {% if taxonomy.page > 1 %}
    {% set prev = taxonomy.page - 1 %}
            <li>
                <a rel="prev" href="{{ taxonomy.url }}page/{{ prev }}">«</a>
            </li>
            <li>
                <a rel="prev" href="{{ taxonomy.url }}">1</a>
            </li>
    {% endif %}

    {% if taxonomy.page - 4 > 0 %}
            <li>
                <span class="dots">…</span>
            </li>
    {% endif %}


        {% if ( taxonomy.page - 1 > 1 ) %}
            <li>
                <a href="{{ taxonomy.url }}page/{{ taxonomy.page - 1 }}">{{ taxonomy.page - 1 }}</a>
            </li>
        {% endif %}


            <li>
                <span class="current">{{ taxonomy.page }}</span>
            </li>


        {% if ( taxonomy.page + 1 <= taxonomy.total -1 ) %}
            <li>
                <a href="{{ taxonomy.url }}page/{{ taxonomy.page + 1 }}">{{ taxonomy.page + 1 }}</a>
            </li>
        {% endif %}


    {% if taxonomy.page  + 3 < taxonomy.total %}
            <li>
                <span class="dots">…</span>
            </li>
    {% endif %}


    {% if taxonomy.page != taxonomy.total %}
            <li>
                <a href="{{ taxonomy.url }}page/{{ taxonomy.total }}">{{ taxonomy.total }}</a>
            </li>
    {% endif %}

    {% if taxonomy.page < taxonomy.total %}
    {% set next = taxonomy.page + 1 %}
            <li>
                <a rel="next" href="{{ taxonomy.url }}page/{{ next }}">»</a>
            </li>
    {% endif %}
        </ul>
    </nav>

{% endif %}

{% include 'block_footer.html' %}