Skip to content

Perf: Improve page speed #6

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

Merged
merged 6 commits into from
Apr 15, 2025
Merged
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
5 changes: 1 addition & 4 deletions app/components/case-studies.tsx
Original file line number Diff line number Diff line change
@@ -21,10 +21,7 @@ export default function CaseStudies() {
columns={{ base: 1, md: 2, lg: 2 }}
classNameCard="rounded-xl"
/>
<GridItemsMoreButton
text="Schedule Consultation"
href="https://forms.office.com/Pages/ResponsePage.aspx?id=YB_vnVvdsku6UOy9eolc4lSE-1zhiHZGuckpAFLZgMNUNzFXVlZCQjA0UFJRR1IyUk9aSjBZVENENS4u"
/>
<GridItemsMoreButton text={data.cta.label} href={data.cta.link} />
</GridItemsContainer>
</>
);
5 changes: 2 additions & 3 deletions app/components/footer.tsx
Original file line number Diff line number Diff line change
@@ -9,9 +9,8 @@ export default function Footer() {
<Image
src="/images/swatch.svg"
alt="Footer background"
layout="fill"
objectFit="cover"
quality={100}
width={1440}
height={308}
className="pointer-events-none select-none"
/>
<div
3 changes: 1 addition & 2 deletions app/components/grid-items.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { Avatar, AvatarImage } from "@/components/ui/avatar";
import { Button } from "@/components/ui/button";
import {
Card,
@@ -171,7 +171,6 @@ export function GridItems({
{icon ? (
<Avatar className="mb-6 w-14 h-14">
<AvatarImage className="w-14 h-14" src={icon} alt={title} />
<AvatarFallback className="w-14 h-14">{title}</AvatarFallback>
</Avatar>
) : null}
{category && (
8 changes: 5 additions & 3 deletions app/components/hero.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import "@/app/galaxy.css";
import data from "@/data.json";
import { Button } from "@/components/ui/button";
import Image from "next/image";
import Link from "next/link";
import { PartnersList } from "./partner-list";

import "@/app/galaxy.css";

export default function Hero() {
return (
<section className="relative h-[648px] bg-hyperjump-black text-white">
@@ -32,10 +34,10 @@ export default function Hero() {
className="transition-all duration-200 ease-in-out transform hover:shadow-md hover:scale-[1.02] text-hyperjump-blue bg-white hover:bg-white/90"
>
<Link
href="https://forms.office.com/Pages/ResponsePage.aspx?id=YB_vnVvdsku6UOy9eolc4lSE-1zhiHZGuckpAFLZgMNUNzFXVlZCQjA0UFJRR1IyUk9aSjBZVENENS4u"
href={data.cta.link}
className="py-4 px-7 text-lg font-semibold"
>
Schedule Consultation
{data.cta.label}
</Link>
</Button>
</div>
92 changes: 40 additions & 52 deletions app/components/nav.tsx
Original file line number Diff line number Diff line change
@@ -22,10 +22,6 @@ import LogoWithContextMenu from "./logo-with-context-menu";
export default function Nav() {
const [isOpen, setIsOpen] = useState(false);

const scheduleButton = data.navLinks.find(
(item) => item.type === "button" && item.label === "Schedule Consultation"
);

return (
<StickyNavigationMain isMenuOpen={isOpen}>
{({ shouldBeWhite }) => (
@@ -38,41 +34,37 @@ export default function Nav() {
<CenterNavItems>
<NavigationMenu>
<NavigationMenuList className="flex gap-8">
{data.navLinks
.filter((item) => item.type !== "button")
.map((item, idx) => (
<NavigationMenuItem key={idx}>
<Link
href={item.href}
className={cn(
shouldBeWhite
? "text-hyperjump-black hover:text-hyperjump-blue"
: "text-white hover:border-b-2",
"font-medium text-xl transition-colors"
)}
>
{item.label}
</Link>
</NavigationMenuItem>
))}
{data.navLinks.map((item, idx) => (
<NavigationMenuItem key={idx}>
<Link
href={item.href}
className={cn(
shouldBeWhite
? "text-hyperjump-black hover:text-hyperjump-blue"
: "text-white hover:border-b-2",
"font-medium text-xl transition-colors"
)}
>
{item.label}
</Link>
</NavigationMenuItem>
))}
</NavigationMenuList>
</NavigationMenu>
</CenterNavItems>

<RightNavItems>
{scheduleButton && (
<Link
href={scheduleButton.href}
className={cn(
shouldBeWhite
? "bg-hyperjump-blue text-white hover:bg-blue-400"
: "border border-white text-white hover:bg-white hover:text-black",
"px-4 py-2 text-sm rounded transition-colors"
)}
>
{scheduleButton.label}
</Link>
)}
<Link
href={data.cta.link}
className={cn(
shouldBeWhite
? "bg-hyperjump-blue text-white hover:bg-blue-400"
: "border border-white text-white hover:bg-white hover:text-black",
"px-4 py-2 text-sm rounded transition-colors"
)}
>
{data.cta.label}
</Link>
</RightNavItems>

{/* Mobile Toggle */}
@@ -111,26 +103,22 @@ export default function Nav() {
{isOpen && (
<div className="lg:hidden bg-white shadow-md">
<div className="flex flex-col px-4 md:px-20 mx-auto py-6 space-y-4">
{data.navLinks
.filter((item) => item.type !== "button")
.map((item, idx) => (
<Link
key={idx}
href={item.href}
className="text-hyperjump-black text-2xl hover:text-gray-400"
onClick={() => setIsOpen(false)}
>
{item.label}
</Link>
))}
{scheduleButton && (
{data.navLinks.map((item, idx) => (
<Link
href={scheduleButton.href}
className="mt-2 border text-base border-hyperjump-black hover:text-gray-400 text-hyperjump-black py-3 text-center rounded hover:border-gray-400"
key={idx}
href={item.href}
className="text-hyperjump-black text-2xl hover:text-gray-400"
onClick={() => setIsOpen(false)}
>
{scheduleButton.label}
{item.label}
</Link>
)}
))}
<Link
href={data.cta.link}
className="mt-2 border text-base border-hyperjump-black hover:text-gray-400 text-hyperjump-black py-3 text-center rounded hover:border-gray-400"
>
{data.cta.label}
</Link>
</div>
</div>
)}
@@ -164,7 +152,7 @@ export function NavContainer({ children }: { children: ReactNode }) {
);
}

export function CenterNavItems({ children }: { children: React.ReactNode }) {
function CenterNavItems({ children }: { children: React.ReactNode }) {
return (
<div className="hidden lg:flex items-center justify-center space-x-8 flex-1">
{children}
2 changes: 1 addition & 1 deletion app/components/open-source-products.tsx
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ export default function OpenSourceProducts() {
<GridItemsMoreButton
text="View More"
variant="outline"
href="https://github.com/hyperjumptech"
href={data.github}
/>
</GridItemsContainer>
</>
5 changes: 1 addition & 4 deletions app/components/services.tsx
Original file line number Diff line number Diff line change
@@ -20,10 +20,7 @@ export default function Services() {
columns={{ base: 1, sm: 2, md: 3, lg: 4 }}
classNameCard="rounded-md"
/>
<GridItemsMoreButton
text="Schedule Consultation"
href="https://forms.office.com/Pages/ResponsePage.aspx?id=YB_vnVvdsku6UOy9eolc4lSE-1zhiHZGuckpAFLZgMNUNzFXVlZCQjA0UFJRR1IyUk9aSjBZVENENS4u"
/>
<GridItemsMoreButton text={data.cta.label} href={data.cta.link} />
</GridItemsContainer>
</>
);
1 change: 0 additions & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@ export const metadata: Metadata = {
apple: "/icons/apple-touch-icon.png",
shortcut: "/icons/icon-192x192.png",
},
themeColor: "#1C1F2E",
};

export default function RootLayout({
18 changes: 8 additions & 10 deletions data.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"cta": {
"link": "https://forms.office.com/Pages/ResponsePage.aspx?id=YB_vnVvdsku6UOy9eolc4lSE-1zhiHZGuckpAFLZgMNUNzFXVlZCQjA0UFJRR1IyUk9aSjBZVENENS4u",
"label": "Schedule Consultation"
},
"GTM_ID": "G-L825T5QT2S",
"SMDD_2024_SUBMIT_FORM_EMAIL": "[email protected]",
"title": "Hyperjump Technology",
@@ -19,16 +23,10 @@
"imageAlt": "D.Lab Location"
},
"navLinks": [
{ "label": "Services", "href": "#services", "type": "link" },
{ "label": "Case Studies", "href": "#case-studies", "type": "link" },
{ "label": "Open Source", "href": "#open-source", "type": "link" },
{ "label": "FAQ", "href": "#faqs", "type": "link" },
{
"label": "Schedule Consultation",
"href": "https://forms.office.com/Pages/ResponsePage.aspx?id=YB_vnVvdsku6UOy9eolc4lSE-1zhiHZGuckpAFLZgMNUNzFXVlZCQjA0UFJRR1IyUk9aSjBZVENENS4u",
"type": "button",
"style": "outline"
}
{ "label": "Services", "href": "#services" },
{ "label": "Case Studies", "href": "#case-studies" },
{ "label": "Open Source", "href": "#open-source" },
{ "label": "FAQ", "href": "#faqs" }
],
"partners": [
"/icons/partners/amman.svg",
Binary file modified public/images/banner.webp
Binary file not shown.