| {% from '_macros/_asset_list_item.html' import asset_list_item %}
include ../mixins/components

| {% block body %}
section.node-preview
	| {% if header_video_file %}
	.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
				<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
	| {% elif project.picture_header %}
	img.node-preview-thumbnail(src="{{ project.picture_header.thumbnail('l', api=api) }}")
	| {% endif %}

section.px-4
	h4.pt-4.pb-2 {{ project.name }}

	| {% if project.description %}
	.node-details-description
		| {{ project | markdowned('description') }}
	| {% endif %}

	| {% if activity_stream %}
	h5.py-4.border-top
		.text-secondary Featured Content

	+card-deck(class="pl-3 pb-3")
		| {% for n in activity_stream %}
		| {% if n.node_type not in ['comment'] %}
		| {{ asset_list_item(n, current_user) }}
		| {% endif %}
		| {% endfor %}
	| {% endif %}

	| {% if project.category in ['film', 'assets'] %}
	h5.py-4.border-top
		.text-secondary Latest Updates
	+timeline("{{ project._id }}")
	| {% endif %}

include _scripts

| {% endblock body %}
