Homepage: Style comments

This commit is contained in:
2018-09-17 12:16:52 +02:00
parent bb2c351460
commit 0556c5ae9a
2 changed files with 117 additions and 148 deletions

View File

@@ -251,29 +251,6 @@ section.stream
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

View File

@@ -51,7 +51,6 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
| RSS Feed
.col-md-3.col-xl-2
.dashboard-sidebar
section.pt-3
h6.title-underline In Production
a(href="/p/spring/")
@@ -79,7 +78,7 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
section.random-asset.py-3
h6.title-underline
a(href="/search") Explore the Cloud
a.text-muted(href="{{ url_for('main.nodes_search_index') }}") Explore the Cloud
.pb-3.text-muted Random selection of the best assets & tutorials
ul.random-asset__list.list-unstyled
@@ -161,34 +160,33 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
| {% endfor %}
section.comments.py-3
section.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 }}")
li.pb-2.mb-2.border-bottom.text-truncate
a.comment-content(href="{{ n.url }}")
a.js-comment-content.text-muted(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 }}
.d-flex.align-items-baseline
a.text-muted.text-truncate(href="{{ n.attached_to.url }}")
small.pr-2.font-weight-bold {{ n.project.name }}
small {{ n.attached_to.name }}
| {% endif %}
li.when
a(href="{{ n.url }}", title="{{ n._created }}")
| {{ n._created | pretty_date_time }}
.d-flex.align-items-baseline
small.pr-2.font-weight-bold {{ n.user.full_name }}
a.text-muted(href="{{ n.url }}", title="{{ n._created }}")
small {{ n._created | pretty_date }}
| {% endfor %}
| {% else %}
li.activity-stream__list-item.empty#activity-stream__empty
span
| No comments... yet!
| {% endif %}
@@ -201,16 +199,10 @@ script.
$(function () {
/* cleanup mentions in comments */
$('.comment-content').each(function(){
$('.js-comment-content').each(function(){
$(this).text($(this).text().replace(/\*|\@|\<(.*?)\>/g, ''));
});
/* Click on the whole asset/comment row to go */
$('.activity-stream__list li, .comments ul li').click(function(e){
window.location.href = $(this).data('url');
$(this).addClass('active');
});
hopToTop(); // Display jump to top button
});
| {% endblock %}