mirror of
https://github.com/liyunze-coding/RythonDev.git
synced 2026-09-22 15:53:57 +00:00
add in fade in animation
This commit is contained in:
parent
170a9b04b2
commit
80dbbc1d92
4 changed files with 69 additions and 58 deletions
|
|
@ -1,9 +1,10 @@
|
||||||
---
|
---
|
||||||
interface Props {
|
interface Props {
|
||||||
primaryColor: string;
|
primaryColor: string;
|
||||||
bgColor?: string | undefined;
|
bgColor?: string;
|
||||||
scaleOnHover?: boolean | undefined;
|
scaleOnHover?: boolean;
|
||||||
pixelHeight?: string | undefined;
|
pixelHeight?: string;
|
||||||
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
|
@ -11,10 +12,11 @@ const {
|
||||||
bgColor = "#282828",
|
bgColor = "#282828",
|
||||||
scaleOnHover = false,
|
scaleOnHover = false,
|
||||||
pixelHeight = "70px",
|
pixelHeight = "70px",
|
||||||
|
className = "",
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<div class="card z-10" class:list={[{ scale: scaleOnHover }]}>
|
<div class="card z-10" class:list={[{ scale: scaleOnHover }, className]}>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,11 @@ import Footer from "../components/sections/FooterComponent.astro";
|
||||||
<NavBar />
|
<NavBar />
|
||||||
<div id="home" class="pt-20 flex justify-center items-center">
|
<div id="home" class="pt-20 flex justify-center items-center">
|
||||||
<div class="w-[90%] xl:w-1/2 lg:w-1/2 max-w-[1080px]">
|
<div class="w-[90%] xl:w-1/2 lg:w-1/2 max-w-[1080px]">
|
||||||
<Card bgColor="#252525" primaryColor="#BEADFA">
|
<Card
|
||||||
|
bgColor="#252525"
|
||||||
|
primaryColor="#BEADFA"
|
||||||
|
className="animate-fadeIn"
|
||||||
|
>
|
||||||
<Intro client:load />
|
<Intro client:load />
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,14 @@ module.exports = {
|
||||||
"background-position": "0% 50%",
|
"background-position": "0% 50%",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
fadeIn: {
|
||||||
|
"0%": { opacity: 0 },
|
||||||
|
"100%": { opacity: 1 },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
animation: {
|
animation: {
|
||||||
gradient: "gradient 15s ease infinite",
|
gradient: "gradient 15s ease infinite",
|
||||||
|
fadeIn: "fadeIn 1s ease",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue