Created
November 29, 2015 17:36
-
-
Save bobrocke/4ec482cbf2f60fd41304 to your computer and use it in GitHub Desktop.
Blog post template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /templates/item.html.twig --> | |
{% embed 'partials/base.html.twig' %} | |
{% set base_url = base_url_relative ~ site.blog.route %} | |
{% block content %} | |
<div class="article-block"> | |
{% include 'partials/blog_item.html.twig' with {'blog':page.parent, 'truncate':false} %} | |
</div> | |
{% endblock %} | |
{% block pagination %} | |
<div class="older-newer container"> | |
<div class="older column-left"> | |
{% if not page.isLast %} | |
<a class="previous-page" href="{{ page.prevSibling.url }}"><small><i class="fa fa-chevron-circle-left"></i> Previous Post</small><br>{{ page.prevSibling.title }}</a> | |
{% endif %} | |
</div> | |
<div class="newer column-right"> | |
{% if not page.isFirst %} | |
<a class="next-page" href="{{ page.nextSibling.url }}"><small>Next Post <i class="fa fa-chevron-circle-right"></i></small><br>{{ page.nextSibling.title }}</a> | |
{% endif %} | |
</div> | |
</div> | |
{% endblock %} | |
{% block comments %} | |
<hr class="comment-rule"> | |
<div id="disqus_thread" class="comments"></div> | |
<script type="text/javascript"> | |
var disqus_shortname = '{{ site.disqus_shortname }}'; | |
var disqus_identifier = '{{ page.slug }}'; | |
var disqus_title = '{{ page.title }}'; | |
var disqus_url = '{{ page.url(true) }}'; | |
/* * * DON'T EDIT BELOW THIS LINE * * */ | |
(function() { | |
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | |
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; | |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | |
})(); | |
</script> | |
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | |
{% endblock %} | |
{% endembed %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment