Merge branch 'wip-asset-obscure'
All asset templates now extend view_base, only overriding what's needed via jinja blocks. Yay for less duplicated code!
This commit is contained in:
commit
fc9c518c2a
@ -781,7 +781,7 @@ $node-preview-max-height-lg: 700px
|
|||||||
filter: none
|
filter: none
|
||||||
|
|
||||||
|
|
||||||
section.node-row
|
.node-row
|
||||||
display: flex
|
display: flex
|
||||||
width: 100%
|
width: 100%
|
||||||
flex: row
|
flex: row
|
||||||
@ -799,19 +799,20 @@ section.node-row
|
|||||||
background-color: white
|
background-color: white
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
&:nth-child(even), &:last-child
|
&:last-child,
|
||||||
|
&:nth-child(even)
|
||||||
border-right: none
|
border-right: none
|
||||||
|
|
||||||
&:last-child
|
&:last-child
|
||||||
border-bottom: none
|
border-bottom: none
|
||||||
|
|
||||||
&.texture-info
|
&.texture-info
|
||||||
padding: 10px 20px
|
|
||||||
color: $color-text-dark-secondary
|
color: $color-text-dark-secondary
|
||||||
position: relative
|
list-style-type: none
|
||||||
z-index: 1
|
margin: 0
|
||||||
|
padding: 10px 20px
|
||||||
|
|
||||||
span
|
li
|
||||||
&:not(:first-child)
|
&:not(:first-child)
|
||||||
padding-left: 15px
|
padding-left: 15px
|
||||||
|
|
||||||
@ -820,6 +821,11 @@ section.node-row
|
|||||||
top: -1px
|
top: -1px
|
||||||
right: 2px
|
right: 2px
|
||||||
|
|
||||||
|
&.status
|
||||||
|
margin-left: auto
|
||||||
|
|
||||||
|
&.pending
|
||||||
|
color: $color-danger
|
||||||
|
|
||||||
section.node-preview.texture
|
section.node-preview.texture
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
@ -935,41 +941,40 @@ section.node-row
|
|||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
|
|
||||||
section.node-preview
|
section.node-preview
|
||||||
|
+media-md
|
||||||
|
max-height: $node-preview-max-height-md
|
||||||
|
+media-lg
|
||||||
|
max-height: $node-preview-max-height-lg
|
||||||
|
|
||||||
|
align-items: center
|
||||||
|
background-color: black
|
||||||
|
color: $color-text-light-primary
|
||||||
|
display: flex
|
||||||
|
flex: 1
|
||||||
|
justify-content: center
|
||||||
|
max-height: 500px
|
||||||
|
min-height: 200px
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
|
|
||||||
iframe
|
iframe
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
&.image,
|
img
|
||||||
&.file,
|
display: block
|
||||||
min-height: 200px
|
max-height: $node-preview-max-height-lg
|
||||||
flex: 1
|
max-width: 100%
|
||||||
max-height: 500px
|
object-fit: scale-down
|
||||||
background-color: black
|
|
||||||
display: flex
|
|
||||||
justify-content: center
|
|
||||||
align-items: center
|
|
||||||
|
|
||||||
cursor: zoom-in
|
+media-xs
|
||||||
|
width: 100%
|
||||||
|
|
||||||
+media-md
|
+media-md
|
||||||
max-height: $node-preview-max-height-md
|
max-height: $node-preview-max-height-md
|
||||||
+media-lg
|
+media-lg
|
||||||
max-height: $node-preview-max-height-lg
|
max-height: $node-preview-max-height-lg
|
||||||
|
|
||||||
img
|
&.image
|
||||||
display: block
|
cursor: zoom-in
|
||||||
max-height: $node-preview-max-height-lg
|
|
||||||
max-width: 100%
|
|
||||||
object-fit: scale-down
|
|
||||||
|
|
||||||
+media-xs
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
+media-md
|
|
||||||
max-height: $node-preview-max-height-md
|
|
||||||
+media-lg
|
|
||||||
max-height: $node-preview-max-height-lg
|
|
||||||
|
|
||||||
&.video
|
&.video
|
||||||
background-color: black
|
background-color: black
|
||||||
@ -1040,6 +1045,45 @@ section.node-preview
|
|||||||
object-fit: cover
|
object-fit: cover
|
||||||
width: 100%
|
width: 100%
|
||||||
|
|
||||||
|
section.node-preview-forbidden
|
||||||
|
align-items: center
|
||||||
|
background-color: $color-background-nav
|
||||||
|
color: $color-text-light
|
||||||
|
cursor: default
|
||||||
|
display: flex
|
||||||
|
justify-content: center
|
||||||
|
min-height: 400px
|
||||||
|
position: relative
|
||||||
|
|
||||||
|
img
|
||||||
|
height: 130%
|
||||||
|
left: -60px
|
||||||
|
max-width: initial
|
||||||
|
filter: blur(30px)
|
||||||
|
object-fit: cover
|
||||||
|
opacity: .5
|
||||||
|
position: absolute
|
||||||
|
top: -60px
|
||||||
|
width: 130%
|
||||||
|
z-index: 0
|
||||||
|
|
||||||
|
> div
|
||||||
|
font-size: 1.4em
|
||||||
|
position: relative
|
||||||
|
z-index: 1
|
||||||
|
|
||||||
|
span
|
||||||
|
display: block
|
||||||
|
|
||||||
|
a
|
||||||
|
color: $color-text-light
|
||||||
|
|
||||||
|
&.btn
|
||||||
|
border-color: white
|
||||||
|
color: white
|
||||||
|
|
||||||
|
hr
|
||||||
|
opacity: .5
|
||||||
|
|
||||||
section.node-details-container
|
section.node-details-container
|
||||||
background-color: white
|
background-color: white
|
||||||
@ -1071,215 +1115,23 @@ section.node-preview.group
|
|||||||
width: 100%
|
width: 100%
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
|
|
||||||
.node-title-details
|
.node-details-meta-actions
|
||||||
margin-left: auto
|
margin-left: auto
|
||||||
line-height: 1em
|
|
||||||
|
|
||||||
& .date
|
.btn-browsetoggle
|
||||||
display: inline-block
|
+button(lighten($color-background-nav, 20%), 3px)
|
||||||
margin-right: 10px
|
width: 48px
|
||||||
color: $color-text-dark-secondary
|
text-align: center
|
||||||
|
padding: 2px 4px
|
||||||
& .status
|
i
|
||||||
display: inline-block
|
font-size: 1.3em
|
||||||
font-size: .9em
|
padding: 0
|
||||||
text-transform: capitalize
|
margin: 0
|
||||||
color: $color-text-dark-primary
|
|
||||||
padding: 5px 15px
|
|
||||||
border: thin solid $color-text-dark-hint
|
|
||||||
border-radius: 3px
|
|
||||||
cursor: default
|
|
||||||
|
|
||||||
&.group
|
|
||||||
.node-details-meta.preview
|
|
||||||
.node-details-meta-list
|
|
||||||
display: inline-block
|
|
||||||
|
|
||||||
> li
|
|
||||||
padding: 0 5px
|
|
||||||
|
|
||||||
.node-details-meta-actions
|
|
||||||
display: inline-block
|
|
||||||
|
|
||||||
.btn-browsetoggle
|
|
||||||
+button(lighten($color-background-nav, 20%), 3px)
|
|
||||||
width: 48px
|
|
||||||
text-align: center
|
|
||||||
padding: 2px 4px
|
|
||||||
i
|
|
||||||
font-size: 1.3em
|
|
||||||
padding: 0
|
|
||||||
margin: 0
|
|
||||||
|
|
||||||
&.project
|
&.project
|
||||||
.node-details-title
|
.node-details-title
|
||||||
padding: 10px 20px 0 20px
|
padding: 10px 20px 0 20px
|
||||||
|
|
||||||
ul.node-details-meta-list
|
|
||||||
display: flex
|
|
||||||
align-items: center
|
|
||||||
|
|
||||||
list-style-type: none
|
|
||||||
margin: 0
|
|
||||||
padding: 0
|
|
||||||
|
|
||||||
+media-xs
|
|
||||||
font-size: .9em
|
|
||||||
width: 100%
|
|
||||||
max-width: 100%
|
|
||||||
|
|
||||||
> li
|
|
||||||
margin: 0
|
|
||||||
padding: 0
|
|
||||||
line-height: 1em
|
|
||||||
float: left
|
|
||||||
|
|
||||||
& a.btn
|
|
||||||
padding: 4px 12px 5px 12px
|
|
||||||
margin: 0
|
|
||||||
|
|
||||||
&.date
|
|
||||||
color: $color-text-dark-secondary
|
|
||||||
padding-left: 5px
|
|
||||||
margin-left: 5px
|
|
||||||
|
|
||||||
&:before
|
|
||||||
color: $color-text-dark-secondary
|
|
||||||
position: relative
|
|
||||||
content: '·'
|
|
||||||
left: -10px
|
|
||||||
font-weight: 500
|
|
||||||
|
|
||||||
span /* (updated x mins ago) */
|
|
||||||
color: $color-text-dark-hint
|
|
||||||
margin-left: 3px
|
|
||||||
font-size: .9em
|
|
||||||
text-transform: lowercase
|
|
||||||
|
|
||||||
&.author
|
|
||||||
color: $color-text-dark-primary
|
|
||||||
|
|
||||||
&.status
|
|
||||||
margin-right: 10px
|
|
||||||
font-size: .9em
|
|
||||||
text-transform: capitalize
|
|
||||||
color: $color-text-dark-secondary
|
|
||||||
font-weight: 300
|
|
||||||
padding: 5px 15px
|
|
||||||
border: thin solid $color-text-dark-hint
|
|
||||||
border-radius: 3px
|
|
||||||
cursor: default
|
|
||||||
|
|
||||||
&.access
|
|
||||||
color: $color-text-dark-primary
|
|
||||||
cursor: default
|
|
||||||
opacity: .5
|
|
||||||
white-space: nowrap
|
|
||||||
|
|
||||||
&:hover
|
|
||||||
opacity: 1
|
|
||||||
|
|
||||||
&.public
|
|
||||||
border-color: $color-success
|
|
||||||
color: $color-success
|
|
||||||
padding: 0
|
|
||||||
i
|
|
||||||
font-size: 1.2em
|
|
||||||
position: relative
|
|
||||||
top: 1px
|
|
||||||
|
|
||||||
span
|
|
||||||
display: inline-block
|
|
||||||
|
|
||||||
|
|
||||||
&.type
|
|
||||||
text-transform: uppercase
|
|
||||||
padding: 0 5px 0 15px
|
|
||||||
cursor: default
|
|
||||||
font-weight: 400
|
|
||||||
color: $color-text-dark-hint
|
|
||||||
|
|
||||||
+media-xs
|
|
||||||
display: none
|
|
||||||
|
|
||||||
/* .blend files are special snowflakes */
|
|
||||||
span.blend
|
|
||||||
display: inline-block
|
|
||||||
padding: 0 35px 0 0
|
|
||||||
font-size: 1.2em
|
|
||||||
color: $color-text-dark-secondary
|
|
||||||
|
|
||||||
&.access+li.node-details-meta-list-item.video.download,
|
|
||||||
&.access+.tooltip+li.node-details-meta-list-item.video.download
|
|
||||||
margin-left: 10px
|
|
||||||
|
|
||||||
&.length
|
|
||||||
padding: 0 5px 0 15px
|
|
||||||
cursor: default
|
|
||||||
font-weight: 400
|
|
||||||
color: $color-text-dark-hint
|
|
||||||
white-space: nowrap
|
|
||||||
|
|
||||||
&.license
|
|
||||||
color: $color-text-dark-secondary
|
|
||||||
|
|
||||||
i
|
|
||||||
color: $color-text-dark-primary
|
|
||||||
font-size: 1.4em
|
|
||||||
position: relative
|
|
||||||
bottom: -2px
|
|
||||||
left: -5px
|
|
||||||
|
|
||||||
/* Download button */
|
|
||||||
&.download
|
|
||||||
align-self: flex-end
|
|
||||||
padding: 0 0 0 10px
|
|
||||||
|
|
||||||
/* Actual button */
|
|
||||||
button
|
|
||||||
+button($color-primary, 3px)
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
padding:
|
|
||||||
left: 20px
|
|
||||||
right: 20px
|
|
||||||
|
|
||||||
font-size: .9em
|
|
||||||
|
|
||||||
i
|
|
||||||
margin-right: 0
|
|
||||||
|
|
||||||
/* Tweaks for specific icons */
|
|
||||||
i.icon-dropdown-menu
|
|
||||||
padding-left: 10px
|
|
||||||
|
|
||||||
&.disabled
|
|
||||||
border-color: $color-text-dark-hint
|
|
||||||
color: $color-text-dark-hint
|
|
||||||
+stripes(rgba($color-text-dark-hint, .1), rgba($color-text-dark-hint, .2), -45deg, 28px)
|
|
||||||
|
|
||||||
/* Videos have dropdown caret, so paddit 5px less */
|
|
||||||
&.video.download
|
|
||||||
button
|
|
||||||
padding-right: 10px
|
|
||||||
|
|
||||||
&.file.download
|
|
||||||
button
|
|
||||||
+button($color-primary, 3px, true)
|
|
||||||
padding:
|
|
||||||
left: 15px
|
|
||||||
right: 15px
|
|
||||||
|
|
||||||
i
|
|
||||||
margin-right: 0
|
|
||||||
|
|
||||||
&.texture.download
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
&.open
|
|
||||||
button
|
|
||||||
box-shadow: none
|
|
||||||
|
|
||||||
.node-details-description
|
.node-details-description
|
||||||
+node-details-description
|
+node-details-description
|
||||||
padding-left: 20px
|
padding-left: 20px
|
||||||
|
@ -1,112 +0,0 @@
|
|||||||
.node-details-meta
|
|
||||||
ul
|
|
||||||
| {% if node.has_method('PUT') and (node.properties.status != 'published') %}
|
|
||||||
li(class="status-{{ node.properties.status }}")
|
|
||||||
| {{ node.properties.status | undertitle }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
li(title="Author")
|
|
||||||
| {{ node.user.full_name }}
|
|
||||||
|
|
||||||
li.dim(
|
|
||||||
title="Created {{ node._created }} (updated {{ node._updated | pretty_date_time }})")
|
|
||||||
| {{ node._created | pretty_date }}
|
|
||||||
|
|
||||||
| {% if node.short_link %}
|
|
||||||
li.shared
|
|
||||||
a(href="{{ node.short_link }}")
|
|
||||||
i.pi-share
|
|
||||||
| Shared
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
li.left-side
|
|
||||||
|
|
||||||
| {% if node.file %}
|
|
||||||
li.dim(title="File size")
|
|
||||||
| {{ node.file.length | filesizeformat }}
|
|
||||||
li.dim(title="File format")
|
|
||||||
| {{ node.file.content_type }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.permissions.world %}
|
|
||||||
li.public(
|
|
||||||
data-toggle="tooltip",
|
|
||||||
data-placement="bottom",
|
|
||||||
title="Anybody can download. Share it!")
|
|
||||||
i.pi-lock-open
|
|
||||||
span Public
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.file and (current_user.has_cap('subscriber') or node.permissions.world) %}
|
|
||||||
li.download
|
|
||||||
| {% if node.properties.content_type == 'video' %}
|
|
||||||
| {% if node.file_variations %}
|
|
||||||
button.btn.btn-default.dropdown-toggle(
|
|
||||||
type="button",
|
|
||||||
data-toggle="dropdown",
|
|
||||||
aria-haspopup="true",
|
|
||||||
aria-expanded="false")
|
|
||||||
i.pi-download
|
|
||||||
| Download
|
|
||||||
i.pi-angle-down.icon-dropdown-menu
|
|
||||||
|
|
||||||
ul.dropdown-menu
|
|
||||||
| {% for variation in node.file_variations %}
|
|
||||||
li
|
|
||||||
a(href="{{ variation.link }}",
|
|
||||||
title="Download this format",
|
|
||||||
download)
|
|
||||||
span.length {{ variation.length | filesizeformat }}
|
|
||||||
|
|
||||||
span.format {{ variation.format }}
|
|
||||||
span.size {{ variation.size }}
|
|
||||||
|
|
||||||
| {% endfor %}
|
|
||||||
| {% endif %}
|
|
||||||
| {% else %}
|
|
||||||
li.download
|
|
||||||
a(
|
|
||||||
title="Download {{ node.properties.content_type | undertitle }}",
|
|
||||||
href="{{ node.file.link }}",
|
|
||||||
download="{{ node.file.filename }}")
|
|
||||||
button.btn(type="button")
|
|
||||||
i.pi-download
|
|
||||||
| Download
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% elif current_user.has_cap('can-renew-subscription') %}
|
|
||||||
li.download
|
|
||||||
a.btn.btn-success(
|
|
||||||
title="Renew your subscription to download",
|
|
||||||
target="_blank",
|
|
||||||
href="/renew")
|
|
||||||
i.pi-heart
|
|
||||||
| Renew subscription to download
|
|
||||||
|
|
||||||
| {% elif current_user.is_authenticated %}
|
|
||||||
li.download
|
|
||||||
a.btn(
|
|
||||||
title="Join Blender Cloud",
|
|
||||||
href="{{ url_for('cloud.join') }}")
|
|
||||||
i.pi-lock
|
|
||||||
| Download
|
|
||||||
| {% else %}
|
|
||||||
li.download
|
|
||||||
a.btn(
|
|
||||||
title="Login to download {{ node.properties.content_type | undertitle }}",
|
|
||||||
href="{{ url_for('users.login') }}")
|
|
||||||
i.pi-lock
|
|
||||||
| Download
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.properties.license_type %}
|
|
||||||
a.node-details-license(
|
|
||||||
href="https://creativecommons.org/licenses/",
|
|
||||||
target="_blank")
|
|
||||||
span.type
|
|
||||||
i(class="pi-license-{{ node.properties.license_type }}")
|
|
||||||
| License <span>{{ node.properties.license_type }}</span>
|
|
||||||
| {% if node.properties.license_notes %}
|
|
||||||
| — {{ node.properties.license_notes }}
|
|
||||||
| {% endif %}
|
|
||||||
| {% endif %}
|
|
25
src/templates/nodes/custom/_node_preview_forbidden.pug
Normal file
25
src/templates/nodes/custom/_node_preview_forbidden.pug
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
section.node-preview-forbidden
|
||||||
|
| {% if node.picture %}
|
||||||
|
img(src="{{ node.picture.thumbnail('t', api=api) }}")
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
div
|
||||||
|
p Available to Blender Cloud subscribers
|
||||||
|
hr
|
||||||
|
| {% if current_user.has_cap('can-renew-subscription') %}
|
||||||
|
p
|
||||||
|
small You have a subscription, it just needs to be renewed.
|
||||||
|
a.btn(href="/renew")
|
||||||
|
| #[i.pi-heart] Renew Subscription
|
||||||
|
| {% else %}
|
||||||
|
p
|
||||||
|
small Support Blender and get awesome stuff!
|
||||||
|
a.btn(href="{{ url_for('cloud.join') }}")
|
||||||
|
| #[i.pi-heart] Get a Subscription
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
| {% if current_user.is_anonymous %}
|
||||||
|
p
|
||||||
|
small Already a subscriber?
|
||||||
|
a.btn(href="{{ url_for('users.login') }}") Log In
|
||||||
|
| {% endif %}
|
@ -41,7 +41,7 @@ script(type="text/javascript").
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
// If we are im preview mode, update the image source
|
// If we are in preview mode, update the image source
|
||||||
if (page_overlay.classList.contains('active')) {
|
if (page_overlay.classList.contains('active')) {
|
||||||
var node_preview = document.getElementById('node-preview');
|
var node_preview = document.getElementById('node-preview');
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ script(type="text/javascript").
|
|||||||
.html('<div class="nav-prev"></div><img src="' + src + '"/><div class="nav-next"></div>');
|
.html('<div class="nav-prev"></div><img src="' + src + '"/><div class="nav-next"></div>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#node-preview.image, #node-preview.file').click(function(e){
|
$('.js-node-preview-image').click(function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
@ -138,3 +138,12 @@ script(type="text/javascript").
|
|||||||
}
|
}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
var $content_type = $(".js-type");
|
||||||
|
var type_value = $content_type.text();
|
||||||
|
var type_value_trimmed = type_value.substring(type_value.indexOf("/") + 1);
|
||||||
|
$content_type.text(type_value_trimmed);
|
||||||
|
|
||||||
|
if (type_value_trimmed == 'x-blender' || type_value_trimmed == 'blend'){
|
||||||
|
$content_type.html('<span class="blend"><i class="pi-blender-logo"></i></span>');
|
||||||
|
};
|
||||||
|
@ -1,54 +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.file
|
|
||||||
|
|
||||||
.node-details-header
|
|
||||||
.node-title#node-title
|
|
||||||
| {{node.name}}
|
|
||||||
|
|
||||||
| {% if node.description %}
|
|
||||||
.node-details-description#node-description
|
|
||||||
| {{ node | markdowned('description') }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
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,4 +0,0 @@
|
|||||||
| {% extends 'layout.html' %}
|
|
||||||
|
|
||||||
| {% block footer_scripts %}
|
|
||||||
| {% endblock %}
|
|
@ -1,48 +1 @@
|
|||||||
| {% block body %}
|
| {% extends "nodes/view_base.html" %}
|
||||||
|
|
||||||
#node-container
|
|
||||||
#node-overlay
|
|
||||||
|
|
||||||
| {% if node.picture %}
|
|
||||||
section#node-preview.node-preview.image
|
|
||||||
img.node-preview-thumbnail#node-preview-thumbnail(
|
|
||||||
src="{{ node.picture.thumbnail('l', api=api) }}")
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
section.node-details-container.image
|
|
||||||
|
|
||||||
.node-details-header
|
|
||||||
.node-title#node-title
|
|
||||||
| {{node.name}}
|
|
||||||
|
|
||||||
| {% if node.description %}
|
|
||||||
.node-details-description#node-description
|
|
||||||
| {{ node | markdowned('description') }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
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,6 +0,0 @@
|
|||||||
| {% extends 'layout.html' %}
|
|
||||||
| {% from '_macros/_file_uploader_javascript.html' import render_file_uploader_javascript %}
|
|
||||||
|
|
||||||
| {% block footer_scripts %}
|
|
||||||
| {{render_file_uploader_javascript()}}
|
|
||||||
| {% 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 | markdowned('description') }}
|
|
||||||
| {% 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 %}
|
|
||||||
|
@ -55,9 +55,9 @@
|
|||||||
| Only project members can comment.
|
| Only project members can comment.
|
||||||
| {% elif current_user.has_cap('can-renew-subscription') %}
|
| {% elif current_user.has_cap('can-renew-subscription') %}
|
||||||
i.pi-heart
|
i.pi-heart
|
||||||
a(href='/renew', target='_blank') Renew your subscription to join the conversation!
|
| Join the conversation! #[a(href='/renew', target='_blank') Renew your subscription] to comment.
|
||||||
| {% else %}
|
| {% else %}
|
||||||
| Join the conversations! <a href="https://store.blender.org/product/membership/">Subscribe to Blender Cloud</a> now.
|
| Join the conversation! #[a(href="https://store.blender.org/product/membership/") Subscribe to Blender Cloud] to comment.
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
| {% else %}
|
| {% else %}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
| {% block body %}
|
| {% block body %}
|
||||||
#node-container
|
#node-container
|
||||||
|
|
||||||
section.node-preview.group
|
section.node-details-container
|
||||||
.node-title#node-title
|
.node-details-header
|
||||||
| {{node.name}}
|
.node-title#node-title
|
||||||
|
| {{node.name}}
|
||||||
|
|
||||||
.node-details-meta.preview
|
|
||||||
.node-details-meta-actions
|
.node-details-meta-actions
|
||||||
.btn-browsetoggle(
|
.btn-browsetoggle(
|
||||||
title="Toggle between list/grid view",
|
title="Toggle between list/grid view",
|
||||||
@ -18,6 +18,7 @@
|
|||||||
| {{ node | markdowned('description') }}
|
| {{ node | markdowned('description') }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
|
|
||||||
section.node-children.group
|
section.node-children.group
|
||||||
|
|
||||||
| {% if children %}
|
| {% if children %}
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
.texture-title#node-title
|
.texture-title#node-title
|
||||||
| {{node.name}}
|
| {{node.name}}
|
||||||
|
|
||||||
| {% if node.picture %}
|
|
||||||
.texture-backdrop(
|
|
||||||
style="background-image: url({{ node.picture.thumbnail('m', api=api) }})")
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
section.node-row
|
section.node-row
|
||||||
.node-details-description
|
.node-details-description
|
||||||
|
@ -4,11 +4,6 @@
|
|||||||
.texture-title#node-title
|
.texture-title#node-title
|
||||||
| {{node.name}}
|
| {{node.name}}
|
||||||
|
|
||||||
| {% if node.picture %}
|
|
||||||
.texture-backdrop(
|
|
||||||
style="background-image: url({{ node.picture.thumbnail('m', api=api) }})")
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if node.description %}
|
| {% if node.description %}
|
||||||
section.node-row
|
section.node-row
|
||||||
.node-details-description
|
.node-details-description
|
||||||
|
@ -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 | markdowned('description') }}
|
|
||||||
| {% 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 %}
|
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
| {% block body %}
|
|
||||||
|
|
||||||
#node-container
|
|
||||||
|
|
||||||
section.node-details-container.storage
|
|
||||||
|
|
||||||
.node-details-header
|
|
||||||
.node-title
|
|
||||||
| {{node.name}}
|
|
||||||
|
|
||||||
|
|
||||||
section.node-children.storage
|
|
||||||
|
|
||||||
| {% if node.children %}
|
|
||||||
| {% for child in node.children %}
|
|
||||||
|
|
||||||
a(href="#", data-node_id="{{ node._id }}" data-path="{{ child['path'] }}", title="{{ child['name'] }}", class="item_icon")
|
|
||||||
.list-node-children-item
|
|
||||||
.list-node-children-item-thumbnail
|
|
||||||
|
|
||||||
.list-node-children-item-thumbnail-icon
|
|
||||||
| {% if child['content_type'] == 'video' %}
|
|
||||||
i.pi-film
|
|
||||||
| {% elif child['content_type'] == 'image' %}
|
|
||||||
i.pi-image
|
|
||||||
| {% elif child['content_type'] == 'file' %}
|
|
||||||
i.pi-document
|
|
||||||
| {% elif child['content_type'] == 'binary' %}
|
|
||||||
i.pi-file-archive
|
|
||||||
| {% else %}
|
|
||||||
i.pi-folder
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
.list-node-children-item-name
|
|
||||||
|
|
||||||
span {{ child['name'] }}
|
|
||||||
|
|
||||||
| {% endfor %}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
script.
|
|
||||||
$('a.item_icon').click(function(e){
|
|
||||||
// When clicking on a node preview, we load its content
|
|
||||||
e.preventDefault;
|
|
||||||
var nodeId = $(this).data('node_id');
|
|
||||||
var path = $(this).data('path');
|
|
||||||
displayStorage(nodeId, path);
|
|
||||||
// Update tree with current selection
|
|
||||||
//$('#project_tree').jstree('select_node', 'n_' + nodeId);
|
|
||||||
});
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
| {% block body %}
|
|
||||||
|
|
||||||
#node-container
|
|
||||||
|
|
||||||
section.node-details-container.storage
|
|
||||||
|
|
||||||
.node-details-header
|
|
||||||
.node-title
|
|
||||||
| {{node.name}}
|
|
||||||
|
|
||||||
//- .node-details-description
|
|
||||||
//- | {{node.description}}
|
|
||||||
|
|
||||||
.node-details-meta
|
|
||||||
|
|
||||||
ul.node-details-meta-list
|
|
||||||
li.node-details-meta-list-item.status
|
|
||||||
| {{node.status}}
|
|
||||||
|
|
||||||
li.node-details-meta-list-item.date(title="Created {{ node._created | pretty_date }}")
|
|
||||||
| {{ node._updated | pretty_date }}
|
|
||||||
|
|
||||||
li.node-details-meta-list-item.file.length
|
|
||||||
| {{ node.length | filesizeformat }}
|
|
||||||
|
|
||||||
li.node-details-meta-list-item.file.download
|
|
||||||
a(href="{% if node.has_method('GET') %}{{ node.download_link }}{% else %}{{ url_for('users.login') }}{% endif %}")
|
|
||||||
button.btn.btn-default(type="button")
|
|
||||||
| Download
|
|
||||||
|
|
||||||
|
|
||||||
| {% endblock %}
|
|
||||||
|
|
@ -33,24 +33,23 @@
|
|||||||
span Public
|
span Public
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
section.node-row.texture-info
|
ul.node-row.texture-info
|
||||||
| {% if node.properties.files %}
|
| {% if node.properties.files %}
|
||||||
span.texture-info-files
|
li
|
||||||
i.pi-texture
|
i.pi-texture
|
||||||
| {{ node.properties.files|length }} map{% if node.properties.files|length != 1 %}s{% endif %}
|
| {{ node.properties.files|length }} map{% if node.properties.files|length != 1 %}s{% endif %}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
span.texture-info-seamless
|
|
||||||
|
li
|
||||||
i.pi-puzzle
|
i.pi-puzzle
|
||||||
| {% if not node.properties.is_tileable %}Not {% endif %}Seamless
|
| {% if not node.properties.is_tileable %}Not {% endif %}Seamless
|
||||||
| {% if node.has_method('PUT') %}
|
|
||||||
| {# Display publishing status only to editors #}
|
| {# Display publishing status only to editors #}
|
||||||
span.texture-info-status
|
| {% if node.has_method('PUT') %}
|
||||||
| {% if node.properties.status == 'published' %}
|
li.status(
|
||||||
i.pi-laugh
|
class="{{ node.properties.status }}",
|
||||||
| {% else %}
|
title="Status")
|
||||||
i.pi-displeased
|
| Status: #[strong {{ node.properties.status | undertitle }}]
|
||||||
| {% endif %}
|
|
||||||
| {{ node.properties.status }}
|
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
| {% for f in node.properties.files %}
|
| {% for f in node.properties.files %}
|
||||||
|
140
src/templates/nodes/view_base.pug
Normal file
140
src/templates/nodes/view_base.pug
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
| {% block body %}
|
||||||
|
#node-container
|
||||||
|
#node-overlay
|
||||||
|
|
||||||
|
| {% block node_preview %}
|
||||||
|
| {% 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 %}
|
||||||
|
| {% include 'nodes/custom/_node_preview_forbidden.html' %}
|
||||||
|
| {% endif %}
|
||||||
|
| {% endif %}
|
||||||
|
| {% endblock node_preview %}
|
||||||
|
|
||||||
|
| {% block node_details %}
|
||||||
|
section.node-details-container
|
||||||
|
|
||||||
|
| {# NAME #}
|
||||||
|
.node-details-header
|
||||||
|
.node-title#node-title
|
||||||
|
| {{node.name}}
|
||||||
|
|
||||||
|
|
||||||
|
| {# DESCRIPTION #}
|
||||||
|
| {% if node.description %}
|
||||||
|
.node-details-description#node-description
|
||||||
|
| {{ node | markdowned('description') }}
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
| {# LICENSE #}
|
||||||
|
| {% if node.properties.license_type %}
|
||||||
|
a.node-details-license(
|
||||||
|
href="https://creativecommons.org/licenses/",
|
||||||
|
target="_blank")
|
||||||
|
span.type
|
||||||
|
i(class="pi-license-{{ node.properties.license_type }}")
|
||||||
|
| License <span>{{ node.properties.license_type }}</span>
|
||||||
|
| {% if node.properties.license_notes %}
|
||||||
|
| — {{ node.properties.license_notes }}
|
||||||
|
| {% endif %}
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
| {# DETAILS #}
|
||||||
|
.node-details-meta
|
||||||
|
ul
|
||||||
|
| {% if node.has_method('PUT') and (node.properties.status != 'published') %}
|
||||||
|
li(class="status-{{ node.properties.status }}")
|
||||||
|
| {{ node.properties.status | undertitle }}
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
li(title="Author")
|
||||||
|
| {{ node.user.full_name }}
|
||||||
|
|
||||||
|
li.dim(
|
||||||
|
title="Created {{ node._created }} (updated {{ node._updated | pretty_date_time }})")
|
||||||
|
| {{ node._created | pretty_date }}
|
||||||
|
|
||||||
|
| {% if node.short_link %}
|
||||||
|
li.shared
|
||||||
|
a(href="{{ node.short_link }}")
|
||||||
|
i.pi-share
|
||||||
|
| Shared
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
li.left-side
|
||||||
|
|
||||||
|
| {% if node.file %}
|
||||||
|
li.dim(title="File size")
|
||||||
|
| {{ node.file.length | filesizeformat }}
|
||||||
|
li.dim.js-type(title="File format")
|
||||||
|
| {{ node.file.content_type }}
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
| {% if node.permissions.world %}
|
||||||
|
li.public(
|
||||||
|
data-toggle="tooltip",
|
||||||
|
data-placement="bottom",
|
||||||
|
title="Anybody can download. Share it!")
|
||||||
|
i.pi-lock-open
|
||||||
|
span Public
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
| {% block node_details_meta_extra %}{% endblock %}
|
||||||
|
|
||||||
|
li.download
|
||||||
|
| {% if (current_user.has_cap('subscriber') or node.permissions.world) and (node.file or node.properties.files) %}
|
||||||
|
| {% block node_download %}
|
||||||
|
a(
|
||||||
|
title="Download {{ node.properties.content_type | undertitle }}",
|
||||||
|
href="{{ node.file.link }}",
|
||||||
|
download="{{ node.file.filename }}")
|
||||||
|
button.btn(type="button")
|
||||||
|
i.pi-download
|
||||||
|
| Download
|
||||||
|
| {% endblock node_download %}
|
||||||
|
|
||||||
|
| {% elif current_user.has_cap('can-renew-subscription') %}
|
||||||
|
a.btn.btn-success(
|
||||||
|
title="Renew your subscription to download",
|
||||||
|
target="_blank",
|
||||||
|
href="/renew")
|
||||||
|
i.pi-heart
|
||||||
|
| Renew Subscription
|
||||||
|
|
||||||
|
| {% elif current_user.is_authenticated %}
|
||||||
|
.btn.disabled
|
||||||
|
i.pi-lock
|
||||||
|
| Download
|
||||||
|
|
||||||
|
| {% else %}
|
||||||
|
a.btn(
|
||||||
|
title="Login to download {{ node.properties.content_type | undertitle }}",
|
||||||
|
href="{{ url_for('users.login') }}")
|
||||||
|
i.pi-lock
|
||||||
|
| Download
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
| {% endblock node_details %}
|
||||||
|
|
||||||
|
| {% block node_comments %}
|
||||||
|
#comments-embed
|
||||||
|
.comments-list-loading
|
||||||
|
i.pi-spin
|
||||||
|
| {% endblock node_comments %}
|
||||||
|
|
||||||
|
| {% include 'nodes/custom/_scripts.html' %}
|
||||||
|
|
||||||
|
| {% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
| {% block node_scripts %}{% endblock %}
|
||||||
|
| {% block footer_scripts %}
|
||||||
|
script.
|
||||||
|
// Generate analytics pageview
|
||||||
|
ga('send', 'pageview', location.pathname);
|
||||||
|
| {% endblock %}
|
@ -22,17 +22,6 @@
|
|||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
section.node-details-container.project
|
section.node-details-container.project
|
||||||
|
|
||||||
| {# Hide for now
|
|
||||||
.node-details-header
|
|
||||||
.node-title-details
|
|
||||||
.date(title="Last updated {{ project._updated | pretty_date }}") {{ project._created | pretty_date }}
|
|
||||||
|
|
||||||
| {% if project.status %}
|
|
||||||
.status {{project.status}}
|
|
||||||
| {% endif %}
|
|
||||||
| #}
|
|
||||||
|
|
||||||
.node-details-title
|
.node-details-title
|
||||||
h1
|
h1
|
||||||
a(href="{{ url_for( 'projects.view', project_url=project.url) }}") {{ project.name }}
|
a(href="{{ url_for( 'projects.view', project_url=project.url) }}") {{ project.name }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user