Homepage: Small cleanup of classes and more space between posts

Also fix selectors for comments/assets
This commit is contained in:
2017-11-10 17:35:19 +01:00
parent 0c4db84940
commit 08f56877ca
2 changed files with 64 additions and 75 deletions

View File

@@ -25,41 +25,37 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
ul.blog-stream__list
| {% if latest_posts %}
| {% for n in latest_posts %}
li.blog-stream__list-item.featured
li
| {% if n.picture %}
a.blog-stream__thumbnail(
href="{{ n.url }}")
img(src="{{ n.picture.thumbnail('l', api=api) }}")
| {% endif %}
a.title(href="{{ n.url }}")
| {{ n.name }}
ul.meta
li.where-project
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
li.when
a(href="{{ n.url }}",
title="Updated {{ n._updated | pretty_date }}")
| {{ n._created | pretty_date }}
li.where-project
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
a.title(href="{{ n.url }}")
| {{ n.name }}
.description
| {{ n.properties.content | markdown }}
| {% endfor %}
| {% else %}
li.blog-stream__list-item
li
.blog-stream__list-details
ul.meta
li.when No blog entries... yet!
| {% endif %}
li.blog-stream__list-item.more
a(
href="{{ url_for('main.feeds_blogs') }}",
title="Blender Cloud & Projects Blog Feed")
| RSS Feed
a(href="{{ url_for('main.main_blog') }}")
| See All Blog Posts
.more
a(href="{{ url_for('main.main_blog') }}")
| See All Blog Posts
a.feed(
href="{{ url_for('main.feeds_blogs') }}",
@@ -265,12 +261,12 @@ script.
$(function () {
/* cleanup mentions in comments */
$('.activity-stream__list-details a.title').each(function(){
$('.comment-content').each(function(){
$(this).text($(this).text().replace(/\*|\@|\<(.*?)\>/g, ''));
});
/* Click on the whole asset/comment row to go */
$('li.activity-stream__list-item.asset, li.activity-stream__list-item.comment').click(function(e){
$('.activity-stream__list li, .comments ul li').click(function(e){
window.location.href = $(this).data('url');
$(this).addClass('active');
});