💄 Add comments plug-in loading style.

This commit is contained in:
凡梦星尘 2022-06-20 10:58:16 +08:00
parent fae6b4787c
commit 4ddcf875d5
5 changed files with 36 additions and 14 deletions

View File

@ -1,6 +1,7 @@
@if $utterances_enable { // TODO maybe use for next time
.utterances { // @if $utterances_enable {
//max-width: unset; // .utterances {
min-height: 300px; // max-width: unset;
} // min-height: 300px;
} // }
// }

View File

@ -43,8 +43,26 @@
margin-top: 60px; margin-top: 60px;
} }
min-height: 300px;
overflow: hidden; overflow: hidden;
.comment-loading {
@if $sidebar_position == 'right' {
padding-right: $sidebar-desktop + $sidebar-offset;
} @else {
padding-left: $sidebar-desktop + $sidebar-offset;
}
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
margin-top: 100px;
text-align: center;
font-size: 2em;
}
.comment-head { .comment-head {
margin-bottom: 20px; margin-bottom: 20px;
@ -70,7 +88,7 @@
} }
width: max-content; width: max-content;
border-radius: 8px; border-radius: 8px;
background: #eee; background: var(--card-bg-color);
.first-comment { .first-comment {
color: $first_comment_color; color: $first_comment_color;
@ -154,11 +172,6 @@
$second_comment_display: block; $second_comment_display: block;
} }
.comment-wrap .storage {
display: block;
animation: 0.5s ease 0s 1 normal none running tabshow;
}
.comment-wrap>div:nth-child(1) { .comment-wrap>div:nth-child(1) {
display: $first_comment_display; display: $first_comment_display;
} }

View File

@ -0,0 +1,3 @@
<div class="comment-loading">
<i class="fa fa-sync fa-spin"></i>
</div>

View File

@ -15,7 +15,8 @@
wordLimit: {{ .wordLimit }}, wordLimit: {{ .wordLimit }},
requiredMeta: {{ .requiredMeta }}, requiredMeta: {{ .requiredMeta }},
serverURL: "{{ .serverURL }}", serverURL: "{{ .serverURL }}",
lang: "{{ $.Lang }}" lang: "{{ $.Lang }}",
dark: "auto"
}); });
</script> </script>
{{- end }} {{- end }}

View File

@ -28,11 +28,15 @@
{{- if $tc }} {{- if $tc }}
{{- range $sn }} {{- range $sn }}
<div> <div>
{{- partial "_thirdparty/comment/comm_loading.html" . }}
{{- partial (printf $cp (lower .name)) $root }} {{- partial (printf $cp (lower .name)) $root }}
</div> </div>
{{- end }} {{- end }}
{{- else }} {{- else }}
<div>{{- partial (printf $cp $fc) $root }}</div> <div>
{{- partial "_thirdparty/comment/comm_loading.html" . }}
{{- partial (printf $cp $fc) $root }}
</div>
{{- end }} {{- end }}
</div> </div>
</div> </div>