File tree Expand file tree Collapse file tree 3 files changed +51
-0
lines changed
Expand file tree Collapse file tree 3 files changed +51
-0
lines changed Original file line number Diff line number Diff line change @@ -86,3 +86,45 @@ const locale = Astro.currentLocale as Lang;
8686 <ScrollUp />
8787 </body >
8888</html >
89+
90+ <script >
91+ import gsap from 'gsap';
92+ import { ScrollTrigger } from 'gsap/ScrollTrigger';
93+
94+ gsap.registerPlugin(ScrollTrigger);
95+
96+ function initScrollAnimations() {
97+ ScrollTrigger.getAll().forEach(trigger => trigger.kill());
98+
99+ gsap.utils.toArray('.section').forEach((section: any, index: number) => {
100+ gsap.from(section, {
101+ opacity: 0,
102+ y: 150,
103+ duration: 1,
104+ ease: 'power2.out',
105+ scrollTrigger: {
106+ trigger: section,
107+ start: 'top 75%',
108+ end: 'top 25%',
109+ toggleActions: 'play none none none',
110+ },
111+ });
112+ });
113+
114+ gsap.utils.toArray('.section__title').forEach((title: any) => {
115+ gsap.from(title, {
116+ opacity: 0,
117+ scale: 0.5,
118+ duration: 0.8,
119+ ease: 'back.out(1.7)',
120+ scrollTrigger: {
121+ trigger: title,
122+ start: 'top 80%',
123+ toggleActions: 'play none none none',
124+ },
125+ });
126+ });
127+ }
128+
129+ document.addEventListener('astro:page-load', initScrollAnimations);
130+ </script >
Original file line number Diff line number Diff line change @@ -141,6 +141,14 @@ const t = useTranslations(Astro.currentLocale as Lang);
141141 cursor: pointer;
142142 }
143143
144+ @media screen and (max-width: 567px) {
145+ #contact-button {
146+ display: flex;
147+ justify-content: center;
148+ width: 100%;
149+ }
150+ }
151+
144152 @keyframes float {
145153 0%,
146154 100% {
Original file line number Diff line number Diff line change 7474 font-size : var (--normal-font-size );
7575 background-color : var (--body-color );
7676 color : var (--text-color );
77+ overflow-x : hidden;
7778}
7879
7980h1 ,
You can’t perform that action at this time.
0 commit comments