2020-11-18 23:26:01 +08:00
|
|
|
// scss-lint:disable SelectorDepth NestingDepth
|
|
|
|
|
|
|
|
.comments-sidebar {
|
|
|
|
--comments-sidebar-width: 280px;
|
|
|
|
animation-timing-function: $timing-function-sharp;
|
2023-05-05 21:47:53 +08:00
|
|
|
height: calc(100vh - var(--top-navigation-height));
|
2020-11-18 23:26:01 +08:00
|
|
|
position: fixed;
|
|
|
|
right: 0;
|
2023-05-05 21:47:53 +08:00
|
|
|
top: var(--top-navigation-height);
|
2020-11-18 23:26:01 +08:00
|
|
|
transition: width .3s;
|
|
|
|
width: 0;
|
2023-05-08 20:44:50 +08:00
|
|
|
z-index: 609;
|
2020-11-18 23:26:01 +08:00
|
|
|
|
|
|
|
&.open {
|
|
|
|
width: var(--comments-sidebar-width);
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-content {
|
|
|
|
background: $color-concrete;
|
|
|
|
border-left: 1px solid $color-white;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
height: 100%;
|
|
|
|
position: relative;
|
|
|
|
width: var(--comments-sidebar-width);
|
|
|
|
|
|
|
|
.sidebar-header {
|
|
|
|
align-items: center;
|
|
|
|
border-bottom: $border-default;
|
|
|
|
display: flex;
|
|
|
|
flex-basis: 5em;
|
|
|
|
flex-shrink: 0;
|
2022-05-25 21:04:14 +08:00
|
|
|
flex-wrap: wrap;
|
2020-11-18 23:26:01 +08:00
|
|
|
padding: 1em;
|
|
|
|
|
|
|
|
.comments-subject-title {
|
2020-11-20 19:29:40 +08:00
|
|
|
@include font-h3;
|
2023-06-15 21:12:51 +08:00
|
|
|
flex-basis: calc(100% - 40px);
|
2020-11-18 23:26:01 +08:00
|
|
|
flex-grow: 1;
|
|
|
|
height: 2em;
|
2023-09-21 10:21:50 +08:00
|
|
|
max-width: 13em;
|
2020-11-20 19:29:40 +08:00
|
|
|
line-height: 2em;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
2020-11-18 23:26:01 +08:00
|
|
|
}
|
|
|
|
|
2022-05-25 21:04:14 +08:00
|
|
|
.comments-subject-url {
|
|
|
|
flex-basis: 100%;
|
|
|
|
}
|
|
|
|
|
2020-11-18 23:26:01 +08:00
|
|
|
.close-btn {
|
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-body {
|
|
|
|
flex-basis: calc(100% - 10em);
|
|
|
|
flex-grow: 1;
|
|
|
|
overflow: auto;
|
|
|
|
padding: 1em;
|
2020-11-21 19:31:49 +08:00
|
|
|
|
|
|
|
.no-comments-placeholder {
|
|
|
|
display: none;
|
|
|
|
padding: 1em;
|
|
|
|
|
|
|
|
.no-comments-image {
|
|
|
|
display: block;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.description {
|
|
|
|
@include font-main;
|
|
|
|
color: $color-silver-chalice;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.comments-list:empty + .no-comments-placeholder {
|
|
|
|
display: block;
|
|
|
|
}
|
2020-11-18 23:26:01 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.sidebar-footer {
|
|
|
|
border-top: $border-default;
|
|
|
|
flex-basis: 5em;
|
|
|
|
flex-grow: 1;
|
|
|
|
flex-shrink: 0;
|
|
|
|
padding: 1em;
|
|
|
|
|
|
|
|
.comment-input-container {
|
|
|
|
background: $color-white;
|
|
|
|
border-radius: $border-radius-tag;
|
|
|
|
padding-right: 2.5em;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.comment-input-field {
|
|
|
|
animation-timing-function: $timing-function-sharp;
|
|
|
|
border: 0;
|
|
|
|
display: block;
|
|
|
|
line-height: 1.25em;
|
|
|
|
max-height: 160px;
|
|
|
|
outline: none;
|
|
|
|
padding: .5em;
|
|
|
|
transition: height .3s;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.send-comment {
|
|
|
|
color: $brand-primary;
|
2020-11-20 19:29:40 +08:00
|
|
|
cursor: pointer;
|
2020-11-18 23:26:01 +08:00
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
2023-06-15 21:12:51 +08:00
|
|
|
right: 5px;
|
2020-11-18 23:26:01 +08:00
|
|
|
text-align: center;
|
2023-06-15 21:12:51 +08:00
|
|
|
top: 5px;
|
2020-11-18 23:26:01 +08:00
|
|
|
}
|
|
|
|
}
|
2020-11-21 03:25:28 +08:00
|
|
|
|
|
|
|
.update-buttons {
|
|
|
|
display: none;
|
|
|
|
margin-top: .5em;
|
|
|
|
}
|
|
|
|
|
2020-11-21 19:31:49 +08:00
|
|
|
.error-container {
|
|
|
|
@include font-small;
|
|
|
|
color: $brand-danger;
|
|
|
|
}
|
|
|
|
|
2020-11-21 03:25:28 +08:00
|
|
|
&.update {
|
|
|
|
.update-buttons {
|
|
|
|
display: block;
|
|
|
|
}
|
2023-01-16 19:40:44 +08:00
|
|
|
|
|
|
|
.send-comment {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-11-21 03:25:28 +08:00
|
|
|
}
|
2020-11-18 23:26:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-20 19:29:40 +08:00
|
|
|
.comment-container {
|
2022-05-25 21:04:14 +08:00
|
|
|
margin: 0 1em .25em 0;
|
2020-11-20 19:29:40 +08:00
|
|
|
|
|
|
|
.comment-header {
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
margin-bottom: .5em;
|
2022-05-25 21:04:14 +08:00
|
|
|
margin-top: 2em;
|
2020-11-20 19:29:40 +08:00
|
|
|
min-height: 1.75em;
|
|
|
|
|
|
|
|
.user-name {
|
|
|
|
margin: 0 .5em;
|
|
|
|
order: 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
.user-avatar {
|
2022-07-25 19:38:36 +08:00
|
|
|
border-radius: 50%;
|
2020-11-20 19:29:40 +08:00
|
|
|
max-width: 1.75em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.comment-body {
|
|
|
|
background: $color-white;
|
|
|
|
border-radius: $border-radius-default;
|
|
|
|
|
|
|
|
.comment-message {
|
|
|
|
@include font-main;
|
|
|
|
color: $color-volcano;
|
2020-11-21 03:25:28 +08:00
|
|
|
padding: .5em 1em;
|
2020-11-20 19:29:40 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.comment-footer {
|
2020-11-21 03:25:28 +08:00
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
|
|
|
padding: 0 1em .5em;
|
|
|
|
|
|
|
|
.comment-menu-container {
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
|
|
.open-dropdown-btn {
|
|
|
|
cursor: pointer;
|
|
|
|
line-height: 2em;
|
|
|
|
text-align: center;
|
|
|
|
width: 2em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.comment-dropdown-menu {
|
|
|
|
@include font-button;
|
|
|
|
|
|
|
|
a {
|
|
|
|
padding: .5em 1em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.fas {
|
|
|
|
margin-right: .5em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-11-20 19:29:40 +08:00
|
|
|
|
|
|
|
.comment-create-date {
|
|
|
|
@include font-small;
|
|
|
|
color: $color-volcano;
|
|
|
|
opacity: .5;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.current-user {
|
2022-05-25 21:04:14 +08:00
|
|
|
margin: 0 0 .25em 1em;
|
2020-11-20 19:29:40 +08:00
|
|
|
|
|
|
|
.comment-body {
|
|
|
|
background: $color-alto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.comment-header {
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
|
|
.user-avatar {
|
2022-07-12 19:54:10 +08:00
|
|
|
border-radius: 50%;
|
2020-11-20 19:29:40 +08:00
|
|
|
order: 3;
|
2022-07-12 19:54:10 +08:00
|
|
|
overflow: hidden;
|
2020-11-20 19:29:40 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-18 23:26:01 +08:00
|
|
|
.loading-placeholder {
|
|
|
|
display: none;
|
|
|
|
|
|
|
|
@mixin placeholder-avatar {
|
|
|
|
@include pulse-animation;
|
|
|
|
background: $color-alto;
|
|
|
|
border-radius: 50%;
|
|
|
|
content: "";
|
|
|
|
display: inline-block;
|
|
|
|
height: 1.5em;
|
|
|
|
width: 1.5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin placeholder-name {
|
|
|
|
@include pulse-animation;
|
|
|
|
background: $color-alto;
|
|
|
|
content: "";
|
|
|
|
display: inline-block;
|
|
|
|
height: 1em;
|
|
|
|
margin: .25em;
|
|
|
|
width: 6em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.comment-placeholder {
|
|
|
|
padding-bottom: 1em;
|
|
|
|
|
|
|
|
.comment-body-placeholder {
|
|
|
|
@include pulse-animation;
|
|
|
|
background: $color-alto;
|
|
|
|
height: 5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.left {
|
|
|
|
margin-right: 1em;
|
|
|
|
|
|
|
|
.comment-user-placeholder {
|
|
|
|
&::before {
|
|
|
|
@include placeholder-avatar;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
@include placeholder-name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.right {
|
|
|
|
margin-left: 1em;
|
|
|
|
|
|
|
|
.comment-user-placeholder {
|
|
|
|
text-align: right;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
@include placeholder-name;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::after {
|
|
|
|
@include placeholder-avatar;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.loading {
|
|
|
|
.comments-subject-title {
|
|
|
|
@include pulse-animation;
|
|
|
|
background: $color-alto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.loading-placeholder {
|
|
|
|
display: initial;
|
|
|
|
}
|
2020-11-23 19:44:23 +08:00
|
|
|
.sidebar-body {
|
|
|
|
.comments-list:empty + .no-comments-placeholder {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
2020-11-18 23:26:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|