Skip to content

Commit 4c42736

Browse files
authored
remove snow overlay and switch animation package to aos (#496)
* remove snow overlay and switch animation package to aos * comment out snow overlay
1 parent e3481fa commit 4c42736

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
type="image/svg+xml"
88
href="/src/images/acm-hack-logo.svg"
99
/>
10-
<link
11-
rel="stylesheet"
12-
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css"
13-
/>
10+
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />
1411
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1512
<title>UCLA ACM Hack</title>
1613
</head>
1714
<body>
1815
<div id="root"></div>
1916
<script type="module" src="/src/main.jsx"></script>
17+
<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
18+
<script>
19+
AOS.init();
20+
</script>
2021
</body>
2122
</html>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"react-markdown": "^9.0.1",
2828
"react-router-dom": "^6.26.2",
2929
"react-slick": "^0.30.2",
30-
"react-snow-overlay": "^1.0.7",
30+
"react-snow-overlay": "^1.0.12",
3131
"slick-carousel": "^1.8.1"
3232
},
3333
"devDependencies": {

src/App.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import Blog from './pages/Blog';
1010
import Archive from './pages/Archive';
1111
import NotFound from './pages/NotFound';
1212
import './styles/App.css';
13-
import { SnowOverlay } from 'react-snow-overlay';
13+
// import { SnowOverlay } from 'react-snow-overlay';
1414

1515
function App() {
1616
return (
1717
<div id='app'>
18-
<SnowOverlay color='rgba(242, 235, 235, 1)' />
18+
{/* <SnowOverlay color='rgba(242, 235, 235, 1)' /> */}
1919
<Navbar />
2020
<ScrollToTop />
2121
<Routes>

src/components/Home/HackDescription.jsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React from 'react';
22
import '../../styles/Home.css';
33
import logo from '../../images/acm-hack-logo.svg';
44
import pigeon from '../../images/pigeon.svg';
5-
import ScrollAnimation from 'react-animate-on-scroll';
65

76
const hackDescription = `We are a student-run organization whose mission is to
87
empower the community by providing the means to build amazing things and explore
@@ -19,19 +18,17 @@ export default function HackDescription() {
1918
<div>
2019
<div className='hack-description-container'>
2120
<img src={logo} className='home-hack-logo' alt='Hack Logo' />
22-
<ScrollAnimation animateIn='fadeIn'>
23-
<div className='hack-description'>
24-
<h1 className='hack-title'>What is Hack?</h1>
25-
<p>{hackDescription}</p>
26-
</div>
27-
</ScrollAnimation>
21+
<div className='hack-description' data-aos='light-fade-up'>
22+
<h1 className='hack-title'>What is Hack?</h1>
23+
<p>{hackDescription}</p>
24+
</div>
2825
</div>
2926
<div className='hack-connected-container'>
3027
<img src={pigeon} className='home-graphic' alt='Hack Logo' />
31-
<ScrollAnimation animateIn='fadeIn'>
28+
<div data-aos='light-fade-up'>
3229
<h2 className='hack-subtitle'>Stay Connected</h2>
3330
<p>{connectedDescription}</p>
34-
</ScrollAnimation>
31+
</div>
3532
</div>
3633
</div>
3734
);

src/styles/App.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,13 @@ body {
4949
align-items: center;
5050
justify-content: center;
5151
}
52+
53+
[data-aos='light-fade-up'] {
54+
transform: translateY(36px);
55+
opacity: 0;
56+
transition-property: transform, opacity;
57+
&.aos-animate {
58+
transform: translateY(0);
59+
opacity: 1;
60+
}
61+
}

0 commit comments

Comments
 (0)