summaryrefslogtreecommitdiffstats
path: root/blog/kategorije.html
blob: 6054f1ee584848feccf0693c4615a3f0a315a2c9 (plain) (blame)
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
---
layout: default
title: kategorije
---
<h3>
	<a href=objave.html>objave</a> | kategorije | <a href=znacke.html>značke</a>
</h3>
<h2>
	{% assign argv = ",kategorij,kategorija,kategoriji,kategorije" | prepend: site.categories.size | split: "," %}
	{{ site.categories.size }} {% include slnum.html %} {{ return }}
</h2>
<ul>
	{% capture category_sizes %}{% for category in site.categories %}{{ category[1].size | plus: -1000 }} {{ category[0]}}^{% endfor %}{% endcapture %}
	{% assign categories_sorted_by_number_of_posts = category_sizes | split: "^" | sort %}
	{% for pre_processed_category in categories_sorted_by_number_of_posts %}
		{% assign category_with_size = pre_processed_category | split: " " %}
		{% assign key = category_with_size[1] %}
		{% assign category = site.categories[key] %}
		<li>
			<h3 id="{{ key }}">
				{{ key }}
			</h3>
			<p>
				<b>
					{% assign argv = ",objav,objava,objavi,objave" | prepend: category.size | split: "," %}
					{{ category.size }} <!--{% include slnum.html %}-->{{ return }}:
				</b>
				{% assign i = 1 %}
				{% for post in category %}
					<a href="{{ post.url }}">{{ post.title }} @ {{ post.date | date: site.short_date_format }}</a>{% assign i = i | plus: 1 %}{% if i < category.size %},
					{% elsif i == category.size %}
						in
					{% endif %}{% endfor %}.
			</p>
		</li>
	{% endfor %}
</ul>