Homepage cleanup.

This commit is contained in:
2018-09-06 13:03:40 +02:00
parent 92106459a0
commit 95e51e90de
3 changed files with 574 additions and 771 deletions

View File

@@ -1,573 +1,406 @@
.dashboard-container
+container-behavior
+media-xs
flex-direction: column
align-content: center
align-items: flex-start
display: flex
justify-content: space-around
word-break: break-word
section.dashboard-main,
section.dashboard-secondary
+media-xs
width: 100%
margin: 20px auto
img .title-underline
max-width: 100% padding-bottom: 5px
position: relative
margin-bottom: 20px
section.dashboard-main &:before
+container-box background-color: $primary
width: 52% content: ' '
section.dashboard-secondary
width: 46%
flex-direction: column
margin-right: auto
span.section-lead
display: block display: block
padding: 10px 0 height: 2px
color: $color-text-dark-secondary top: 125%
position: absolute
section.dashboard-main, width: 50px
section.dashboard-secondary
.section-title
padding-bottom: 5px
margin-bottom: 20px
position: relative
&:before
position: absolute
width: 50px
height: 2px
top: 125%
content: ' '
display: block
background-color: $color-primary
a
color: $color-text
&:hover
color: $color-primary
cursor: pointer
nav#nav-tabs,
nav#sub-nav-tabs
ul#nav-tabs__list,
ul#sub-nav-tabs__list
margin: 0
padding: 0
list-style: none
border-bottom: thin solid $color-background
+clearfix
li.nav-tabs__list-tab
float: left
border: none
border-bottom: 3px solid transparent
color: $color-text-dark-primary
user-select: none
&:hover
border-color: rgba($color-secondary, .3)
cursor: pointer
color: $color-text-dark
a
color: $color-text-dark
a
display: block
text-decoration: none
padding: 10px 15px 5px
color: $color-text-dark-primary
i
margin-right: 5px
color: $color-text-dark-secondary
font-size: .9em
&.pi-blender
margin-right: 10px
span
color: $color-text-dark-hint
margin-left: 5px
&.active
border-color: $color-secondary
color: $color-secondary-dark
a, i
color: $color-secondary-dark
&.disabled
border-color: $color-background-light
color: $color-text-dark-hint
cursor: default
a, i
color: $color-text-dark-hint
&:hover
border-color: $color-background-light
pointer-events: none
section.stream
background-color: white
border-bottom: thin solid $color-background-dark
ul.activity-stream__list
$activity-stream-thumbnail-size: 110px
> li
position: relative
display: flex
padding: 10px 0
overflow: hidden
border-top: thin solid $color-background-dark
&:first-child
border: none
&.active .activity-stream__list-details .title
color: $color-primary
&:hover
.title
text-decoration: underline
&.video
a.image
&:hover
i
font-size: 3.5em
img
opacity: .9
img
opacity: .7
z-index: 0
transition: opacity 150ms ease-in-out
i
+position-center-translate
z-index: 1
color: rgba(white, .6)
font-size: 3em
transition: font-size 100ms ease-in-out
&.comment
.activity-stream__list-details
padding: 0
.title
color: $color-text-dark
padding: 7px 10px 2px 10px
font-size: 1em
margin: 0
ul.meta
padding: 0 10px 7px 10px
li
&.where-parent:before
content: '\e83a'
font-family: 'pillar-font'
&.what:before
display: none
&.post
.activity-stream__list-thumbnail
border-color: $node-type-post
background-color: $node-type-post
.activity-stream__list-details .title
color: darken($node-type-post, 15%)
font:
size: 1.3em
weight: 500
&.asset, &.comment, &.post
&:hover
cursor: pointer
&.empty
display: none
color: $color-text-dark-primary
padding: 20px
text-align: center
span
color: $color-primary
&:hover
text-decoration: underline
cursor: pointer
&.with-picture
min-height: $activity-stream-thumbnail-size
.activity-stream__list-thumbnail
background-color: black
width: $activity-stream-thumbnail-size * 1.69
min-width: $activity-stream-thumbnail-size * 1.69
.activity-stream__list-thumbnail-icon
position: absolute
top: 0
left: 0
right: 0
bottom: 0
font-size: 1.3em
text-shadow: 1px 1px 0 rgba(black, .2)
background-image: linear-gradient(10deg, rgba(black, .5) 0%, transparent 40%)
i
position: absolute
bottom: -8px
left: 20px
top: initial
right: initial
color: white
.activity-stream__list-thumbnail
position: relative
display: flex
justify-content: center
align-items: center
overflow: hidden
width: 35px
height: auto
min-width: 35px
min-height: auto
+media-xs
display: none
&.image i nav#nav-tabs,
color: $node-type-asset_image nav#sub-nav-tabs
&.file i ul#nav-tabs__list,
color: $node-type-asset_file ul#sub-nav-tabs__list
&.video i margin: 0
color: $node-type-asset_video padding: 0
list-style: none
border-bottom: thin solid $color-background
+clearfix
i li.nav-tabs__list-tab
+position-center-translate float: left
left: 23px border: none
top: 21px border-bottom: 3px solid transparent
font-size: 1.1em color: $color-text-dark-primary
user-select: none
img
max-height: $activity-stream-thumbnail-size
+position-center-translate
.activity-stream__list-details
display: flex
flex-direction: column
justify-content: space-around
flex: 1
overflow: hidden
position: relative
max-width: 100%
padding: 10px 0
+media-xs
margin-left: 0
.ribbon
+ribbon
right: -47px
top: 5px
font-size: 12px
span
padding: 1px 50px
.title
padding: 0 10px
color: $color-text-dark
span
@include badge(hsl(hue($color-success), 60%, 45%), 3px)
font-size: .7em
padding: 1px 5px
margin-right: 5px
ul.meta
+list-meta
padding: 5px 10px 0 10px
font-size: .85em
color: $color-text-dark-secondary
display: flex
white-space: nowrap
&.extra
margin-top: auto
li
padding-left: 10px
&:before
left: -5px
&.where-project
+text-overflow-ellipsis
section.comments
padding: 0 15px 5px
ul
padding: 0
> ul
list-style-type: none
margin: 10px 0 0
> li
+text-overflow-ellipsis
border-top: thin solid $color-background-dark
padding: 10px 0
&:first-child
border: none
> a
+text-overflow-ellipsis
color: $color-text
display: block
padding-bottom: 5px
section.blog-stream
+media-md
padding-left: 10px
+media-sm
padding-left: 10px
position: relative
.feed
position: absolute
top: 10px
right: 10px
font-size: 1.4em
color: lighten($color-text-dark-hint, 10%)
&:hover &:hover
border-color: rgba($color-secondary, .3)
cursor: pointer
color: $color-text-dark
a
color: $color-text-dark
a
display: block
text-decoration: none
padding: 10px 15px 5px
color: $color-text-dark-primary
i
margin-right: 5px
color: $color-text-dark-secondary
font-size: .9em
&.pi-blender
margin-right: 10px
span
color: $color-text-dark-hint
margin-left: 5px
&.active
border-color: $color-secondary
color: $color-secondary-dark
a, i
color: $color-secondary-dark
&.disabled
border-color: $color-background-light
color: $color-text-dark-hint
cursor: default
a, i
color: $color-text-dark-hint
&:hover
border-color: $color-background-light
pointer-events: none
.dashboard-container
word-break: break-word
section.stream
ul.activity-stream__list
$activity-stream-thumbnail-size: 110px
> li
position: relative
display: flex
padding: 10px 0
overflow: hidden
border-top: thin solid $color-background-dark
&:first-child
border: none
&.active .activity-stream__list-details .title
color: $color-primary color: $color-primary
> ul &:hover
margin: 0 .title
padding: 0 text-decoration: underline
list-style: none &.video
border-top: thin solid $color-background a.image
&:hover
i
font-size: 3.5em
img
opacity: .9
img
opacity: .7
z-index: 0
transition: opacity 150ms ease-in-out
.blog_index-item i
+container-box +position-center-translate
z-index: 1
color: rgba(white, .6)
font-size: 3em
transition: font-size 100ms ease-in-out
&.comment
.activity-stream__list-details
padding: 0
.title
color: $color-text-dark
padding: 7px 10px 2px 10px
font-size: 1em
margin: 0
ul.meta
+list-meta
font-size: .9em
padding: 0 10px 7px 10px
li
&.where-parent:before
content: '\e83a'
font-family: 'pillar-font'
&.what:before
display: none
&.post
.activity-stream__list-thumbnail
border-color: $node-type-post
background-color: $node-type-post
.activity-stream__list-details .title
color: darken($node-type-post, 15%)
font:
size: 1.3em
weight: 500
&.asset, &.comment, &.post
&:hover
cursor: pointer
&.empty
display: none
color: $color-text-dark-primary
padding: 20px
text-align: center
span
color: $color-primary
&:hover
text-decoration: underline
cursor: pointer
&.with-picture
min-height: $activity-stream-thumbnail-size
.activity-stream__list-thumbnail
background-color: black
width: $activity-stream-thumbnail-size * 1.69
min-width: $activity-stream-thumbnail-size * 1.69
.activity-stream__list-thumbnail-icon
position: absolute
top: 0
left: 0
right: 0
bottom: 0
font-size: 1.3em
text-shadow: 1px 1px 0 rgba(black, .2)
background-image: linear-gradient(10deg, rgba(black, .5) 0%, transparent 40%)
i
position: absolute
bottom: -8px
left: 20px
top: initial
right: initial
color: white
.activity-stream__list-thumbnail
position: relative
display: flex
justify-content: center
align-items: center
overflow: hidden
width: 35px
height: auto
min-width: 35px
min-height: auto
+media-xs
display: none
&.image i
color: $node-type-asset_image
&.file i
color: $node-type-asset_file
&.video i
color: $node-type-asset_video
i
+position-center-translate
left: 23px
top: 21px
font-size: 1.1em
img
max-height: $activity-stream-thumbnail-size
+position-center-translate
.activity-stream__list-details
display: flex display: flex
flex-direction: column flex-direction: column
margin-bottom: 50px justify-content: space-around
flex: 1
overflow: hidden
position: relative
max-width: 100%
padding: 10px 0
&:before +media-xs
height: 1px margin-left: 0
background-color: $color-background-dark
position: absolute
bottom: -26px
left: 25px
right: 25px
content: ' '
&:last-child .ribbon
margin-bottom: 0 +ribbon
right: -47px
top: 5px
font-size: 12px
&:before span
display: none padding: 1px 50px
video .title
max-width: 100% padding: 0 10px
color: $color-text-dark
a.item-title span
@include badge(hsl(hue($color-success), 60%, 45%), 3px)
font-size: .7em
padding: 1px 5px
margin-right: 5px
section.comments
padding: 0 15px 5px
ul
padding: 0
> ul
list-style-type: none
margin: 10px 0 0
> li
+text-overflow-ellipsis
border-top: thin solid $color-background-dark
padding: 10px 0
&:first-child
border: none
> a
+text-overflow-ellipsis
color: $color-text
display: block
padding-bottom: 5px
section.random-asset
border-bottom: thin solid $color-background-dark
ul.random-asset__list
list-style: none
padding: 0
> li
align-items: center
border-top: thin solid $color-background
display: flex
padding: 7px 0
position: relative
overflow: hidden
&:first-child
border-top: none
.ribbon
+ribbon
right: -47px
top: 5px
font:
size: 12px
weight: 500
z-index: 1
span
padding: 1px 50px
.random-asset__list-thumbnail
background-color: $color-background
display: block
height: 50px
margin-right: 15px
min-height: 50px
min-width: 50px
overflow: hidden
position: relative
width: 50px
img
width: 100%
i
+position-center-translate
font-size: 1.6em font-size: 1.6em
padding: 5px 15px color: $color-text-light
&.image
background-color: $node-type-asset_image
&.file
background-color: $node-type-asset_file
font-size: .8em
&.video
background-color: $node-type-asset_video
font-size: .8em
&.None
background-color: $node-type-group
.random-asset__list-details
.title
display: block display: block
color: $color-text font-size: 1em
color: $color-text-dark-primary
&:hover &:hover
color: $color-primary color: $color-primary
ul.meta ul.meta
+list-meta +list-meta
padding-top: 5px
font-size: .9em font-size: .9em
padding: 15px 15px 5px
li
&:before
left: -5px
&.what
text-transform: capitalize
&.blog-non-featured &.featured
border-radius: 0 align-items: flex-start
margin: 0 flex-direction: column
padding: 0
.item-content a.title
+node-details-description font-size: 1.1em
padding: 10px 15px padding: 10px 0 5px
display: block
.blog-stream__list-details color: $color-text
.title
color: $color-text-dark-primary &:hover
display: block color: $color-primary
font-size: 1.3em
a.random-asset__thumbnail
&:hover
color: $color-primary
ul.meta
+list-meta
padding-top: 5px
font-size: .9em
color: $color-text-dark-secondary
li
padding-left: 10px
&:before
left: -5px
.blog_index-header
display: block
position: relative
img
border-top-left-radius: 3px
border-top-right-radius: 3px
width: 100%
.more
text-align: center
a
color: $color-text
display: block
padding: 25px 0
text-decoration: underline
width: 100%
&:hover
color: $color-primary
section.random-asset
border-bottom: thin solid $color-background-dark
ul.random-asset__list
list-style: none
padding: 0
> li
align-items: center
border-top: thin solid $color-background
display: flex
padding: 7px 0
position: relative
overflow: hidden
&:first-child
border-top: none
.ribbon
+ribbon
right: -47px
top: 5px
font:
size: 12px
weight: 500
z-index: 1
span
padding: 1px 50px
.random-asset__list-thumbnail
background-color: $color-background
display: block display: block
height: 50px
margin-right: 15px
min-height: 50px
min-width: 50px
overflow: hidden
position: relative position: relative
width: 50px
&.video
background-color: black
img
opacity: .7
img img
transition: opacity 150ms ease-in-out
width: 100% width: 100%
max-width: 100%
i i
+position-center-translate +position-center-translate
font-size: 1.6em color: white
color: $color-text-light font-size: 3em
text-shadow: 0 0 25px black
&.image transition: font-size 150ms ease-in-out
background-color: $node-type-asset_image
&.file
background-color: $node-type-asset_file
font-size: .8em
&.video
background-color: $node-type-asset_video
font-size: .8em
&.None
background-color: $node-type-group
.random-asset__list-details
.title
display: block
font-size: 1em
color: $color-text-dark-primary
&:hover
color: $color-primary
ul.meta
+list-meta
padding-top: 5px
font-size: .9em
li
&:before
left: -5px
&.what
text-transform: capitalize
&.featured
align-items: flex-start
flex-direction: column
padding: 0
a.title
font-size: 1.1em
padding: 10px 0 5px
display: block
color: $color-text
&:hover
color: $color-primary
a.random-asset__thumbnail
display: block
position: relative
&.video
background-color: black
img
opacity: .7
img
transition: opacity 150ms ease-in-out
width: 100%
max-width: 100%
&:hover
i i
+position-center-translate font-size: 3.5em
color: white img
font-size: 3em opacity: .85
text-shadow: 0 0 25px black
transition: font-size 150ms ease-in-out
&:hover ul.meta
i +list-meta
font-size: 3.5em padding-bottom: 10px
img
opacity: .85
ul.meta
+list-meta
padding-bottom: 10px
section.announcement section.announcement
@@ -649,31 +482,21 @@ section.announcement
justify-content: space-around justify-content: space-around
flex-wrap: wrap flex-wrap: wrap
section.dashboard-in-production
.in-production-project
border-bottom: thin solid $color-background-dark
color: $color-text-dark-primary
display: block
font-size: 1.1em
margin-bottom: 15px
> img
margin-bottom: 15px
body.homepage body.homepage
.dashboard-container .blog
.dashboard-main // Custom tweak to Bootstrap grid for the only case when
+media-xs // the post is inside a column (it's usually centered in the page).
width: 100% .col-md-9
background-color: transparent flex: 1
box-shadow: none max-width: 100%
width: 60%
.dashboard-secondary .jumbotron
+container-box padding-top: 6em
+media-xs padding-bottom: 6em
width: 100%
width: 38%
> section *
padding: 15px font-size: $h1-font-size
.lead
font-size: $font-size-base

View File

@@ -147,13 +147,6 @@ section
border-top: thin solid $color-background border-top: thin solid $color-background
margin: 0 auto margin: 0 auto
a.btn
margin: 20px auto
font-size: 1.3em
padding: 9px 18px
border-radius: 8px
color: $color-text-dark
.navbar-secondary .navbar-secondary
max-width: 620px max-width: 620px
margin: 0 auto margin: 0 auto

View File

@@ -23,237 +23,224 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
| {% endblock navigation_tabs %} | {% endblock navigation_tabs %}
| {% block body %} | {% block body %}
.dashboard-container .container-fluid.dashboard-container.imgs-fluid
section.dashboard-main .row
.col-md-8
section.blog
ul.list-unstyled
| {% if latest_posts %}
| {% for node in latest_posts %}
| {{ render_blog_post(node) }}
| {% endfor %}
| {% else %}
li
| No blog entries... yet!
| {% endif %}
section.blog-stream .d-block.text-center
ul.blog-stream__list a.d-inline-block.p-3.text-muted(href="{{ url_for('main.main_blog') }}")
| {% if latest_posts %} | See All Blog Posts
| {% for node in latest_posts %}
| {{ render_blog_post(node) }}
| {% endfor %}
| {% else %}
li
.blog-stream__list-details
ul.meta
li.when No blog entries... yet!
| {% endif %}
.more a.d-inline-block.p-3.text-muted(
a(href="{{ url_for('main.main_blog') }}") href="{{ url_for('main.feeds_blogs') }}",
| See All Blog Posts title="Blogs Feed",
data-toggle="tooltip",
data-placement="left")
i.pi-rss
| RSS Feed
a.feed( .col-md-4
href="{{ url_for('main.feeds_blogs') }}", .dashboard-sidebar
title="Blogs Feed", section.pt-3
data-toggle="tooltip", h6.title-underline In Production
data-placement="left") a(href="/p/spring/")
i.pi-rss img(src="{{ url_for('static', filename='assets/img/projects/spring_450x150.jpg')}}")
p.text-muted.pt-2.
A poetic short film about a mountain spirit and her wise little dog. #[a(href="/p/spring/") Check it out].
section.dashboard-secondary section.stream.py-3
| {{ navigation_tabs(title) }} h6.title-underline Latest Assets
section.dashboard-in-production ul.activity-stream__list.list-unstyled
h6.section-title In Production | {% for n in activity_stream %}
span.section-lead. li(
Check out these projects currently in production! class="{{ n.node_type }} {{ n.properties.content_type }} {% if n.picture %}with-picture{% endif %}",
data-url="{{ n.url }}")
a.in-production-project(href="https://cloud.blender.org/p/spring/") a.activity-stream__list-thumbnail(
img(src="{{ url_for('static', filename='assets/img/projects/spring_450x150.jpg')}}") class="{{ n.properties.content_type }}",
p. href="{{ n.url }}")
#[strong Spring] - A poetic short film about a mountain spirit and her wise little dog. | {% if n.picture %}
img(src="{{ n.picture.thumbnail('m', api=api) }}")
a.in-production-project(href="https://cloud.blender.org/p/hero/")
img(src="{{ url_for('static', filename='assets/img/projects/hero_450x150.jpg')}}")
p.
#[strong Hero] - A '2D' trailer-style movie focused on getting grease pencil
production ready for Blender 2.8.
section.stream
h6.section-title Latest Assets
ul.activity-stream__list.list-unstyled
| {% for n in activity_stream %}
li(
class="{{ n.node_type }} {{ n.properties.content_type }} {% if n.picture %}with-picture{% endif %}",
data-url="{{ n.url }}")
a.activity-stream__list-thumbnail(
class="{{ n.properties.content_type }}",
href="{{ n.url }}")
| {% if n.picture %}
img(src="{{ n.picture.thumbnail('m', api=api) }}")
| {% endif %}
.activity-stream__list-thumbnail-icon
| {% if n.node_type == 'asset' %}
| {% if n.properties.content_type == 'video' %}
i.pi-play
| {% elif n.properties.content_type == 'image' %}
i.pi-picture
| {% elif n.properties.content_type == 'file' %}
i.pi-file-archive
| {% else %}
i.pi-folder
| {% endif %}
| {% endif %}
.activity-stream__list-details
a.title(href="{{ n.url }}")
| {{ n.name }}
| {% if n.permissions.world %}
.ribbon
span free
| {% endif %}
ul.meta
| {% if not n.picture %}
li.when
a(href="{{ n.url }}", title="{{ n._created }}") {{ n._created | pretty_date_time }}
li.who {{ n.user.full_name }}
| {% endif %}
| {% if n.attached_to %}
li.where-parent
a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
| {% endif %}
li.where-project
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
li.what
| {% if n.node_type == 'asset' %}
| {{ n.properties.content_type | undertitle }}
| {% endif %} | {% endif %}
| {% if n.picture %} .activity-stream__list-thumbnail-icon
ul.meta.extra | {% if n.node_type == 'asset' %}
li.when | {% if n.properties.content_type == 'video' %}
a(href="{{ n.url }}", title="{{ n._created }}") {{ n._created | pretty_date_time }} i.pi-play
li.who {{ n.user.full_name }} | {% elif n.properties.content_type == 'image' %}
| {% endif %} i.pi-picture
| {% endfor %} | {% elif n.properties.content_type == 'file' %}
i.pi-file-archive
li.activity-stream__list-item.empty#activity-stream__empty | {% else %}
| No items to list. i.pi-folder
| {% endif %}
| {% endif %}
section.random-asset .activity-stream__list-details
h6.section-title a.title(href="{{ n.url }}")
a(href="/search") Explore the Cloud | {{ n.name }}
span.section-lead Random selection of the best assets & tutorials
ul.random-asset__list.list-unstyled | {% if n.permissions.world %}
| {% for n in random_featured %} .ribbon
| {% if n.picture and loop.first %} span free
li.random-asset__list-item.project | {% endif %}
| {% if n.project.picture_square %} ul.list-unstyled.d-flex.text-muted
a.random-asset__list-thumbnail( | {% if not n.picture %}
href="{{ n.project.url }}") li.when
img.image(src="{{ n.project.picture_square.thumbnail('s', api=api) }}") a(href="{{ n.url }}", title="{{ n._created }}") {{ n._created | pretty_date_time }}
| {% endif %} li.who {{ n.user.full_name }}
.random-asset__list-details | {% endif %}
a.title(href="{{ n.project.url }}") {{ n.project.name }}
| {% if n.project.summary %}
ul.meta
li.what
a(href="{{ n.project.url }}") {{ n.project.summary }}
| {% endif %}
li.random-asset__list-item.featured | {% if n.attached_to %}
| {% if n.permissions.world %} li.where-parent
.ribbon a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
span free | {% endif %}
| {% endif %} li.where-project
a.random-asset__thumbnail( a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
href="{{ n.url }}", li.what
class="{{ n.properties.content_type }}") | {% if n.node_type == 'asset' %}
| {% if n.picture %} | {{ n.properties.content_type | undertitle }}
img(src="{{ n.picture.thumbnail('l', api=api) }}") | {% endif %}
| {% if n.properties.content_type == 'video' %} | {% if n.picture %}
i.pi-play ul.list-unstyled.d-flex.text-muted.extra
| {% endif %} li.when
a(href="{{ n.url }}", title="{{ n._created }}") {{ n._created | pretty_date_time }}
li.who {{ n.user.full_name }}
| {% endif %}
| {% endfor %}
| {% endif %} li.activity-stream__list-item.empty#activity-stream__empty
| No items to list.
a.title(href="{{ n.url }}")
| {{ n.name }}
ul.meta
li.what
a(href="{{ n.url }}")
| {% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}Folder{% endif %}
li.where
a(href="{{ n.project.url }}")
| {{ n.project.name }}
| {% else %}
li section.random-asset.py-3
| {% if n.permissions.world %} h6.title-underline
.ribbon a(href="/search") Explore the Cloud
span free .pb-3.text-muted Random selection of the best assets & tutorials
| {% endif %}
a.random-asset__list-thumbnail( ul.random-asset__list.list-unstyled
href="{{ n.url }}", | {% for n in random_featured %}
class="{{ n.properties.content_type }}") | {% if n.picture and loop.first %}
| {% if n.picture %} li.random-asset__list-item.project
img.image(src="{{ n.picture.thumbnail('s', api=api) }}") | {% if n.project.picture_square %}
a.random-asset__list-thumbnail(
href="{{ n.project.url }}")
img.image(src="{{ n.project.picture_square.thumbnail('s', api=api) }}")
| {% endif %}
.random-asset__list-details
a.title(href="{{ n.project.url }}") {{ n.project.name }}
| {% if n.project.summary %}
ul.list-unstyled.d-flex.text-muted
li.what
a(href="{{ n.project.url }}") {{ n.project.summary }}
| {% endif %}
li.random-asset__list-item.featured
| {% if n.permissions.world %}
.ribbon
span free
| {% endif %}
a.random-asset__thumbnail(
href="{{ n.url }}",
class="{{ n.properties.content_type }}")
| {% if n.picture %}
img(src="{{ n.picture.thumbnail('l', api=api) }}")
| {% if n.properties.content_type == 'video' %}
i.pi-play
| {% endif %}
| {% endif %}
a.title(href="{{ n.url }}")
| {{ n.name }}
ul.list-unstyled.d-flex.text-muted
li.what
a(href="{{ n.url }}")
| {% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}Folder{% endif %}
li.where
a(href="{{ n.project.url }}")
| {{ n.project.name }}
| {% else %} | {% else %}
| {% if n.properties.content_type == 'video' %}
i.pi-film-thick li
| {% elif n.properties.content_type == 'image' %} | {% if n.permissions.world %}
i.pi-picture .ribbon
| {% elif n.properties.content_type == 'file' %} span free
i.pi-file-archive | {% endif %}
a.random-asset__list-thumbnail(
href="{{ n.url }}",
class="{{ n.properties.content_type }}")
| {% if n.picture %}
img.image(src="{{ n.picture.thumbnail('s', api=api) }}")
| {% else %}
| {% if n.properties.content_type == 'video' %}
i.pi-film-thick
| {% elif n.properties.content_type == 'image' %}
i.pi-picture
| {% elif n.properties.content_type == 'file' %}
i.pi-file-archive
| {% else %}
i.pi-folder
| {% endif %}
| {% endif %}
.random-asset__list-details
a.title(href="{{ n.url }}") {{ n.name }}
ul.list-unstyled.d-flex.text-muted
li.what
a(href="{{ n.url }}")
| {% if n.properties.content_type %}{{ n.properties.content_type }}{% else %}Folder{% endif %}
li.where
a(href="{{ n.project.url }}") {{ n.project.name }}
| {% endif %}
| {% endfor %}
section.comments.py-3
h6.title-underline Latest Comments
ul.list-unstyled
| {% if latest_comments %}
| {% for n in latest_comments %}
li(
class="{{ n.node_type }}",
data-url="{{ n.url }}")
a.comment-content(href="{{ n.url }}")
| {{ n.properties.content | striptags | truncate(200) }}
ul.list-unstyled.d-flex.text-muted
li.who {{ n.user.full_name }}
| {% if n.attached_to %}
li.where-parent
a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
| {% endif %}
li.when
a(href="{{ n.url }}", title="{{ n._created }}")
| {{ n._created | pretty_date_time }}
| {% endfor %}
| {% else %} | {% else %}
i.pi-folder li.activity-stream__list-item.empty#activity-stream__empty
| No comments... yet!
| {% endif %} | {% endif %}
| {% endif %}
.random-asset__list-details
a.title(href="{{ n.url }}") {{ n.name }}
ul.meta
li.what
a(href="{{ n.url }}")
| {% if n.properties.content_type %}{{ n.properties.content_type }}{% else %}Folder{% endif %}
li.where
a(href="{{ n.project.url }}") {{ n.project.name }}
| {% endif %}
| {% endfor %}
section.comments
h6.section-title Latest Comments
ul.list-unstyled
| {% if latest_comments %}
| {% for n in latest_comments %}
li(
class="{{ n.node_type }}",
data-url="{{ n.url }}")
a.comment-content(href="{{ n.url }}")
| {{ n.properties.content | striptags | truncate(200) }}
ul.meta
li.who {{ n.user.full_name }}
| {% if n.attached_to %}
li.where-parent
a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
| {% endif %}
li.when
a(href="{{ n.url }}", title="{{ n._created }}")
| {{ n._created | pretty_date_time }}
| {% endfor %}
| {% else %}
li.activity-stream__list-item.empty#activity-stream__empty
| No comments... yet!
| {% endif %}
| {% endblock %} | {% endblock %}