2018-09-10 19:02:27 +02:00
|
|
|
include ../mixins/components
|
2016-08-19 09:19:06 +02:00
|
|
|
|
2018-09-10 19:02:27 +02:00
|
|
|
| {% block body %}
|
2016-08-19 09:19:06 +02:00
|
|
|
#node-container
|
|
|
|
section.node-preview.project
|
2016-11-11 15:37:41 +01:00
|
|
|
| {% if header_video_file %}
|
2017-09-21 19:04:55 +02:00
|
|
|
video#videoplayer.video-js.vjs-fluid(
|
2017-02-02 16:57:18 +01:00
|
|
|
controls,
|
|
|
|
data-setup="{}",
|
|
|
|
preload="auto",
|
2017-02-06 12:07:05 +01:00
|
|
|
poster="{% if header_video_node.picture %}{{ header_video_node.picture.thumbnail('l', api=api) }}{% endif %}")
|
|
|
|
| {% for source in header_video_file.variations %}
|
2017-02-02 16:57:18 +01:00
|
|
|
source(
|
2017-02-06 12:07:05 +01:00
|
|
|
src="{{ source.link | safe }}",
|
|
|
|
type="{{ source.content_type }}")
|
2017-02-02 16:57:18 +01:00
|
|
|
| {% 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>
|
2016-08-19 09:19:06 +02:00
|
|
|
| {% elif project.picture_header %}
|
2016-12-02 18:02:27 +01:00
|
|
|
a(href="{{ url_for( 'projects.view', project_url=project.url) }}")
|
2016-08-19 09:19:06 +02:00
|
|
|
img.header(src="{{ project.picture_header.thumbnail('l', api=api) }}")
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
section.node-details-container.project
|
2018-08-31 19:31:36 +02:00
|
|
|
h2.px-3.pt-3
|
2018-09-06 12:52:54 +02:00
|
|
|
a.text-muted(href="{{ url_for( 'projects.view', project_url=project.url) }}") {{ project.name }}
|
2016-08-19 09:19:06 +02:00
|
|
|
|
2017-04-07 09:02:08 +02:00
|
|
|
| {% if project.description %}
|
2016-08-19 09:19:06 +02:00
|
|
|
.node-details-description
|
2018-03-26 18:49:01 +02:00
|
|
|
| {{ project | markdowned('description') }}
|
2017-02-08 15:27:20 +01:00
|
|
|
| {% endif %}
|
2016-08-19 09:19:06 +02:00
|
|
|
|
2016-12-02 12:42:58 +01:00
|
|
|
| {# Until we implement urls for pages
|
2016-12-02 18:02:27 +01:00
|
|
|
a.learn-more(href="{{ url_for( 'projects.view', project_url=project.url) }}") LEARN MORE
|
2016-12-02 12:42:58 +01:00
|
|
|
| #}
|
2016-08-19 09:19:06 +02:00
|
|
|
|
2018-09-10 19:02:27 +02:00
|
|
|
.p-4
|
2016-11-24 18:16:15 +01:00
|
|
|
| {% if activity_stream %}
|
2018-09-10 19:02:27 +02:00
|
|
|
+card-deck(3)
|
|
|
|
| {% for n in activity_stream %}
|
|
|
|
| {% if n.node_type not in ['comment'] %}
|
|
|
|
+list-asset(
|
|
|
|
'{{ n.name }}',
|
|
|
|
'{{ url_for_node(node=n) }}',
|
|
|
|
"{% if n.picture %}{{ n.picture.thumbnail('l', api=api) }}{% endif %}",
|
|
|
|
"{% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}{{ n.node_type | undertitle }}{% endif %}",
|
|
|
|
"{{ n._updated | pretty_date }}")(class="{% if n.permissions.world %}free{% endif %}")
|
|
|
|
| {% endif %}
|
|
|
|
| {% endfor %}
|
2016-08-19 09:19:06 +02:00
|
|
|
| {% 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);
|
2016-08-30 14:09:56 +02:00
|
|
|
$('<img/>').on('load', function() {
|
2016-08-19 09:19:06 +02:00
|
|
|
++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();
|
|
|
|
|
2016-11-24 18:46:41 +01:00
|
|
|
$(".node-updates-list-item.asset, .node-updates-list-item.group")
|
2016-08-19 09:19:06 +02:00
|
|
|
.unbind('click')
|
|
|
|
.click(function(e) {
|
|
|
|
e.preventDefault();
|
|
|
|
displayNode($(this).data('node_id'));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
| {% endblock %}
|