@use "@styles/abstracts/functions" as fun;
.wrapper {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: center;
gap: var(--spacing-2xs);
margin: var(--spacing-md) 0;
}
.ball {
width: fun.convert-px(8);
height: fun.convert-px(8);
background: linear-gradient(
to right,
var(--color-primary-light) 0%,
var(--color-primary-lighter) 100%
);
border-radius: 50%;
animation: spinner 1.4s infinite ease-in-out both;
&:first-child {
animation-delay: -0.32s;
}
&:nth-child(2) {
animation-delay: -0.16s;
}
}
.text {
margin-left: var(--spacing-xs);
color: var(--color-primary-darker);
text-align: center;
}
@keyframes spinner {
0%,
80%,
100% {
transform: scale(0);
}
40% {
transform: scale(1);
}
}
t-data/cgit.png' alt='cgit logo'/>
blob: 04cffa60eade5e05b915becb7e963c41ab2eb95b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
import { MetaKind } from '@ts/types/app';
import { useRouter } from 'next/router';
import { useIntl } from 'react-intl';
import { MetaItem } from '..';
const CommentsCount = ({ total, kind }: { total: number; kind: MetaKind }) => {
const intl = useIntl();
const { asPath } = useRouter();
const isArticle = () => asPath.includes('/article/');
const getCommentsCount = () => {
return intl.formatMessage(
{
defaultMessage:
'{total, plural, =0 {No comments} one {# comment} other {# comments}}',
description: 'CommentsCount: comment count value',
id: 'lKGNKx',
},
{ total }
);
};
return (
<MetaItem
title={intl.formatMessage({
defaultMessage: 'Comments:',
description: 'CommentsCount: comment count meta label',
id: '6BRtAu',
})}
value={
isArticle() ? (
<a href="#comments">{getCommentsCount()}</a>
) : (
getCommentsCount()
)
}
kind={kind}
/>
);
};
export default CommentsCount;
|