| {% from '_macros/_asset_list_item.html' import asset_list_item %}
include ../mixins/components
| {% block body %}
section.node-preview.project
| {% if header_video_file %}
.embed-responsive.embed-responsive-16by9
video#videoplayer.video-js.vjs-fluid.embed-responsive-item(
controls,
data-setup="{}",
preload="auto",
poster="{% if header_video_node.picture %}{{ header_video_node.picture.thumbnail('l', api=api) }}{% endif %}")
| {% for source in header_video_file.variations %}
source(
src="{{ source.link | safe }}",
type="{{ source.content_type }}")
| {% endfor %}
p.vjs-no-js.
To view this video please enable JavaScript, and consider upgrading to a web browser that
supports HTML5 video
| {% elif project.picture_header %}
a(href="{{ url_for( 'projects.view', project_url=project.url) }}")
img.header(src="{{ project.picture_header.thumbnail('l', api=api) }}")
| {% endif %}
section.px-4
h4.pt-4
a.text-muted(href="{{ url_for( 'projects.view', project_url=project.url) }}")
| {{ project.name }}
| {% if project.description %}
.node-details-description
| {{ project | markdowned('description') }}
| {% endif %}
| {% if activity_stream %}
+card-deck(class="pt-4 border-top")
| {% for n in activity_stream %}
| {% if n.node_type not in ['comment'] %}
| {{ asset_list_item(n, current_user) }}
| {% endif %}
| {% endfor %}
| {% endif %}
include _scripts
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.montage.min.js') }}")
script.
function montage(){
var $container = $('#featured-list'),
$imgs = $container.find('img').hide(),
totalImgs = $imgs.length,
cnt = 0;
$imgs.each(function(i) {
var $img = $(this);
$('
').on('load', function() {
++cnt;
if( cnt === totalImgs ) {
$imgs.show();
$container.montage({
fillLastRow : true,
alternateHeight : true,
alternateHeightRange : {
min : 180,
max : 240
},
margin : 3
});
}
}).attr('src',$img.attr('src'));
$img.parent().removeClass('hidden');
});
}
$(function() {
montage();
$(".node-updates-list-item.asset, .node-updates-list-item.group")
.unbind('click')
.click(function(e) {
e.preventDefault();
displayNode($(this).data('node_id'));
});
});
| {% endblock %}