summaryrefslogtreecommitdiff
path: root/_layouts
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2018-12-17 20:40:19 +0100
committerYehonal <yehonal.azeroth@gmail.com>2018-12-17 21:01:48 +0100
commita7816c160e06b2ee7684dcb66e1480cfcde0e90a (patch)
treee9774271cb36b8102a3a705661c11ec247ab8fd7 /_layouts
parent15416ecb2d7b0a38eae59385a600a7e27cd59110 (diff)
downloadwiki-a7816c160e06b2ee7684dcb66e1480cfcde0e90a.tar.gz
wiki-a7816c160e06b2ee7684dcb66e1480cfcde0e90a.tar.bz2
wiki-a7816c160e06b2ee7684dcb66e1480cfcde0e90a.zip
Improved blog feature and other minor fixes
Diffstat (limited to '_layouts')
-rw-r--r--_layouts/git-wiki-blog.html57
-rw-r--r--_layouts/git-wiki-post.html15
2 files changed, 72 insertions, 0 deletions
diff --git a/_layouts/git-wiki-blog.html b/_layouts/git-wiki-blog.html
new file mode 100644
index 0000000..1241770
--- /dev/null
+++ b/_layouts/git-wiki-blog.html
@@ -0,0 +1,57 @@
+---
+title: Blog
+layout: git-wiki-default
+---
+<style>
+.pagination a, .pagination span {
+ padding: 7px 18px;
+ border: 1px solid #eee;
+ margin-left: -2px;
+ margin-right: -2px;
+ background-color: #ffffff;
+ display: inline-block;
+ }
+
+.pagination a {
+ &:hover {
+ background-color: #f1f1f1;
+ color: #333;
+ }
+ }
+
+.pagination {
+ text-align: center;
+ }
+</style>
+
+<!-- This loops through the paginated posts -->
+{% for post in paginator.posts %}
+ <h1><a href="{{ post.url }}">{{ post.id }}</a></h1>
+ <p class="author">
+ <span class="date">{{ post.date | date: "%-d %B %Y"}}</span>
+ </p>
+ <div class="content">
+ {{ post.excerpt }}
+
+ <a href="{{ post.url }}">...Read all</a>
+ </div>
+{% endfor %}
+
+<!-- Pagination links -->
+<div class="pagination">
+ {% if paginator.previous_page %}
+ <a href="{{ paginator.previous_page_path }}" class="previous">
+ Previous
+ </a>
+ {% else %}
+ <span class="previous">Previous</span>
+ {% endif %}
+ <span class="page_number ">
+ Page: {{ paginator.page }} of {{ paginator.total_pages }}
+ </span>
+ {% if paginator.next_page %}
+ <a href="{{ paginator.next_page_path }}" class="next">Next</a>
+ {% else %}
+ <span class="next ">Next</span>
+ {% endif %}
+</div> \ No newline at end of file
diff --git a/_layouts/git-wiki-post.html b/_layouts/git-wiki-post.html
new file mode 100644
index 0000000..3184199
--- /dev/null
+++ b/_layouts/git-wiki-post.html
@@ -0,0 +1,15 @@
+---
+layout: git-wiki-default
+---
+
+<small>{{ page.date | date: "%-d %B %Y" }}</small>
+{% if page.author or site.author %}
+<p class="view">by {{ page.author | default: site.author }}</p>
+{% endif %}
+
+{{content}}
+
+
+{% if page.tags.size > 0 %}
+ <small>tags: <em>{{ page.tags | join: "</em> - <em>" }}</em></small>
+{% endif %} \ No newline at end of file