Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add characters to landing page. Fix intro section spacing #198

Merged
merged 20 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e645e40
Add characters. Fix intro section
noahk004 Oct 29, 2024
79cb004
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
e57e284
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
97debfb
Update apps/site/src/app/(home)/sections/Landing/Characters.tsx
noahk004 Oct 29, 2024
996b3a2
Update apps/site/src/app/(home)/sections/Landing/Characters.tsx
noahk004 Oct 29, 2024
36c9fdf
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
51a9305
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
a40dd52
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
e9accc8
Update apps/site/src/app/(home)/sections/Landing/Characters.tsx
noahk004 Oct 29, 2024
745942c
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
0c694ab
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
439f676
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
758e771
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
ec2aedc
Update apps/site/src/app/(home)/sections/Landing/Characters.module.scss
noahk004 Oct 29, 2024
dbdd1b7
Update apps/site/src/app/(home)/sections/Landing/Characters.tsx
noahk004 Oct 29, 2024
4c5f52a
Fix description spacing
noahk004 Oct 29, 2024
d11a237
Merge branch 'noah/add-characters-fix-intro' of https://github.com/Ha…
noahk004 Oct 29, 2024
205b186
Update alt text
noahk004 Oct 29, 2024
81cd98e
Prettier
noahk004 Oct 30, 2024
47f2d68
Add landing page animations
noahk004 Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 9 additions & 33 deletions apps/site/src/app/(home)/sections/Intro/Intro.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

.description {
text-align: center;
font-size: 0.85rem;
font-size: 0.75rem;

@media screen and (min-width: 415px) {
@include bootstrap.media-breakpoint-up(sm) {
font-size: 1rem;
}

@media screen and (min-width: 500px) {
font-size: 1.25rem;
}

@include bootstrap.media-breakpoint-up(xl) {
font-size: 1.5rem;
Expand All @@ -21,9 +18,6 @@
font-size: 1rem;
font-weight: 600;

@media screen and (min-width: 415px) {
font-size: 1.25rem;
}

@include bootstrap.media-breakpoint-up(sm) {
font-size: 1.5rem;
Expand All @@ -39,38 +33,20 @@
flex-direction: column;
justify-content: center;
width: 90vw;
margin-top: 3vw;
margin-top: 1vw;

@media screen and (min-width: 400px) {
margin-top: 7.5vw;
}

@include bootstrap.media-breakpoint-up(sm) {
margin-top: 15vw;
}
transform: translateY(calc(-50% + 40vw));

@media screen and (min-width: 650px) {
margin-top: 20vw;
@media (min-width: 400px) {
transform: translateY(calc(-50% + 40vw));
}

@include bootstrap.media-breakpoint-up(md) {
margin-top: 1vw;
transform: translateY(calc(-50% + 18vw));
}

@media screen and (min-width: 850px) {
margin-top: 3vw;
@media (min-width: 1200px) {
transform: translateY(calc(-50% + 22vw));
}

@include bootstrap.media-breakpoint-up(lg) {
max-width: 80vw;
margin-top: 8vw;
}

@include bootstrap.media-breakpoint-up(xl) {
margin-top: 12vw;
}

@include bootstrap.media-breakpoint-up(xxl) {
margin-top: 15vw;
}
}
71 changes: 71 additions & 0 deletions apps/site/src/app/(home)/sections/Landing/Characters.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@use "bootstrap-utils" as bootstrap;

.character {
position: absolute;
visibility: hidden;
right: 18vw;
top: 15.5vw;
transform: translateY(-70%);
width: 80px;
max-width: 7vw;

@include bootstrap.media-breakpoint-up(md) {
visibility: visible;
}
}

.characterFoam {
position: absolute;
visibility: hidden;
right: 18vw;
top: 16.4vw;
transform: translateY(-50%);
width: 80px;
max-width: 7vw;

@include bootstrap.media-breakpoint-up(md) {
visibility: visible;
}
}

.characterShadow {
position: absolute;
visibility: hidden;
right: 18vw;
top: 16.5vw;
transform: translateY(-20%);
width: 80px;
max-width: 7vw;

@include bootstrap.media-breakpoint-up(md) {
visibility: visible;
}
}

.mainCharacter {
position: absolute;
width: 300px;
visibility: hidden;
left: 10vw;
top: 32vw;
transform: translate(-50%, -50%);
max-width: 18vw;

@include bootstrap.media-breakpoint-up(md) {
visibility: visible;
}
}

.beachBall {
position: absolute;
width: 300px;
visibility: hidden;
right: 2vw;
top: 22vw;
transform: translate(calc(50% - 10vw), calc(-50% + 5vw));
max-width: 14vw;

@include bootstrap.media-breakpoint-up(md) {
visibility: visible;
}
}
71 changes: 71 additions & 0 deletions apps/site/src/app/(home)/sections/Landing/Characters.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import Image from "next/image";
import { motion } from "framer-motion";

import waterAnteater from "@/assets/images/intro-water-anteater.svg";
import waterAnteaterFoam from "@/assets/images/intro-character-foam.svg";
import waterAnteaterShadow from "@/assets/images/intro-water-anteater-shadow.svg";
import beachBall from "@/assets/images/intro-beach-ball.svg";

import mainCharacter from "@/assets/images/intro-main-anteater.svg";

import styles from "./Characters.module.scss";

export default function Characters() {
return (
<div>
<motion.div
initial={{ translateX: 100, opacity: 0 }}
animate={{ translateX: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.6 }}
>
<Image
src={waterAnteater}
alt="Anteater floating in the water"
className={styles.character}
/>
</motion.div>
<motion.div
initial={{ translateX: 100, opacity: 0 }}
animate={{ translateX: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.6 }}
>
<Image
src={waterAnteaterShadow}
alt="Reflection of anteater in the water"
className={styles.characterShadow}
/>
</motion.div>

<motion.div
initial={{ translateX: 100, opacity: 0 }}
animate={{ translateX: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.6 }}
>
<Image
src={waterAnteaterFoam}
alt="Foam between anteater and the water"
className={styles.characterFoam}
/>
</motion.div>

<motion.div
initial={{ translateY: -100, opacity: 0 }}
animate={{ translateY: 0, opacity: 1 }}
transition={{ duration: 0.5, delay: 1 }}
>
<Image
src={mainCharacter}
alt="Anteater standing on the shore"
className={styles.mainCharacter}
/>
</motion.div>
<motion.div
initial={{ scale: 0.85, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{ duration: 0.5, delay: 0.8 }}
>
<Image src={beachBall} alt="Beach ball" className={styles.beachBall} />
</motion.div>
</div>
);
}
2 changes: 2 additions & 0 deletions apps/site/src/app/(home)/sections/Landing/Landing.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
"use client";
import ApplyButton from "./ApplyButton";
import Title from "@/app/(home)/sections/Landing/Title";
import Characters from "./Characters";
import Intro from "../Intro";
import styles from "./Landing.module.scss";

const Landing = () => {
return (
<div className={styles.landing}>
<div className={styles.title}>
<Characters />
<Title />
<ApplyButton />
<Intro />
Expand Down
11 changes: 11 additions & 0 deletions apps/site/src/assets/images/intro-beach-ball.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/site/src/assets/images/intro-character-foam.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions apps/site/src/assets/images/intro-main-anteater.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading