mirror of
				https://github.com/bspeice/speice.io
				synced 2025-11-04 02:20:36 -05:00 
			
		
		
		
	Add forward/backward navigation
This commit is contained in:
		
							
								
								
									
										23
									
								
								_includes/footer.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								_includes/footer.html
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
			
		||||
{% if page.layout == 'post' %}
 | 
			
		||||
{# Thanks to https://www.bytedude.com/jekyll-previous-and-next-posts/ #}
 | 
			
		||||
<div class="container">
 | 
			
		||||
    <hr>
 | 
			
		||||
    <div class="post-nav">
 | 
			
		||||
        <div>
 | 
			
		||||
            {% if page.previous.url %}
 | 
			
		||||
            <a href="{{page.previous.url}}">« {{page.previous.title}}</a>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="post-nav-next">
 | 
			
		||||
            {% if page.next.url %}
 | 
			
		||||
            <a href="{{page.next.url}}">{{page.next.title}} »</a>
 | 
			
		||||
            {% endif %}
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<script type="text/javascript"
 | 
			
		||||
    src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
 | 
			
		||||
    </script>
 | 
			
		||||
{% endif %}
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
layout: post
 | 
			
		||||
title: "Hello!"
 | 
			
		||||
description: ""
 | 
			
		||||
category: not-nerdy
 | 
			
		||||
category:
 | 
			
		||||
tags: []
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -95,3 +95,20 @@ blockquote {
 | 
			
		||||
    padding-left: 1.8rem;
 | 
			
		||||
    border-left: 5px solid $gray;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.post-nav {
 | 
			
		||||
    /* Insert your custom styling here. Example:
 | 
			
		||||
 | 
			
		||||
       font-size: 14px;
 | 
			
		||||
    */
 | 
			
		||||
    display: flex;
 | 
			
		||||
    margin-top: 1em;
 | 
			
		||||
    margin-bottom: 1em;
 | 
			
		||||
}
 | 
			
		||||
.post-nav div {
 | 
			
		||||
    /* flex-grow, flex-shrink, flex-basis */
 | 
			
		||||
    flex: 1 1 0;
 | 
			
		||||
}
 | 
			
		||||
.post-nav-next {
 | 
			
		||||
    text-align: right;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user