summaryrefslogtreecommitdiff
path: root/_includes/git-wiki/components/lists
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2018-12-17 19:19:20 +0100
committerYehonal <yehonal.azeroth@gmail.com>2018-12-17 21:01:20 +0100
commit4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a (patch)
tree3e671c486e329d2b67312cf7c6a4d81bff5c07ed /_includes/git-wiki/components/lists
parent2e2c8eefe545b70e0d7c5f1286477a083aff1f06 (diff)
downloadwiki-4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a.tar.gz
wiki-4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a.tar.bz2
wiki-4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a.zip
v2.1.0 with blog feature implemented
Diffstat (limited to '_includes/git-wiki/components/lists')
-rw-r--r--_includes/git-wiki/components/lists/page-list.html26
-rw-r--r--_includes/git-wiki/components/lists/post-list.html26
2 files changed, 52 insertions, 0 deletions
diff --git a/_includes/git-wiki/components/lists/page-list.html b/_includes/git-wiki/components/lists/page-list.html
new file mode 100644
index 0000000..8c32b63
--- /dev/null
+++ b/_includes/git-wiki/components/lists/page-list.html
@@ -0,0 +1,26 @@
+{% if site.inc_before_page_list %}
+{% include {{ site.inc_before_page_list }} %}
+{% endif %}
+
+<span class="page-list-title">Pages {% if (site.show_wiki_pages_limit >= 1 %} (Latest {{site.show_wiki_pages_limit }} updated) {% endif %}:</span>
+<ul class="page-list">
+{% assign numPages=0 %}
+{% assign items = site.pages | sort: 'date' %}
+{% for post in items %}
+{% if numPages >= site.show_wiki_pages_limit %}
+ {% break %}
+{% endif %}
+
+{% if post.layout != "null" and post.sitemap != false and post.title %}
+ <li class="page-list-item">
+ <a href="{{ post.url | relative_url }}">{{ post.title}}</a>
+ </li>
+ {% assign numPages = numPages | plus: 1 %}
+{% endif %}
+
+{% endfor %}
+</ul>
+
+{% if site.inc_after_page_list %}
+{% include {{ site.inc_after_page_list }} %}
+{% endif %} \ No newline at end of file
diff --git a/_includes/git-wiki/components/lists/post-list.html b/_includes/git-wiki/components/lists/post-list.html
new file mode 100644
index 0000000..5e39359
--- /dev/null
+++ b/_includes/git-wiki/components/lists/post-list.html
@@ -0,0 +1,26 @@
+{% if site.inc_before_post_list %}
+{% include {{ site.inc_before_post_list }} %}
+{% endif %}
+
+<span class="post-list-title">Posts {% if (site.show_wiki_post_limit >= 1 %} (Latest {{site.show_wiki_post_limit }} updated) {% endif %}:</span>
+<ul class="post-list">
+{% assign numPages=0 %}
+{% assign items = site.posts | sort: 'date' %}
+{% for post in items %}
+{% if numPages >= site.show_wiki_post_limit %}
+ {% break %}
+{% endif %}
+
+{% if post.layout != "null" and post.sitemap != false and post.title %}
+ <li class="post-list-item">
+ <a href="{{ post.url | relative_url }}">{{ post.title}}</a>
+ </li>
+ {% assign numPages = numPages | plus: 1 %}
+{% endif %}
+
+{% endfor %}
+</ul>
+
+{% if site.inc_after_post_list %}
+{% include {{ site.inc_after_post_list }} %}
+{% endif %} \ No newline at end of file