Skip to content

Commit

Permalink
Merge pull request #28 from HackAtUCI/setup/landing-fog
Browse files Browse the repository at this point in the history
feat: fog animation
  • Loading branch information
samderanova authored Nov 22, 2023
2 parents 344f352 + 05caf20 commit f978154
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 3 deletions.
37 changes: 37 additions & 0 deletions apps/site/src/app/(home)/sections/Landing/Landing.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
position: relative;
min-height: 100vh;
min-width: 100vw;
overflow-x: hidden;
}

.landingGroup {
Expand All @@ -15,3 +16,39 @@
transform: translate(-50%, -50%);
text-align: center;
}

.fogLeft,
.fogRight {
animation-delay: 0.5s;
animation-duration: 4s;
animation-fill-mode: forwards;
animation-timing-function: ease;
z-index: 1000;
}

.fogLeft {
animation-name: slideOutLeft;
}

.fogRight {
animation-name: slideOutRight;
}

@keyframes slideOutLeft {
from {
transform: none;
}

to {
transform: translate(-100%, 0);
}
}

@keyframes slideOutRight {
from {
transform: none;
}
to {
transform: translate(100%, 0);
}
}
13 changes: 10 additions & 3 deletions apps/site/src/app/(home)/sections/Landing/Landing.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
"use client";

import Button from "@/lib/components/Button/Button";
import styles from "./Landing.module.css";

import { Suspense } from "react";
import Image from "next/image";
import { PerspectiveCamera } from "@react-three/drei";

import { View } from "@/components/canvas/View";
import Button from "@/lib/components/Button/Button";
import Fireflies from "../../components/Fireflies";

import fogLeft from "@/assets/images/fog-left.png";
import fogRight from "@/assets/images/fog-right.png";

import styles from "./Landing.module.css";

const Landing = () => {
return (
<section className={styles.landingSection}>
Expand All @@ -17,6 +22,8 @@ const Landing = () => {
<PerspectiveCamera makeDefault position={[0.1, 0.1, 0.6]} />
</Suspense>
</View>
<Image src={fogLeft} alt="Fog" className={styles.fogLeft} fill />
<Image src={fogRight} alt="Fog" className={styles.fogRight} fill />
<div className={styles.landingGroup}>
<h1 className="font-display">IrvineHacks 2024</h1>
<p className="font-display">January 26&ndash;28</p>
Expand Down
Binary file added apps/site/src/assets/images/fog-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/site/src/assets/images/fog-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f978154

Please sign in to comment.