- document folder - full-text search - blob storage - basic edgeless support Co-authored-by: tzhangchi <terry.zhangchi@outlook.com> Co-authored-by: QiShaoXuan <qishaoxuan777@gmail.com> Co-authored-by: DiamondThree <diamond.shx@gmail.com> Co-authored-by: MingLiang Wang <mingliangwang0o0@gmail.com> Co-authored-by: JimmFly <yangjinfei001@gmail.com> Co-authored-by: Yifeng Wang <doodlewind@toeverything.info> Co-authored-by: Himself65 <himself65@outlook.com> Co-authored-by: lawvs <18554747+lawvs@users.noreply.github.com> Co-authored-by: Qi <474021214@qq.com>
92 lines
1.5 KiB
TypeScript
92 lines
1.5 KiB
TypeScript
import { styled } from '@/styles';
|
|
|
|
// Inspired by https://codepen.io/graphilla/pen/rNvBMYY
|
|
export const StyledLoadingWrapper = styled.div<{ size?: number }>(
|
|
({ size = 40 }) => {
|
|
return {
|
|
width: size * 4,
|
|
height: size * 4,
|
|
position: 'relative',
|
|
};
|
|
}
|
|
);
|
|
export const StyledLoading = styled.div`
|
|
position: absolute;
|
|
left: 25%;
|
|
top: 25%;
|
|
@keyframes slide {
|
|
0% {
|
|
transform: translate(var(--sx), var(--sy));
|
|
}
|
|
65% {
|
|
transform: translate(var(--ex), var(--sy));
|
|
}
|
|
95%,
|
|
100% {
|
|
transform: translate(var(--ex), var(--ey));
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const StyledLoadingItem = styled.div<{ size: number }>(
|
|
({ size = 40 }) => {
|
|
return `
|
|
position: absolute;
|
|
width: ${size}px;
|
|
height: ${size}px;
|
|
background: #9dacf9;
|
|
animation: slide 0.9s cubic-bezier(0.65, 0.53, 0.59, 0.93) infinite;
|
|
|
|
&::before,
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
&::before {
|
|
background: #5260b9;
|
|
transform: skew(0deg, -45deg);
|
|
right: 100%;
|
|
top: 50%;
|
|
}
|
|
|
|
&::after {
|
|
background: #6880ff;
|
|
transform: skew(-45deg, 0deg);
|
|
top: 100%;
|
|
right: 50%;
|
|
}
|
|
|
|
&:nth-of-type(1) {
|
|
--sx: 50%;
|
|
--sy: -50%;
|
|
--ex: 150%;
|
|
--ey: 50%;
|
|
}
|
|
|
|
&:nth-of-type(2) {
|
|
--sx: -50%;
|
|
--sy: -50%;
|
|
--ex: 50%;
|
|
--ey: -50%;
|
|
}
|
|
|
|
&:nth-of-type(3) {
|
|
--sx: 150%;
|
|
--sy: 50%;
|
|
--ex: 50%;
|
|
--ey: 50%;
|
|
}
|
|
|
|
&:nth-of-type(4) {
|
|
--sx: 50%;
|
|
--sy: 50%;
|
|
--ex: -50%;
|
|
--ey: -50%;
|
|
}
|
|
`;
|
|
}
|
|
);
|