Files
pillar/src/templates/nodes/custom/blog/index.pug
Pablo Vazquez d347ddac2c Navigation: Films -> Open Projects
And show navigation when in the Blog
2018-09-19 19:33:01 +02:00

47 lines
1.3 KiB
Plaintext

| {% extends 'layout.html' %}
| {% import 'nodes/custom/blog/_macros.html' as blogmacros %}
| {% from 'projects/_macros.html' import render_secondary_navigation %}
| {% from '_macros/_navigation.html' import navigation_homepage %}
| {% set title = 'blog' %}
| {% block page_title %}Blog{% endblock%}
| {% block navigation_tabs %}
| {% if project.url == 'blender-cloud' %}
| {{ navigation_homepage(title) }}
| {% else %}
| {{ render_secondary_navigation(project, navigation_links, title) }}
| {% endif %}
| {% endblock navigation_tabs %}
| {% block body %}
| {{ blogmacros.render_blog_index(node, project, posts, can_create_blog_posts, api, more_posts_available, posts_meta, pages=pages) }}
| {% endblock %}
| {% block footer_scripts %}
include ../_scripts
script.
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;
}
});
| {% endblock %}