Files
pillar/src/templates/projects/view_embed.pug

96 lines
2.8 KiB
Plaintext
Raw Normal View History

include ../mixins/components
| {% block body %}
#node-container
section.node-preview.project
| {% 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>
| {% elif project.picture_header %}
2016-12-02 18:02:27 +01:00
a(href="{{ url_for( 'projects.view', project_url=project.url) }}")
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 }}
| {% if project.description %}
.node-details-description
| {{ project | markdowned('description') }}
| {% endif %}
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
| #}
.p-4
2016-11-24 18:16:15 +01:00
| {% if activity_stream %}
+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 %}
| {% 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() {
++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")
.unbind('click')
.click(function(e) {
e.preventDefault();
displayNode($(this).data('node_id'));
});
});
| {% endblock %}