-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Листаем комменты в батлах с помощью кнопки comment-scroll-arrow
#1267
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ | |
{% load text_filters %} | ||
{% load battle %} | ||
{% load posts %} | ||
<div class="battle-comments-list" id="comment-{{ comment.id }}"> | ||
<div class="battle-comments-list"> | ||
<div class="battle-comment-prefix battle-comment-prefix-side-{{ comment.metadata.battle.side }}"> | ||
за «{{ comment.battle_side }}» | ||
</div> | ||
<div class="block comment comment-type-battle comment-type-battle-side-{{ comment.metadata.battle.side }}"> | ||
<div class="block comment {% if comment.created_at > post_last_view_at %}comment-is-new{% endif %} comment-type-battle comment-type-battle-side-{{ comment.metadata.battle.side }}" id="comment-{{ comment.id }}"> | ||
<div class="comment-header"> | ||
<div class="comment-title">{{ comment.title | rutypography }}</div> | ||
<div class="comment-type-battle-userinfo"> | ||
|
@@ -57,11 +57,13 @@ | |
</div> | ||
</div> | ||
|
||
{% if replies %} | ||
<div class="replies replies-type-battle replies-indent-normal"> | ||
{% for reply_tree in replies %} | ||
{% include "comments/types/reply.html" with comment=reply_tree.comment reply_to=reply_tree.comment replies=reply_tree.replies %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
<div class="comment-replies thread-collapse-toggle"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. контейнер |
||
{% if replies %} | ||
<div class="replies replies-type-battle replies-indent-normal"> | ||
{% for reply_tree in replies %} | ||
{% include "comments/types/reply.html" with comment=reply_tree.comment reply_to=reply_tree.comment replies=reply_tree.replies %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -418,6 +418,10 @@ | |
|
||
.comment-type-battle {} | ||
|
||
.comment-type-battle.comment { | ||
scroll-margin-top: 40px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
.comment-type-battle .comment-header { | ||
flex-direction: column; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1016,9 +1016,17 @@ | |
grid-template-areas: | ||
"prefix prefix prefix" | ||
"left center right" | ||
"reply-form reply-form reply-form" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. форма реплаев сразу под первым батловым комментом |
||
"replies replies replies" | ||
} | ||
|
||
.battle-comments-list .comment-replies { | ||
grid-area: replies; | ||
} | ||
.battle-comments-list #comment-reply-form { | ||
grid-area: reply-form; | ||
} | ||
|
||
.post-comments-form { | ||
padding-top: 30px; | ||
padding-left: 10px; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -583,6 +583,10 @@ | |
justify-self: stretch; | ||
} | ||
|
||
.comment-layout-battle .comment-replies { | ||
grid-area: replies; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. а вот это, кажется, лишнее |
||
} | ||
|
||
@media only screen and (max-width : 570px) { | ||
.comment-layout-normal { | ||
grid-template-columns: 35px minmax(auto, 1fr) 60px; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,8 +88,10 @@ export default { | |
".post-comments-list > .replies > .reply.comment-is-new", | ||
// Новые реплаи на втором уровне к старым реплаям без родительского комментария | ||
".post-comments-list > .replies > .reply:not(.comment-is-new) > .reply.comment-is-new", | ||
// Новые реплаи бэтлов | ||
".battle-comments-list .comment-replies > .replies > .reply.comment-is-new", | ||
// Новые реплаи на втором уровне бэтлов | ||
".battle-comments .post-comments-list > .replies > .reply:not(.comment-is-new) > .reply-replies >.replies > .reply.comment-is-new", | ||
".battle-comments-list .comment-replies > .replies > .reply:not(.comment-is-new) > .reply-replies >.replies > .reply.comment-is-new", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. к общему массиву новых комментов добавляем батловые реплаи первого и второго уровня |
||
].join() | ||
); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Перекинул id сюда, так же добавил класс
comment-is-new
при необходимости