summaryrefslogtreecommitdiffstats
path: root/_includes
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-11-07 01:24:59 +0100
committersijanec <sijanecantonluka@gmail.com>2020-11-07 01:24:59 +0100
commit6c93a756fea3df39f19a02e088992a79a0711852 (patch)
tree80ffcddb9851859724321cf78b95e0d4ef04551a /_includes
parentpopravil linke (diff)
downloadsijanec.eu-6c93a756fea3df39f19a02e088992a79a0711852.tar
sijanec.eu-6c93a756fea3df39f19a02e088992a79a0711852.tar.gz
sijanec.eu-6c93a756fea3df39f19a02e088992a79a0711852.tar.bz2
sijanec.eu-6c93a756fea3df39f19a02e088992a79a0711852.tar.lz
sijanec.eu-6c93a756fea3df39f19a02e088992a79a0711852.tar.xz
sijanec.eu-6c93a756fea3df39f19a02e088992a79a0711852.tar.zst
sijanec.eu-6c93a756fea3df39f19a02e088992a79a0711852.zip
Diffstat (limited to '_includes')
-rw-r--r--_includes/posts_by_author.html7
-rw-r--r--_includes/slnum.html11
2 files changed, 18 insertions, 0 deletions
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 %}