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 +++++++++++ 2 files changed, 18 insertions(+) create mode 100644 _includes/posts_by_author.html create mode 100644 _includes/slnum.html (limited to '_includes') 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 %} -- cgit v1.2.3