From 6c93a756fea3df39f19a02e088992a79a0711852 Mon Sep 17 00:00:00 2001
From: sijanec
Date: Sat, 7 Nov 2020 01:24:59 +0100
Subject: =?UTF-8?q?dodal=20fancy=20stuff;=20kategorije,=20slovenske=20?=
=?UTF-8?q?=C5=A1tevilke=20-=20=C5=A1tetje?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
_includes/posts_by_author.html | 7 +++++++
_includes/slnum.html | 11 +++++++++++
_layouts/author.html | 11 +++--------
_layouts/default.html | 2 +-
_layouts/post.html | 16 ++++++++++------
_posts/2020-11-05-prva-objava.md | 1 +
_posts/2020-11-06-druga-objava.md | 8 ++++++++
kategorije.html | 33 +++++++++++++++++++++++++++++++++
8 files changed, 74 insertions(+), 15 deletions(-)
create mode 100644 _includes/posts_by_author.html
create mode 100644 _includes/slnum.html
create mode 100644 _posts/2020-11-06-druga-objava.md
create mode 100644 kategorije.html
diff --git a/_includes/posts_by_author.html b/_includes/posts_by_author.html
new file mode 100644
index 0000000..c0fbb4c
--- /dev/null
+++ b/_includes/posts_by_author.html
@@ -0,0 +1,7 @@
+{% comment %} argv: authorname {% endcomment %}
+{% assign posts_by_author = site.posts | where: "author", argv[0] %}
+{% assign author_not_specified = site.posts | where: 'author', nil %}
+{% if argv[0] == "anonymous" %}
+ {% assign posts_by_author = author_not_specified | concat: posts_by_author %}
+{% endif %}
+{% assign return = posts_by_author | sort: "date" | reverse %}
diff --git a/_includes/slnum.html b/_includes/slnum.html
new file mode 100644
index 0000000..a8c3469
--- /dev/null
+++ b/_includes/slnum.html
@@ -0,0 +1,11 @@
+{% comment %} argv: stevilo,niz0,niz1,niz2,niz34 {% endcomment %}
+{% assign argv[0] = argv[0] | modulo: 100 %}
+{% if argv[0] == "1" %}
+ {% assign return = argv[2] %}
+{% elsif argv[0] == "2" %}
+ {% assign return = argv[3] %}
+{% elsif argv[0] == "4" or argv[0] == "3" %}
+ {% assign return = argv[4] %}
+{% else %}
+ {% assign return = argv[1] %}
+{% endif %}
diff --git a/_layouts/author.html b/_layouts/author.html
index 7c5cddc..44e62e5 100644
--- a/_layouts/author.html
+++ b/_layouts/author.html
@@ -11,14 +11,9 @@ layout: default
objave:
{{ content }}
diff --git a/_posts/2020-11-05-prva-objava.md b/_posts/2020-11-05-prva-objava.md
index 190a617..a6ee19d 100644
--- a/_posts/2020-11-05-prva-objava.md
+++ b/_posts/2020-11-05-prva-objava.md
@@ -1,6 +1,7 @@
---
author: anton
title: prva objava
+categories: objava test
---
To je prva objava na tem blogu. Kmalu pričakujte več vsebine.
diff --git a/_posts/2020-11-06-druga-objava.md b/_posts/2020-11-06-druga-objava.md
new file mode 100644
index 0000000..e4465ba
--- /dev/null
+++ b/_posts/2020-11-06-druga-objava.md
@@ -0,0 +1,8 @@
+---
+author: anton
+title: druga objava
+categories: test
+---
+To je druga objava na tem blogu. Kmalu pričakujte več vsebine.
+
+Adijo!
diff --git a/kategorije.html b/kategorije.html
new file mode 100644
index 0000000..f14da95
--- /dev/null
+++ b/kategorije.html
@@ -0,0 +1,33 @@
+---
+layout: default
+title: kategorije
+---
+
+ kategorije
+
+
+ {% assign argv = ",kategorij,kategorija,kategoriji,kategorije" | prepend: site.categories.size | split: "," %}
+ {{ site.categories.size }} {% include slnum.html %} {{ return }}
+
+
+ {% assign cats = site.categories | sort %}
+ {% for category in cats reversed %}
+ -
+
+ {{ category[0] }}
+
+
+
+ {% assign argv = ",objav,objava,objavi,objave" | prepend: category[1].size | split: "," %}
+ {{ category[1].size }} {{ return }}:
+
+ {% assign i = 1 %}
+ {% for post in category[1] %}
+ {{ post.title }} @ {{ post.date | date: site.short_date_format }}{% assign i = i | plus: 1 %}{% if i < category[1].size %},
+ {% elsif i == category[1].size %}
+ in
+ {% endif %}{% endfor %}.
+
+
+ {% endfor %}
+
--
cgit v1.2.3