2018-09-14 20:29:44 +02:00
|
|
|
| {% extends 'layout.html' %}
|
2017-09-29 16:19:31 +02:00
|
|
|
| {% import 'nodes/custom/blog/_macros.html' as blogmacros %}
|
2018-09-14 20:29:44 +02:00
|
|
|
| {% from 'projects/_macros.html' import render_secondary_navigation %}
|
|
|
|
|
2016-08-19 09:19:06 +02:00
|
|
|
| {% set title = 'blog' %}
|
2018-09-14 20:29:44 +02:00
|
|
|
|
2016-08-19 09:19:06 +02:00
|
|
|
| {% block page_title %}Blog{% endblock%}
|
|
|
|
|
2018-09-14 20:29:44 +02:00
|
|
|
| {% block navigation_tabs %}
|
|
|
|
| {{ render_secondary_navigation(project, navigation_links, title) }}
|
|
|
|
| {% endblock navigation_tabs %}
|
2016-08-19 09:19:06 +02:00
|
|
|
|
2018-09-14 20:29:44 +02:00
|
|
|
| {% block body %}
|
|
|
|
| {{ blogmacros.render_blog_index(project, posts, can_create_blog_posts, api, more_posts_available, posts_meta, pages=pages) }}
|
2016-08-19 09:19:06 +02:00
|
|
|
| {% endblock %}
|
|
|
|
|
|
|
|
| {% block footer_scripts %}
|
2018-09-14 20:29:44 +02:00
|
|
|
|
2016-08-19 09:19:06 +02:00
|
|
|
include ../_scripts
|
2016-12-01 16:42:17 +01:00
|
|
|
script.
|
2018-09-14 20:29:44 +02:00
|
|
|
hopToTop(); // Display jump to top button
|
|
|
|
|
|
|
|
/* Expand images when their link points to a jpg/png/gif */
|
|
|
|
/* TODO: De-duplicate code from view post */
|
|
|
|
var page_overlay = document.getElementById('page-overlay');
|
|
|
|
$('.item-content a img').on('click', function(e){
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
var href = $(this).parent().attr('href');
|
|
|
|
var src = $(this).attr('src');
|
|
|
|
|
|
|
|
if (href.match("jpg$") || href.match("png$") || href.match("gif$")) {
|
|
|
|
$(page_overlay)
|
|
|
|
.addClass('active')
|
|
|
|
.html('<img src="' + src + '"/>');
|
|
|
|
} else {
|
|
|
|
window.location.href = href;
|
2017-03-23 18:52:24 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2016-08-19 09:19:06 +02:00
|
|
|
| {% endblock %}
|