Local-ize the Swiss theme
Ready for bastardisation :D
This commit is contained in:
21
_includes/previous-next.html
Normal file
21
_includes/previous-next.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!-- Use if you want to show previous and next for all posts. -->
|
||||
{% assign user_url = site.url | append: site.baseurl %}
|
||||
{% assign full_base_url = user_url | default: site.github.url %}
|
||||
{% if page.previous.url %}
|
||||
<div class="col-4 sm-width-full left mr-lg-4 mt-3">
|
||||
<a class="no-underline border-top-thin py-1 block" href="{{ page.previous.url | prepend: full_base_url }}">
|
||||
<span class="h5 bold text-accent">Previous</span>
|
||||
<p class="bold h3 link-primary mb-1">{{ page.previous.title }}</p>
|
||||
<p>{{ page.previous.content | strip_html | truncatewords:20 }}</p>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if page.next.url %}
|
||||
<div class="col-4 sm-width-full left mt-3">
|
||||
<a class="no-underline border-top-thin py-1 block" href="{{ page.next.url | prepend: full_base_url }}">
|
||||
<span class="h5 bold text-accent">Next</span>
|
||||
<p class="bold h3 link-primary mb-1">{{ page.next.title }}</p>
|
||||
<p>{{ page.next.content | strip_html | truncatewords:20 }}</p>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user