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

[Not done] Optimizing the performance of Surge Website #84

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const nextConfig = {images: {
hostname: "images.ctfassets.net",
},
],
formats: ['image/avif', 'image/webp'],
},};

export default nextConfig;
Binary file removed public/Discord image.png
Binary file not shown.
Binary file added public/Discord-image.webp
Binary file not shown.
Binary file removed public/about us.png
Binary file not shown.
Binary file added public/aboutus.webp
Binary file not shown.
Binary file removed public/assets/landing-2.png
Binary file not shown.
Binary file added public/assets/landing-2.webp
Binary file not shown.
Binary file removed public/assets/landing.png
Binary file not shown.
Binary file added public/assets/landing.webp
Binary file not shown.
Binary file removed public/assets/rub.png
Binary file not shown.
Binary file added public/assets/rub.webp
Binary file not shown.
Binary file removed public/assets/rub2.png
Binary file not shown.
Binary file added public/assets/rub2.webp
Binary file not shown.
Binary file removed public/assets/ship.png
Binary file not shown.
Binary file added public/assets/ship.webp
Binary file not shown.
Binary file removed public/events.png
Binary file not shown.
Binary file added public/events.webp
Binary file not shown.
Binary file removed public/join/experience.png
Binary file not shown.
Binary file added public/join/experience.webp
Binary file not shown.
Binary file removed public/join/friends.png
Binary file not shown.
Binary file added public/join/friends.webp
Binary file not shown.
Binary file removed public/join/rocket.png
Binary file not shown.
Binary file added public/join/rocket.webp
Binary file not shown.
Binary file removed public/join/skills.png
Binary file not shown.
Binary file added public/join/skills.webp
Binary file not shown.
Binary file removed public/journeyhacks.png
Binary file not shown.
Binary file added public/journeyhacks.webp
Binary file not shown.
Binary file removed public/meetneat.png
Binary file not shown.
Binary file added public/meetneat.webp
Binary file not shown.
Binary file removed public/rocket-no-elements.png
Binary file not shown.
Binary file added public/rocket-no-elements.webp
Binary file not shown.
Binary file added public/stars.webp
Binary file not shown.
Binary file removed public/stormhacks.png
Binary file not shown.
Binary file added public/stormhacks.webp
Binary file not shown.
Binary file removed public/workshop.png
Binary file not shown.
Binary file added public/workshop.webp
Binary file not shown.
Binary file removed public/workshops.png
Binary file not shown.
Binary file added public/workshops.webp
Binary file not shown.
2 changes: 2 additions & 0 deletions src/app/join/OpenRolesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ export default function OpenRolesSection({ jobs }: OpenRolesSectionProps) {
jobMap.set(job.team, (jobMap.get(job.team) || 0) + 1);
});

/*
const totalJobCount = Array.from(jobMap.values()).reduce(
(total, count) => total + count,
0
);
*/

useEffect(() => {
const selectedJobTeam = localStorage.getItem("selectedJobTeam") || "All";
Expand Down
8 changes: 4 additions & 4 deletions src/app/join/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import Card from "@/components/Card";
import OpenRolesSection from "./OpenRolesSection";
import ButtonScroll from "@/components/ButtonScroll";
import InfoItem from "@/components/InfoItem";
import skills from "/public/join/skills.png";
import experience from "/public/join/experience.png";
import friends from "/public/join/friends.png";
import rocket from "/public/join/rocket.png";
import skills from "/public/join/skills.webp";
import experience from "/public/join/experience.webp";
import friends from "/public/join/friends.webp";
import rocket from "/public/join/rocket.webp";

import text_content from "@/lib/content/text_content.json";
import { getJobListingsCollection } from "@/lib/content/contentfulQueries";
Expand Down
2 changes: 1 addition & 1 deletion src/app/sections/UnderConstruction.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from "next/image";
import StormHacksImage from "/public/stormhacks.png";
import StormHacksImage from "/public/stormhacks.webp";
import Link from "next/link";

import text_content from "@/lib/content/text_content.json";
Expand Down
4 changes: 2 additions & 2 deletions src/app/sections/events/EventsHero/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ButtonScroll from "@/components/ButtonScroll";
import Image from "next/image";
import workshop from "/public/workshop.png"
import workshop from "/public/workshop.webp"
import { Work_Sans } from "next/font/google";

export default function EventsHero() {
Expand Down Expand Up @@ -31,7 +31,7 @@ export default function EventsHero() {
// <section className="flex md:flex-row w-full gap-16 lg:gap-12 flex-col-reverse items-center justify-center ">
// <div className="flex md:justify-center h-full md:w-[40%] ">
// <Image
// src={"/events.png"}
// src={"/events.avif"}
// width={1659}
// height={1421}
// alt={"hello"}
Expand Down
8 changes: 5 additions & 3 deletions src/app/sections/home/Events/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import StormHacksImage from "/public/stormhacks.png";
import JourneyHacksImage from "/public/journeyhacks.png";
import WorkshopsImage from "/public/workshops.png";
import StormHacksImage from "/public/stormhacks.webp";
import JourneyHacksImage from "/public/journeyhacks.webp";
import WorkshopsImage from "/public/workshops.webp";
import Image from "next/image";
import HomeCard from "@/components/HomeCard";

Expand Down Expand Up @@ -52,6 +52,7 @@ const EventSection = () => {
);
};

/*
const SurgeEvent = ({ heading, subheading, image, description }) => {
return (
<>
Expand All @@ -74,6 +75,7 @@ const SurgeEvent = ({ heading, subheading, image, description }) => {
</>
);
};
*/

const InfoSection = () => {
return (
Expand Down
200 changes: 101 additions & 99 deletions src/app/sections/home/Landing/index.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";

import Background from "/public/assets/landing.png";
import BodyImage from "/public/about us.png";
import Rocket from "/public/rocket-no-elements.png";
import Background from "/public/assets/landing.webp";
import BodyImage from "/public/aboutus.webp";
import Rocket from "/public/rocket-no-elements.webp";
import Image from "next/image";

import text_content from "@/lib/content/text_content.json";
Expand All @@ -22,166 +22,161 @@ function Landing() {
</div>

<div className="relative w-full">
{/* <Image
<Image
src={Rocket}
alt="Background Image"
alt="Rocket without elements"
layout="responsive"
width={2498}
height={1255}
objectFit="contain"
className=" h-full w-full lg:w-[50%] mx-auto "
quality={100}
className="w-full"
/> */}
<img
src="rocket-no-elements.png"
className="w-full max-w-[90rem]"
></img>
quality={100}
/>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="green star 1.png"
<Image
src="/green star 1.png"
alt="Green Star"
width={52}
height={52}
className="w-[5.2785%] h-auto relative left-[1.672%] top-[4.28%] animate-bounce"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="purple star 1.png"
<Image
src="/purple star 1.png"
alt="Purple Star"
width={65}
height={65}
className="w-[6.403%] h-auto relative left-[16.67%] top-[7.521%] animate-spin"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="yellow star 1.png"
<Image
src="/yellow star 1.png"
alt="Yellow Star"
width={66}
height={66}
className="w-[6.635%] h-auto relative top-[16.69%] animate-pulse"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="small purple star 1.png"
<Image
src="/small purple star 1.png"
alt="Small Purple Star"
width={39}
height={39}
className="w-[3.9105%] h-auto relative left-[4.424%] top-[29.5%]"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="stars.png"
<Image
src="/stars.png"
alt="Stars"
width={544}
height={544}
className="w-[54.47%] h-auto relative left-[17.3565%] top-[25.797%]"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="large pink star 1.png"
<Image
src="/large pink star 1.png"
alt="Large Pink Star"
width={59}
height={59}
className="w-[5.933%] h-auto relative left-[85.683%] top-[42.37%] animate-bounce"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="large pink star 2.png"
<Image
src="/large pink star 2.png"
alt="Large Pink Star 2"
width={42}
height={42}
className="w-[4.279%] h-auto relative left-[83.2225%] top-[78.778%] animate-spin"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="large purple star.png"
<Image
src="/large purple star.png"
alt="Large Purple Star"
width={63}
height={63}
className="w-[6.269%] h-auto relative left-[80.508%] top-[54.25477%] animate-pulse"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="small green star.png"
<Image
src="/small green star.png"
alt="Small Green Star"
width={33}
height={33}
className="w-[3.2925%] h-auto relative left-[89.5885%] top-[64.897%] animate-pulse"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="glasses.png"
<Image
src="/glasses.png"
alt="Glasses"
width={72}
height={72}
className="w-[7.291%] h-auto relative left-[37.18%] top-[8.71%]"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="big-bubble.png"
<Image
src="/big-bubble.png"
alt="Big Bubble"
width={64}
height={64}
className="w-[6.4065%] h-auto relative left-[25%] top-[68.83%] animate-ping"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="small-bubble.png"
<Image
src="/small-bubble.png"
alt="Small Bubble"
width={14}
height={14}
className="w-[1.368%] h-auto relative left-[24.09%] top-[81.85%] animate-ping"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="bubble.png"
<Image
src="/bubble.png"
alt="Bubble"
width={28}
height={28}
className="w-[2.8285%] h-auto relative left-[30.489%] top-[80.01%] animate-ping"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
<img
src="light-bubble.png"
<Image
src="/light-bubble.png"
alt="Light Bubble"
width={24}
height={24}
className="w-[2.434%] h-auto relative left-[32.112%] top-[75.84%] animate-ping"
></img>
</div>

{/* <div className="absolute top-0 left-0 w-full h-full">
{" "}
<img
src="s key cap.png"
className="w-[6.51%] h-auto relative left-[6.96%] top-[10.46%] animate-"
></img>
</div> */}

{/* <div className="absolute top-0 left-0 w-full h-full">
{" "}
<img
src="u key cap.png"
className="w-[5.99%] h-auto relative left-[17.91%] top-[10.95%]"
></img>
</div>

<div className="absolute top-0 left-0 w-full h-full">
{" "}
<img
src="r key cap.png"
className="w-[6.42%] h-auto relative left-[62.35%] top-[75.54%]"
></img>
/>
</div>

<div className="absolute top-0 left-0 w-full h-full">
{" "}
<img
src="g key cap.png"
className="w-[5.78%] h-auto relative left-[75.28%] top-[80.63%]"
></img>
</div>

<div className="absolute top-0 left-0 w-full h-full">
{" "}
<img
src="e key cap.png"
className="w-[5.687%] h-auto relative left-[88.84%] top-[73.8%]"
></img>
</div> */}
</div>
</div>

<div className="flex flex-col-reverse lg:flex-row pb-5 mt-16 md:mt-20 justify-between px-5 md:px-10 md:py-8 rounded-custom-radius items-center gap-8 lg:gap-8 bg-surface">
<div className="lg:m-4">
<h2 className="text-caption">
{text_content.homepage.about.callout}
</h2>
<h2 className="text-caption">{text_content.homepage.about.callout}</h2>
<h1 className="title-2 emphasized mb-4 mt-3">
{text_content.homepage.about.heading}
</h1>
Expand All @@ -190,7 +185,14 @@ function Landing() {
{text_content.homepage.about.cta}
</button>
</div>
<img src="about us.png" className="w-full md:w-3/4 lg:w-1/2" />

<Image
src={BodyImage}
alt="About us"
width={500}
height={500}
className="w-full md:w-3/4 lg:w-1/2"
/>
</div>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/JoinDiscord.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from "next/image";
import text_content from "@/lib/content/text_content.json";
import InvolvementImage from "/public/Discord image.png";
import InvolvementImage from "/public/Discord-image.webp";

export default function JoinDiscord() {
return (
Expand Down
2 changes: 0 additions & 2 deletions src/components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import Link from "next/link";
import { useState, useEffect, useRef } from "react";
import { usePathname } from "next/navigation";
import path from "path";


export default function NavBar() {
const [isOpen, setIsOpen] = useState<boolean>(false);
Expand Down
Loading