mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Move fadein directly to component
This commit is contained in:
@@ -82,12 +82,14 @@ interface ImageProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Image = styled.img<ImageProps>`
|
const Image = styled.img<ImageProps>`
|
||||||
${fadeIn};
|
|
||||||
width: ${({ height }) => `${height}px`};
|
width: ${({ height }) => `${height}px`};
|
||||||
height: ${({ height }) => `${height}px`};
|
height: ${({ height }) => `${height}px`};
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
|
|
||||||
|
${fadeIn}
|
||||||
|
animation: fadein 0.3s ease-in-out;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ControlsContainer = styled.div`
|
const ControlsContainer = styled.div`
|
||||||
|
|||||||
@@ -32,11 +32,13 @@ const MetadataStack = styled(motion.div)`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const Image = styled(motion(Link))`
|
const Image = styled(motion(Link))`
|
||||||
${fadeIn};
|
|
||||||
width: 70px;
|
width: 70px;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
filter: drop-shadow(0 0 5px rgb(0, 0, 0, 100%));
|
filter: drop-shadow(0 0 5px rgb(0, 0, 0, 100%));
|
||||||
|
|
||||||
|
${fadeIn};
|
||||||
|
animation: fadein 0.2s ease-in-out;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -91,7 +93,7 @@ export const LeftControls = () => {
|
|||||||
transition={{ duration: 0.3, ease: 'easeInOut' }}
|
transition={{ duration: 0.3, ease: 'easeInOut' }}
|
||||||
>
|
>
|
||||||
{song?.imageUrl ? (
|
{song?.imageUrl ? (
|
||||||
<PlayerbarImage src={song?.imageUrl} />
|
<PlayerbarImage loading="eager" src={song?.imageUrl} />
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Center
|
<Center
|
||||||
|
|||||||
@@ -30,10 +30,12 @@ const SidebarContainer = styled.div`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const ImageContainer = styled(motion(Link))<{ height: string }>`
|
const ImageContainer = styled(motion(Link))<{ height: string }>`
|
||||||
${fadeIn};
|
|
||||||
position: relative;
|
position: relative;
|
||||||
height: ${(props) => props.height};
|
height: ${(props) => props.height};
|
||||||
|
|
||||||
|
${fadeIn};
|
||||||
|
animation: fadein 0.2s ease-in-out;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -188,7 +190,7 @@ export const Sidebar = () => {
|
|||||||
transition={{ duration: 0.3, ease: 'easeInOut' }}
|
transition={{ duration: 0.3, ease: 'easeInOut' }}
|
||||||
>
|
>
|
||||||
{imageUrl ? (
|
{imageUrl ? (
|
||||||
<SidebarImage src={imageUrl} />
|
<SidebarImage loading="eager" src={imageUrl} />
|
||||||
) : (
|
) : (
|
||||||
<Center
|
<Center
|
||||||
sx={{ background: 'var(--placeholder-bg)', height: '100%' }}
|
sx={{ background: 'var(--placeholder-bg)', height: '100%' }}
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ export const coverBackground = css`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const fadeIn = css`
|
export const fadeIn = css`
|
||||||
animation: fadein 0.3s;
|
|
||||||
|
|
||||||
@keyframes fadein {
|
@keyframes fadein {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -42,3 +40,15 @@ export const fadeIn = css`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
export const rotating = css`
|
||||||
|
@keyframes rotating {
|
||||||
|
from {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user