Homepage: Style comments
This commit is contained in:
@@ -251,29 +251,6 @@ section.stream
|
|||||||
padding: 1px 5px
|
padding: 1px 5px
|
||||||
margin-right: 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
|
section.random-asset
|
||||||
border-bottom: thin solid $color-background-dark
|
border-bottom: thin solid $color-background-dark
|
||||||
|
@@ -51,7 +51,6 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
|
|||||||
| RSS Feed
|
| RSS Feed
|
||||||
|
|
||||||
.col-md-3.col-xl-2
|
.col-md-3.col-xl-2
|
||||||
.dashboard-sidebar
|
|
||||||
section.pt-3
|
section.pt-3
|
||||||
h6.title-underline In Production
|
h6.title-underline In Production
|
||||||
a(href="/p/spring/")
|
a(href="/p/spring/")
|
||||||
@@ -79,7 +78,7 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
|
|||||||
|
|
||||||
section.random-asset.py-3
|
section.random-asset.py-3
|
||||||
h6.title-underline
|
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
|
.pb-3.text-muted Random selection of the best assets & tutorials
|
||||||
|
|
||||||
ul.random-asset__list.list-unstyled
|
ul.random-asset__list.list-unstyled
|
||||||
@@ -161,34 +160,33 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
|
|||||||
| {% endfor %}
|
| {% endfor %}
|
||||||
|
|
||||||
|
|
||||||
section.comments.py-3
|
section.py-3
|
||||||
h6.title-underline Latest Comments
|
h6.title-underline Latest Comments
|
||||||
|
|
||||||
ul.list-unstyled
|
ul.list-unstyled
|
||||||
| {% if latest_comments %}
|
| {% if latest_comments %}
|
||||||
| {% for n in latest_comments %}
|
| {% for n in latest_comments %}
|
||||||
li(
|
li.pb-2.mb-2.border-bottom.text-truncate
|
||||||
class="{{ n.node_type }}",
|
|
||||||
data-url="{{ n.url }}")
|
|
||||||
|
|
||||||
a.comment-content(href="{{ n.url }}")
|
a.js-comment-content.text-muted(href="{{ n.url }}")
|
||||||
| {{ n.properties.content | striptags | truncate(200) }}
|
| {{ n.properties.content | striptags | truncate(200) }}
|
||||||
|
|
||||||
ul.list-unstyled.d-flex.text-muted
|
|
||||||
li.who {{ n.user.full_name }}
|
|
||||||
| {% if n.attached_to %}
|
| {% if n.attached_to %}
|
||||||
|
.d-flex.align-items-baseline
|
||||||
li.where-parent
|
a.text-muted.text-truncate(href="{{ n.attached_to.url }}")
|
||||||
a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
|
small.pr-2.font-weight-bold {{ n.project.name }}
|
||||||
|
small {{ n.attached_to.name }}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
li.when
|
.d-flex.align-items-baseline
|
||||||
a(href="{{ n.url }}", title="{{ n._created }}")
|
small.pr-2.font-weight-bold {{ n.user.full_name }}
|
||||||
| {{ n._created | pretty_date_time }}
|
|
||||||
|
a.text-muted(href="{{ n.url }}", title="{{ n._created }}")
|
||||||
|
small {{ n._created | pretty_date }}
|
||||||
| {% endfor %}
|
| {% endfor %}
|
||||||
|
|
||||||
| {% else %}
|
| {% else %}
|
||||||
li.activity-stream__list-item.empty#activity-stream__empty
|
span
|
||||||
| No comments... yet!
|
| No comments... yet!
|
||||||
|
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
@@ -201,16 +199,10 @@ script.
|
|||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
/* cleanup mentions in comments */
|
/* cleanup mentions in comments */
|
||||||
$('.comment-content').each(function(){
|
$('.js-comment-content').each(function(){
|
||||||
$(this).text($(this).text().replace(/\*|\@|\<(.*?)\>/g, ''));
|
$(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
|
hopToTop(); // Display jump to top button
|
||||||
});
|
});
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
Reference in New Issue
Block a user