Use view_base for assets
This commit is contained in:
parent
641f29ab30
commit
a7cb3b9658
@ -1,43 +1 @@
|
|||||||
| {% block body %}
|
| {% extends "nodes/view_base.html" %}
|
||||||
|
|
||||||
#node-container
|
|
||||||
#node-overlay
|
|
||||||
|
|
||||||
| {% if node.picture %}
|
|
||||||
section#node-preview.node-preview.file
|
|
||||||
img.node-preview-thumbnail#node-preview-thumbnail(
|
|
||||||
src="{{ node.picture.thumbnail('l', api=api) }}")
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
section.node-details-container
|
|
||||||
include ../../_node_details
|
|
||||||
|
|
||||||
#comments-embed
|
|
||||||
.comments-list-loading
|
|
||||||
i.pi-spin
|
|
||||||
|
|
||||||
include ../../_scripts
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
|
||||||
| {% block footer_scripts %}
|
|
||||||
script.
|
|
||||||
// Generate GA pageview
|
|
||||||
ga('send', 'pageview', location.pathname);
|
|
||||||
|
|
||||||
var content_type = $("li.node-details-meta-list-item.type").text();
|
|
||||||
var type_trimmed = content_type.substring(content_type.indexOf("/") + 1);
|
|
||||||
|
|
||||||
if (type_trimmed == 'x-blender' || type_trimmed == 'blend'){
|
|
||||||
type_trimmed = '<span class="blend"><i class="pi-blender-logo"></i></span>';
|
|
||||||
};
|
|
||||||
|
|
||||||
$("li.node-details-meta-list-item.type").html(type_trimmed);
|
|
||||||
|
|
||||||
$('.sorry').click(function() {
|
|
||||||
$.get('/403', function(data) {
|
|
||||||
$('#node-overlay').html(data).addClass('active');
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
@ -1,44 +1 @@
|
|||||||
| {% block body %}
|
| {% extends "nodes/view_base.html" %}
|
||||||
|
|
||||||
#node-container
|
|
||||||
#node-overlay
|
|
||||||
|
|
||||||
| {% if node.picture %}
|
|
||||||
| {% if current_user.has_cap('subscriber') %}
|
|
||||||
section#node-preview.node-preview.image.js-node-preview-image
|
|
||||||
img.node-preview-thumbnail#node-preview-thumbnail(
|
|
||||||
src="{{ node.picture.thumbnail('l', api=api) }}")
|
|
||||||
| {% else %}
|
|
||||||
section#node-preview.node-preview.image.node-preview-blur
|
|
||||||
img.node-preview-thumbnail#node-preview-thumbnail(
|
|
||||||
src="{{ node.picture.thumbnail('t', api=api) }}")
|
|
||||||
| {% endif %}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
section.node-details-container
|
|
||||||
include ../../_node_details
|
|
||||||
|
|
||||||
#comments-embed
|
|
||||||
.comments-list-loading
|
|
||||||
i.pi-spin
|
|
||||||
|
|
||||||
include ../../_scripts
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
|
||||||
| {% block footer_scripts %}
|
|
||||||
script.
|
|
||||||
// Generate GA pageview
|
|
||||||
ga('send', 'pageview', location.pathname);
|
|
||||||
|
|
||||||
var content_type = $("li.node-details-meta-list-item.type").text();
|
|
||||||
$("li.node-details-meta-list-item.type").text(content_type.substring(content_type.indexOf("/") + 1));
|
|
||||||
|
|
||||||
$('.sorry').click(function() {
|
|
||||||
$.get('/403', function(data) {
|
|
||||||
$('#node-overlay').html(data).addClass('active');
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
|
||||||
|
@ -1,60 +1,53 @@
|
|||||||
| {% block body %}
|
| {% extends "nodes/view_base.html" %}
|
||||||
|
|
||||||
#node-container
|
| {% block node_preview %}
|
||||||
#node-overlay
|
| {% if node.video_sources %}
|
||||||
|
section.node-preview.video
|
||||||
|
video#videoplayer.video-js(
|
||||||
|
controls,
|
||||||
|
data-setup="{}",
|
||||||
|
preload="auto",
|
||||||
|
poster="{% if node.picture %}{{ node.picture.thumbnail('l', api=api) }}{% endif %}")
|
||||||
|
| {% for source in node.video_sources %}
|
||||||
|
source(
|
||||||
|
src="{{ source.src }}",
|
||||||
|
type="{{ source.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>
|
||||||
|
| {% else %}
|
||||||
|
| {% include 'nodes/custom/_node_preview_forbidden.html' %}
|
||||||
|
| {% endif %}
|
||||||
|
| {% endblock node_preview %}
|
||||||
|
|
||||||
section.node-preview.video
|
| {% block node_download %}
|
||||||
| {% if node.video_sources %}
|
| {% if node.file_variations %}
|
||||||
video#videoplayer.video-js(
|
button.btn.btn-default.dropdown-toggle(
|
||||||
controls,
|
type="button",
|
||||||
data-setup="{}",
|
data-toggle="dropdown",
|
||||||
preload="auto",
|
aria-haspopup="true",
|
||||||
poster="{% if node.picture %}{{ node.picture.thumbnail('l', api=api) }}{% endif %}")
|
aria-expanded="false")
|
||||||
| {% for source in node.video_sources %}
|
i.pi-download
|
||||||
source(
|
| Download
|
||||||
src="{{ source.src }}",
|
i.pi-angle-down.icon-dropdown-menu
|
||||||
type="{{ source.type }}")
|
|
||||||
| {% endfor %}
|
ul.dropdown-menu
|
||||||
p.vjs-no-js.
|
| {% for variation in node.file_variations %}
|
||||||
To view this video please enable JavaScript, and consider upgrading to a web browser that
|
li
|
||||||
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
|
a(href="{{ variation.link }}",
|
||||||
| {% else %}
|
title="Download this format",
|
||||||
.video-dummy.sorry(
|
download)
|
||||||
style="{% if node.picture %}background-image: url({{ node.picture.thumbnail('l', api=api) }});{% endif %}")
|
span.length {{ variation.length | filesizeformat }}
|
||||||
.video-dummy-content
|
|
||||||
.video-dummy-content-text
|
span.format {{ variation.format }}
|
||||||
span Available to Blender Cloud subscribers
|
span.size {{ variation.size }}
|
||||||
span
|
| {% endfor %}
|
||||||
small Support Blender and get awesome stuff!
|
| {% endif %}
|
||||||
hr
|
| {% endblock node_download %}
|
||||||
| {% if current_user.has_cap('can-renew-subscription') %}
|
|
||||||
a.subscribe(href="/renew") You have a subscription, it just needs to be renewed. <em>Renew your subscription now!</em>
|
|
||||||
| {% else %}
|
|
||||||
a.subscribe(href="{{ url_for('cloud.join') }}") <em>Subscribe to Blender Cloud.</em>
|
|
||||||
| {% endif %}
|
|
||||||
| {% if current_user.is_anonymous %}
|
|
||||||
a(href="{{ url_for('users.login') }}") Already a subscriber? Log in
|
|
||||||
| {% endif %}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
section.node-details-container.video
|
| {% block node_scripts %}
|
||||||
|
|
||||||
.node-details-header
|
|
||||||
.node-title#node-title
|
|
||||||
| {{node.name}}
|
|
||||||
|
|
||||||
| {% if node.description %}
|
|
||||||
.node-details-description#node-description
|
|
||||||
| {{ node.description | markdown }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
include ../../_node_details
|
|
||||||
|
|
||||||
#comments-embed
|
|
||||||
.comments-list-loading
|
|
||||||
i.pi-spin
|
|
||||||
|
|
||||||
script(type="text/javascript").
|
script(type="text/javascript").
|
||||||
{% if node.video_sources %}
|
{% if node.video_sources %}
|
||||||
|
|
||||||
@ -114,17 +107,6 @@ script(type="text/javascript").
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
{% endif %}
|
{% endif %} // if node.video_sources
|
||||||
|
|
||||||
$(function(){
|
| {% endblock node_scripts %}
|
||||||
// Generate GA pageview
|
|
||||||
ga('send', 'pageview', location.pathname);
|
|
||||||
|
|
||||||
var content_type = $("li.node-details-meta-list-item.type").text();
|
|
||||||
$("li.node-details-meta-list-item.type").text(content_type.substring(content_type.indexOf("/") + 1));
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
include ../../_scripts
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
@ -1,144 +1,62 @@
|
|||||||
| {% block body %}
|
| {% extends "nodes/view_base.html" %}
|
||||||
|
|
||||||
#node-container.texture
|
| {% block node_preview %}
|
||||||
#node-overlay
|
| {% if node.picture %}
|
||||||
section.node-preview
|
iframe(
|
||||||
| {% if node.picture %}
|
id='vrview_window'
|
||||||
iframe(
|
width='100%',
|
||||||
id='vrview_window'
|
height='450px',
|
||||||
width='100%',
|
scrolling='no',
|
||||||
height='450px',
|
frameborder='0',
|
||||||
scrolling='no',
|
allowfullscreen='',
|
||||||
frameborder='0',
|
src="{{url_for('main.vrview', preview=node.picture.thumbnail('l', api=api), image=node.picture.thumbnail('h', api=api), default_yaw=(node.properties.default_yaw or 0))}}")
|
||||||
allowfullscreen='',
|
| {% else %}
|
||||||
src="{{url_for('main.vrview', preview=node.picture.thumbnail('l', api=api), image=node.picture.thumbnail('h', api=api), default_yaw=(node.properties.default_yaw or 0))}}")
|
section.node-preview
|
||||||
| {% endif %}
|
h3 Missing Preview
|
||||||
|
| {% endif %}
|
||||||
|
| {% endblock node_preview %}
|
||||||
|
|
||||||
section.node-details-container
|
| {% block node_details_meta_extra %}
|
||||||
|
| {% if write_access %}
|
||||||
|
li.node-details-meta-list-item
|
||||||
|
a.btn#copy_yaw(
|
||||||
|
href='javascript:void(0);'
|
||||||
|
title='Copies current yaw of panorama to the clipboard, so you can set it as default yaw.'
|
||||||
|
) Copy yaw
|
||||||
|
| {% endif %}
|
||||||
|
| {% endblock node_details_meta_extra %}
|
||||||
|
|
||||||
.node-details-header
|
| {% block node_download %}
|
||||||
.node-title#node-title
|
| {% if node.properties.files %}
|
||||||
| {{node.name}}
|
button.btn.btn-default.dropdown-toggle(
|
||||||
|
title="Download HDRI",
|
||||||
|
type="button",
|
||||||
|
data-toggle="dropdown",
|
||||||
|
aria-haspopup="true",
|
||||||
|
aria-expanded="false")
|
||||||
|
i.pi-download
|
||||||
|
| Download
|
||||||
|
i.pi-angle-down.icon-dropdown-menu
|
||||||
|
|
||||||
.node-details-meta.header
|
ul.dropdown-menu
|
||||||
ul.node-details-meta-list
|
| {% for var in node.properties.files %}
|
||||||
| {% if node.permissions.world %}
|
li
|
||||||
li.node-details-meta-list-item.access.public(
|
a(href="{{ var.file.link }}",
|
||||||
data-toggle="tooltip",
|
title="Download this HDRi format",
|
||||||
data-placement="bottom",
|
download)
|
||||||
title="Anybody can download. Share it!")
|
span.length {{ var.file.length | filesizeformat }}
|
||||||
i.pi-lock-open
|
span.format {{ var.file.format | hide_none }}
|
||||||
span Public
|
span.size {{ var.resolution }}
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.properties.license_type %}
|
| {% endfor %}
|
||||||
| {% if node.properties.license_notes %}
|
| {% endif %}
|
||||||
li.node-details-meta-list-item.video.license(
|
| {% endblock node_download %}
|
||||||
id="asset-license",
|
|
||||||
data-toggle="popover",
|
|
||||||
data-placement="left",
|
|
||||||
data-trigger="hover",
|
|
||||||
data-content="{{ node.properties.license_notes }}",
|
|
||||||
title="{{ node.properties.license_type }}")
|
|
||||||
|
|
||||||
i(class="pi-license-{{ node.properties.license_type }}")
|
| {% block node_comments %}{% endblock %}
|
||||||
| {% else %}
|
|
||||||
li.node-details-meta-list-item.video.license(
|
|
||||||
id="asset-license",
|
|
||||||
data-toggle="tooltip",
|
|
||||||
data-placement="bottom",
|
|
||||||
title="{{ node.properties.license_type }}")
|
|
||||||
i(class="pi-license-{{ node.properties.license_type }}")
|
|
||||||
| {% endif %}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if write_access %}
|
| {% block node_scripts %}
|
||||||
li.node-details-meta-list-item
|
|
||||||
a.btn#copy_yaw(
|
|
||||||
href='javascript:void(0);'
|
|
||||||
title='Copies current yaw of panorama to the clipboard, so you can set it as default yaw.'
|
|
||||||
) Copy yaw
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.properties.files %}
|
|
||||||
li.btn-group.node-details-meta-list-item.video.download(
|
|
||||||
title="Download HDRI")
|
|
||||||
button.btn.btn-default.dropdown-toggle(
|
|
||||||
type="button",
|
|
||||||
data-toggle="dropdown",
|
|
||||||
aria-haspopup="true",
|
|
||||||
aria-expanded="false")
|
|
||||||
i.pi-download
|
|
||||||
i.pi-angle-down.icon-dropdown-menu
|
|
||||||
|
|
||||||
ul.dropdown-menu
|
|
||||||
| {% for var in node.properties.files %}
|
|
||||||
li
|
|
||||||
a(href="{{ var.file.link }}",
|
|
||||||
title="Download this HDRi format",
|
|
||||||
download)
|
|
||||||
span.length {{ var.file.length | filesizeformat }}
|
|
||||||
|
|
||||||
span.format {{ var.file.format | hide_none }}
|
|
||||||
span.size {{ var.resolution }}
|
|
||||||
|
|
||||||
| {% endfor %}
|
|
||||||
| {% else %}
|
|
||||||
li.btn-group.node-details-meta-list-item.video.download.disabled(
|
|
||||||
title="Download HDRi")
|
|
||||||
button.btn.btn-default.sorry(type="button")
|
|
||||||
i.pi-lock
|
|
||||||
i.pi-download
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.description %}
|
|
||||||
.node-details-description#node-description
|
|
||||||
| {{ node.description | markdown }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.properties.license_notes %}
|
|
||||||
.node-details-meta.license
|
|
||||||
| {{ node.properties.license_notes }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
.node-details-meta.footer
|
|
||||||
ul.node-details-meta-list
|
|
||||||
li.node-details-meta-list-item.status
|
|
||||||
| {{ node.properties.status | undertitle }}
|
|
||||||
|
|
||||||
li.node-details-meta-list-item.author
|
|
||||||
| {{ node.user.full_name }}
|
|
||||||
|
|
||||||
li.node-details-meta-list-item.date(title="Created {{ node._created }}")
|
|
||||||
| {{ node._created | pretty_date }}
|
|
||||||
| {% if (node._created | pretty_date) != (node._updated | pretty_date) %}
|
|
||||||
span(title="Updated {{ node._updated }}") (updated {{ node._updated | pretty_date }})
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
include ../_scripts
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
|
||||||
| {% block footer_scripts %}
|
|
||||||
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}")
|
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}")
|
||||||
|
|
||||||
script.
|
script.
|
||||||
$('#asset-license').popover();
|
|
||||||
// Generate GA pageview
|
|
||||||
ga('send', 'pageview', location.pathname);
|
|
||||||
|
|
||||||
|
|
||||||
$('.sorry').click(function() {
|
|
||||||
$.get('/403', function(data) {
|
|
||||||
$('#node-overlay').html(data).show().addClass('active');
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#node-overlay').click(function(){
|
|
||||||
$(this).removeClass('active').hide().html();
|
|
||||||
});
|
|
||||||
|
|
||||||
$().ready(function () {
|
$().ready(function () {
|
||||||
new Clipboard('#copy_yaw', {
|
new Clipboard('#copy_yaw', {
|
||||||
text: function(trigger) {
|
text: function(trigger) {
|
||||||
@ -150,8 +68,7 @@ script.
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.on('success', function(e) {
|
.on('success', function(e) {
|
||||||
$(e.trigger).flashOnce();
|
$(e.trigger).flashOnce();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
| {% endblock node_scripts %}
|
||||||
| {% endblock %}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user