Skip to content

Commit

Permalink
Add option to show navigation on item detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
ParitoshBh committed Sep 25, 2018
1 parent 2a05e8c commit 387ed22
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
4 changes: 3 additions & 1 deletion grav-coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ dropdown:
navbar:
title: Grav Coder
footer:
copyright: Grav Coder
copyright: Grav Coder
post:
navigation: true
41 changes: 23 additions & 18 deletions templates/item.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,30 @@
{{ page.content }}
</div>

<footer class="page-footer">
<!--{% if page.taxonomy.tag %}
<div class="tags">
<i class="fas fa-tag"></i>
{% for tag in page.taxonomy.tag %}
<a href="{{ blog.url|rtrim('/') }}/categories/{{ tag }}">{{ tag }},</a>
{% endfor %}
</div>
{% endif %}-->
{% if page.taxonomy.category %}
<div class="categories">
<i class="fas fa-folder"></i>
{% for category in page.taxonomy.category %}
<!--<a href="{{ blog.url|rtrim('/') }}/categories/{{ category }}">{{ category }}</a>-->
<a href="#">{{ category }}</a>
{% endfor %}
<br/>
{% if page.taxonomy.category %}
<div class="categories">
<i class="fas fa-folder"></i>
{% for category in page.taxonomy.category %}
<!--<a href="{{ blog.url|rtrim('/') }}/categories/{{ category }}">{{ category }}</a>-->
<a href="#">{{ category }}</a>
{% endfor %}
</div>
{% endif %}

{# Show navigation if enabled, defaults to true #}
{% if theme_config.post.navigation %}
<footer class="page-footer">
<div>
{% if not page.isLast %}
<div class="float-left"><i class="far fa-hand-point-left"></i> <a href="{{ page.prevSibling.url }}">Previous Article</a></div>
{% endif %}
{% if not page.isFirst %}
<div class="float-right"><a href="{{ page.nextSibling.url }}">Next Article</a> <i class="far fa-hand-point-right"></i></div>
{% endif %}
</div>
{% endif %}
</footer>
</footer>
{% endif %}

</article>
</section>
Expand Down

0 comments on commit 387ed22

Please sign in to comment.