all repos — nasg @ f84088f311cdb36dacf973411c9731446c67104b

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
{% 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' %}

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

	<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="page-numbers 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="page-numbers taxonomy.page">{{ 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="page-numbers 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' %}