mirror of
				https://github.com/pawroman/zola-theme-terminimal.git
				synced 2025-11-04 09:50:25 +01:00 
			
		
		
		
	Merge pull request #24 from pawroman/fix-navigation-for-zola-0.16
Fix post navigation for Zola 0.16
This commit is contained in:
		
						commit
						c06e9232db
					
				
					 3 changed files with 9 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,7 @@
 | 
			
		|||
See the live demo (of the default configuration) here:
 | 
			
		||||
https://pawroman.github.io/zola-theme-terminimal/
 | 
			
		||||
 | 
			
		||||
Tested with Zola v0.15.3.
 | 
			
		||||
Tested with Zola v0.16.1. Please note that earlier versions might not work because of breaking changes across Zola versions.
 | 
			
		||||
 | 
			
		||||
#### Fork disclaimer
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -58,7 +58,7 @@ menu_items = [
 | 
			
		|||
    {name = "github", url = "https://github.com/pawroman/zola-theme-terminimal", newtab = true},
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
# Whether to show links to earlier and later posts
 | 
			
		||||
# Whether to show links to earlier and later (aka. higher/lower) posts
 | 
			
		||||
# on each post page (defaults to true).
 | 
			
		||||
enable_post_view_navigation = true
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,25 +28,25 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
{% macro earlier_later(page) %}
 | 
			
		||||
    {%- if config.extra.enable_post_view_navigation and page.earlier or page.later %}
 | 
			
		||||
    {%- if config.extra.enable_post_view_navigation and page.lower or page.higher %}
 | 
			
		||||
        <div class="pagination">
 | 
			
		||||
            <div class="pagination__title">
 | 
			
		||||
                <span class="pagination__title-h">{{ config.extra.post_view_navigation_prompt }}</span>
 | 
			
		||||
                <hr />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="pagination__buttons">
 | 
			
		||||
                {%- if page.later %}
 | 
			
		||||
                {%- if page.higher %}
 | 
			
		||||
                    <span class="button previous">
 | 
			
		||||
                        <a href="{{ page.later.permalink | safe }}">
 | 
			
		||||
                        <a href="{{ page.higher.permalink | safe }}">
 | 
			
		||||
                            <span class="button__icon">←</span> 
 | 
			
		||||
                            <span class="button__text">{{ page.later.title }}</span>
 | 
			
		||||
                            <span class="button__text">{{ page.higher.title }}</span>
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </span>
 | 
			
		||||
                {% endif %}
 | 
			
		||||
                {% if page.earlier %}
 | 
			
		||||
                {% if page.lower %}
 | 
			
		||||
                    <span class="button next">
 | 
			
		||||
                        <a href="{{ page.earlier.permalink | safe }}">
 | 
			
		||||
                            <span class="button__text">{{ page.earlier.title }}</span> 
 | 
			
		||||
                        <a href="{{ page.lower.permalink | safe }}">
 | 
			
		||||
                            <span class="button__text">{{ page.lower.title }}</span> 
 | 
			
		||||
                            <span class="button__icon">→</span>
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </span>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue