41 lines
1.1 KiB
Plaintext
41 lines
1.1 KiB
Plaintext
| {% extends 'layout.html' %}
|
|
| {% import 'nodes/custom/blog/_macros.html' as blogmacros %}
|
|
| {% set title = 'blog' %}
|
|
|
|
| {% block page_title %}Blog{% endblock%}
|
|
|
|
| {% block css %}
|
|
| {{ super() }}
|
|
link(href="{{ url_for('static_cloud', filename='assets/css/project-landing.css') }}", rel="stylesheet")
|
|
| {% endblock css %}
|
|
|
|
| {% block body %}
|
|
| {{ blogmacros.render_blog_index(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 %}
|