diff --git a/app/JoinUs/JobCard.tsx b/app/JoinUs/JobCard.tsx index f4a0054..eb6144a 100644 --- a/app/JoinUs/JobCard.tsx +++ b/app/JoinUs/JobCard.tsx @@ -17,7 +17,7 @@ export default function JobCard({ id, title, location, skills }: JobCardProps) { {skills.map((skill, index) => ( {skill} diff --git a/app/JoinUs/[jobId]/jobContent.tsx b/app/JoinUs/[jobId]/jobContent.tsx index e11c2fe..bdb3e41 100644 --- a/app/JoinUs/[jobId]/jobContent.tsx +++ b/app/JoinUs/[jobId]/jobContent.tsx @@ -45,7 +45,7 @@ export default function JobContent({ jobId }) { {job.skills.map((skill, index) => ( {skill} @@ -53,7 +53,7 @@ export default function JobContent({ jobId }) { @@ -111,7 +111,7 @@ export default function JobContent({ jobId }) { workwithalgofficial@gmail.com {" "} diff --git a/app/about/aboutus.tsx b/app/about/aboutus.tsx index c1bfff3..4e23722 100644 --- a/app/about/aboutus.tsx +++ b/app/about/aboutus.tsx @@ -75,7 +75,7 @@ const AboutPage = () => {
Arka Linux GUI Logo {
{member.name}
Arka Linux GUI Logo = ({ const toggleDropdown = () => setDropdownVisible(!dropdownVisible); - const isoLinks = isThemed ? themedIso[name] : pureIso[name]; + const isoLinks = !isThemed ? themedIso[name] : pureIso[name]; const contentSection = (
@@ -108,6 +108,7 @@ const DesktopEnvironment: React.FC = ({ alt={title} width={500} height={300} + priority={true} className="mx-auto rounded-lg" />
@@ -116,7 +117,7 @@ const DesktopEnvironment: React.FC = ({ @@ -163,6 +164,7 @@ const DesktopEnvironment: React.FC = ({ alt={title} width={900} height={800} + priority={true} className="mx-auto rounded-lg" />
@@ -188,30 +190,33 @@ const DesktopEnvironment: React.FC = ({ export default function Flavours() { return (
- - - + {/* Don't know why now its working correctly but when pureImage & themedImage places are changed it works inversely, need to fix! */} +
+ + + +
); } diff --git a/app/globals.css b/app/globals.css index 87ff428..4b40eb0 100644 --- a/app/globals.css +++ b/app/globals.css @@ -15,56 +15,106 @@ body { @layer base { :root { --background: 0 0% 100%; - --foreground: 240 10% 3.9%; + --foreground: 0 0% 14.902%; --card: 0 0% 100%; - --card-foreground: 240 10% 3.9%; + --card-foreground: 0 0% 14.902%; --popover: 0 0% 100%; - --popover-foreground: 240 10% 3.9%; - --primary: 240 5.9% 10%; - --primary-foreground: 0 0% 98%; - --secondary: 240 4.8% 95.9%; - --secondary-foreground: 240 5.9% 10%; - --muted: 240 4.8% 95.9%; - --muted-foreground: 240 3.8% 46.1%; - --accent: 240 4.8% 95.9%; - --accent-foreground: 240 5.9% 10%; - --destructive: 0 84.2% 60.2%; - --destructive-foreground: 0 0% 98%; - --border: 240 5.9% 90%; - --input: 240 5.9% 90%; - --ring: 240 10% 3.9%; - --chart-1: 12 76% 61%; - --chart-2: 173 58% 39%; - --chart-3: 197 37% 24%; - --chart-4: 43 74% 66%; - --chart-5: 27 87% 67%; - --radius: 0.5rem; + --popover-foreground: 0 0% 14.902%; + --primary: 37.6923 92.126% 50.1961%; + --primary-foreground: 0 0% 0%; + --secondary: 220 14.2857% 95.8824%; + --secondary-foreground: 215 13.7931% 34.1176%; + --muted: 210 20% 98.0392%; + --muted-foreground: 220 8.9362% 46.0784%; + --accent: 48 100% 96.0784%; + --accent-foreground: 22.7273 82.5% 31.3725%; + --destructive: 0 84.2365% 60.1961%; + --destructive-foreground: 0 0% 100%; + --border: 220 13.0435% 90.9804%; + --input: 220 13.0435% 90.9804%; + --ring: 37.6923 92.126% 50.1961%; + --chart-1: 37.6923 92.126% 50.1961%; + --chart-2: 32.1327 94.6188% 43.7255%; + --chart-3: 25.9649 90.4762% 37.0588%; + --chart-4: 22.7273 82.5% 31.3725%; + --chart-5: 21.7143 77.7778% 26.4706%; + --sidebar: 210 20% 98.0392%; + --sidebar-foreground: 0 0% 14.902%; + --sidebar-primary: 37.6923 92.126% 50.1961%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 48 100% 96.0784%; + --sidebar-accent-foreground: 22.7273 82.5% 31.3725%; + --sidebar-border: 220 13.0435% 90.9804%; + --sidebar-ring: 37.6923 92.126% 50.1961%; + --font-sans: Inter, sans-serif; + --font-serif: Source Serif 4, serif; + --font-mono: JetBrains Mono, monospace; + --radius: 0.7rem; + --shadow-2xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05); + --shadow-xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05); + --shadow-sm: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 1px 2px -2px hsl(0 0% 0% / 0.1); + --shadow: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 1px 2px -2px hsl(0 0% 0% / 0.1); + --shadow-md: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 2px 4px -2px hsl(0 0% 0% / 0.1); + --shadow-lg: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 4px 6px -2px hsl(0 0% 0% / 0.1); + --shadow-xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 8px 10px -2px hsl(0 0% 0% / 0.1); + --shadow-2xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.25); } + .dark { - --background: 240 10% 3.9%; - --foreground: 0 0% 98%; - --card: 240 10% 3.9%; - --card-foreground: 0 0% 98%; - --popover: 240 10% 3.9%; - --popover-foreground: 0 0% 98%; - --primary: 0 0% 98%; - --primary-foreground: 240 5.9% 10%; - --secondary: 240 3.7% 15.9%; - --secondary-foreground: 0 0% 98%; - --muted: 240 3.7% 15.9%; - --muted-foreground: 240 5% 64.9%; - --accent: 240 3.7% 15.9%; - --accent-foreground: 0 0% 98%; - --destructive: 0 62.8% 30.6%; - --destructive-foreground: 0 0% 98%; - --border: 240 3.7% 15.9%; - --input: 240 3.7% 15.9%; - --ring: 240 4.9% 83.9%; - --chart-1: 220 70% 50%; - --chart-2: 160 60% 45%; - --chart-3: 30 80% 55%; - --chart-4: 280 65% 60%; - --chart-5: 340 75% 55%; + --background: 0 0% 9.0196%; + --foreground: 0 0% 89.8039%; + --card: 0 0% 14.902%; + --card-foreground: 0 0% 89.8039%; + --popover: 0 0% 14.902%; + --popover-foreground: 0 0% 89.8039%; + --primary: 37.6923 92.126% 50.1961%; + --primary-foreground: 0 0% 0%; + --secondary: 0 0% 14.902%; + --secondary-foreground: 0 0% 89.8039%; + --muted: 0 0% 14.902%; + --muted-foreground: 0 0% 63.9216%; + --accent: 22.7273 82.5% 31.3725%; + --accent-foreground: 48 96.6387% 76.6667%; + --destructive: 0 84.2365% 60.1961%; + --destructive-foreground: 0 0% 100%; + --border: 0 0% 25.098%; + --input: 0 0% 25.098%; + --ring: 37.6923 92.126% 50.1961%; + --chart-1: 43.2558 96.4126% 56.2745%; + --chart-2: 32.1327 94.6188% 43.7255%; + --chart-3: 22.7273 82.5% 31.3725%; + --chart-4: 25.9649 90.4762% 37.0588%; + --chart-5: 22.7273 82.5% 31.3725%; + --sidebar: 0 0% 5.8824%; + --sidebar-foreground: 0 0% 89.8039%; + --sidebar-primary: 37.6923 92.126% 50.1961%; + --sidebar-primary-foreground: 0 0% 100%; + --sidebar-accent: 22.7273 82.5% 31.3725%; + --sidebar-accent-foreground: 48 96.6387% 76.6667%; + --sidebar-border: 0 0% 25.098%; + --sidebar-ring: 37.6923 92.126% 50.1961%; + --font-sans: Inter, sans-serif; + --font-serif: Source Serif 4, serif; + --font-mono: JetBrains Mono, monospace; + --radius: 0.7rem; + --shadow-2xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05); + --shadow-xs: 0px 4px 8px -1px hsl(0 0% 0% / 0.05); + --shadow-sm: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 1px 2px -2px hsl(0 0% 0% / 0.1); + --shadow: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 1px 2px -2px hsl(0 0% 0% / 0.1); + --shadow-md: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 2px 4px -2px hsl(0 0% 0% / 0.1); + --shadow-lg: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 4px 6px -2px hsl(0 0% 0% / 0.1); + --shadow-xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), + 0px 8px 10px -2px hsl(0 0% 0% / 0.1); + --shadow-2xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.25); } } @@ -132,7 +182,7 @@ body { .loader { border: 8px solid #f3f3f3; - border-top: 5px solid #6a45d1; + border-top: 5px solid #d09031; border-radius: 50%; width: 50px; height: 50px; diff --git a/app/layout.tsx b/app/layout.tsx index 258e58e..ca1675b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,10 +2,7 @@ import DonationBubble from "@/components/donationBubble"; import { ScrollProvider } from "@/context/scrollContext"; import Loader from "@/lib/loader"; -import "@/public/alg-logo.png"; import { TooltipProvider } from "@radix-ui/react-tooltip"; -import gsap from "gsap"; -import { ScrollTrigger } from "gsap/all"; import { ThemeProvider } from "next-themes"; import { ViewTransitions } from "next-view-transitions"; import { Poppins } from "next/font/google"; @@ -17,10 +14,9 @@ const poppins = Poppins({ weight: ["400", "500", "600"], display: "swap", adjustFontFallback: false, + preload: true, }); -gsap.registerPlugin(ScrollTrigger); - interface RootLayoutProps { children: ReactNode; } @@ -35,9 +31,44 @@ export default function RootLayout({ children }: RootLayoutProps) { window.addEventListener("beforeunload", handleStart); window.addEventListener("load", handleComplete); + // Preload critical resources + const preloadCriticalResources = () => { + // Preload critical images + const criticalImages = [ + "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/ss-with-apps/theme/plasma/terminal.png", + ]; + + criticalImages.forEach((src) => { + const link = document.createElement("link"); + link.rel = "preload"; + link.as = "image"; + link.href = src; + document.head.appendChild(link); + }); + }; + + // Prefetch non-critical resources + const prefetchNonCriticalResources = () => { + const nonCriticalResources = ["/downloads", "/about", "/tutorials"]; + + nonCriticalResources.forEach((href) => { + const link = document.createElement("link"); + link.rel = "prefetch"; + link.href = href; + document.head.appendChild(link); + }); + }; + + // Execute optimizations after a delay to not block initial render + const timer = setTimeout(() => { + preloadCriticalResources(); + prefetchNonCriticalResources(); + }, 1000); + return () => { window.removeEventListener("beforeunload", handleStart); window.removeEventListener("load", handleComplete); + clearTimeout(timer); }; }, []); @@ -62,7 +93,24 @@ export default function RootLayout({ children }: RootLayoutProps) { + + {/* Performance optimizations */} + + + + + {/* Preconnect to external domains */} + + + + + {/* Preload critical fonts */} + diff --git a/app/tutorials/TutorialPage.tsx b/app/tutorials/TutorialPage.tsx index 57ce28c..84fed90 100644 --- a/app/tutorials/TutorialPage.tsx +++ b/app/tutorials/TutorialPage.tsx @@ -1,5 +1,5 @@ "use client"; -import HandleYT from "@/lib/HandleYT"; +import { LazyVideo } from "@/components/ui/lazy-video"; import Loader from "@/lib/loader"; import { Suspense } from "react"; const install = [ @@ -123,7 +123,7 @@ const TutorialPage = () => {
}> - +
@@ -152,11 +152,12 @@ const TutorialPage = () => {
}> - +
))} +

Arch Linux Specific videos

@@ -179,11 +180,12 @@ const TutorialPage = () => {
}> - +
))} +

Miscellaneous Topics

@@ -207,7 +209,7 @@ const TutorialPage = () => {
}> - +
diff --git a/components/Hero.tsx b/components/Hero.tsx index a44f949..7f71aca 100644 --- a/components/Hero.tsx +++ b/components/Hero.tsx @@ -3,24 +3,14 @@ import { TextEffect } from "@/components/ui/text-effect"; import { useScroll } from "@/context/scrollContext"; import { AnimatePresence, motion } from "framer-motion"; -import gsap from "gsap"; -import { ScrollTrigger } from "gsap/ScrollTrigger"; import { useTheme } from "next-themes"; +import Image from "next/image"; import Link from "next/link"; -import { useEffect, useRef, useState } from "react"; - -gsap.registerPlugin(ScrollTrigger); - -const assetsToPreload = ["/arch-linux-gui.png"]; +import { useRef } from "react"; export default function HeroSection() { const { resolvedTheme } = useTheme(); const sectionRef = useRef(null); - const headingRef = useRef(null); - const descriptionRef = useRef(null); - const buttonsRef = useRef(null); - const imageRef = useRef(null); - const [assetsLoaded, setAssetsLoaded] = useState(false); const { whatsNewRef } = useScroll(); const handleKnowMoreClick = () => { @@ -28,109 +18,28 @@ export default function HeroSection() { whatsNewRef.current.scrollIntoView({ behavior: "smooth" }); } }; - useEffect(() => { - const preloadAsset = (src: any) => { - return new Promise((resolve, reject) => { - const img = new Image(); - img.src = src; - img.onload = resolve; - img.onerror = reject; - }); - }; - - const preloadAllAssets = async () => { - try { - await Promise.all(assetsToPreload.map(preloadAsset)); - setAssetsLoaded(true); - } catch (error) { - console.error("Failed to load all assets:", error); - // Optionally set assetsLoaded to true even if some assets fail to load - setAssetsLoaded(true); - } - }; - - preloadAllAssets(); - }, []); - - useEffect(() => { - if (assetsLoaded) { - const ctx = gsap.context(() => { - gsap.from(headingRef.current, { - opacity: 0, - y: 50, - duration: 1, - delay: 0.2, - }); - - gsap.from(descriptionRef.current, { - opacity: 0, - y: 30, - duration: 1, - delay: 0.5, - }); - - gsap.from(buttonsRef.current, { - opacity: 0, - y: 20, - duration: 1, - delay: 0.8, - }); - - gsap.from(imageRef.current, { - opacity: 0, - scale: 0.8, - duration: 1, - delay: 1, - }); - }, sectionRef); - - return () => ctx.revert(); - } - }, [assetsLoaded]); const isDarkTheme = resolvedTheme === "dark"; - const getRandomOrangeColor = () => { - const orangeShades = [ - "#F97316", // orange-500 - "#EA580C", // orange-600 - "#C2410C", // orange-700 - "#FB923C", // dark:orange-400 - "#FDBA74", // dark:orange-300 - ]; - - const randomIndex = Math.floor(Math.random() * orangeShades.length); - return orangeShades[randomIndex]; - }; - const fancyVariants = { container: { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { - staggerChildren: 0.05, + staggerChildren: 0.1, + duration: 0.5, }, }, }, item: { - hidden: () => ({ - opacity: 0, - y: Math.random() * 100 - 50, - rotate: Math.random() * 90 - 45, - scale: 0.3, - color: getRandomOrangeColor(), - }), + hidden: { opacity: 0, y: 20 }, visible: { opacity: 1, y: 0, - rotate: 0, - scale: 1, - color: getRandomOrangeColor(), transition: { - type: "spring", - damping: 12, - stiffness: 200, + duration: 0.5, + ease: "easeOut", }, }, }, @@ -138,93 +47,98 @@ export default function HeroSection() { return ( - {assetsLoaded ? ( - -
- - - -
+ +
+ + + +
-
-
-
-
- - Welcome to Arka Linux GUI - -
-
- - Seamless. Intuitive. Powerful. Discover a new era of Linux - desktop environments with Arka Linux GUI. - -
-
+ + + + Welcome to Arka Linux GUI + + + + Seamless. Intuitive. Powerful. Discover a new era of Linux + desktop environments with Arka Linux GUI. + + + + - -
-
- -
-
-
-
- Arka Linux GUI Desktop -
+ Know More + + + + + + +
+
+
+ Arka Linux GUI Desktop
-
-
- - ) : ( -
-
- Loading... -
+ +
- )} + ); } diff --git a/components/Navbar.tsx b/components/Navbar.tsx index 8728efe..254c23b 100644 --- a/components/Navbar.tsx +++ b/components/Navbar.tsx @@ -100,7 +100,7 @@ export default function CenteredDockToStickyNavbar() { className="text-xl font-bold pr-5 text-gray-900 dark:text-white" > ALG Logo
}> - +
@@ -80,13 +84,15 @@ export default function VideoCarousel() {
-
- - {videoGroups.map((_, index) => ( - - ))} - -
+ + {videoGroups.map((_, index) => ( + + ))} +
diff --git a/components/WhatsNew.tsx b/components/WhatsNew.tsx index f2b020d..a5be092 100644 --- a/components/WhatsNew.tsx +++ b/components/WhatsNew.tsx @@ -14,40 +14,40 @@ export default function WhatIsALGSection() { description: "Install your system entirely without an internet connection.", link: "#", - image: "/gnome.jpg", + image: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/ss-with-apps/theme/plasma/installer.png?raw=true", }, { title: "Minimalist & Clean System", description: "Experience a bare-minimum, efficient Linux environment.", link: "#", - image: "/gnome.jpg", + image: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/pure/plasma-pure.png?raw=true", }, { title: "Custom Themed Environments", description: "Enjoy a beautifully themed interface without unnecessary extras.", link: "#", - image: "/gnome.jpg", + image: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/themed/xfce-themed.png?raw=true", }, { title: "Intuitive Welcome Application", description: "Get started quickly with our user-friendly welcome app.", link: "#", - image: "/welcome.png", + image: "https://github.com/arch-linux-gui/artwork/blob/dev/other/welcome.png?raw=true", }, { title: "GUI-Based Package Manager (Beta)", description: "Manage your software effortlessly with our beta GUI package manager.", link: "#", - image: "/gnome.jpg", + image: "https://github.com/arch-linux-gui/artwork/blob/dev/other/app-store.png?raw=true", }, { title: "Community-Driven Development", description: "Built and continuously improved by our passionate community.", link: "#", - image: "/gnome.jpg", + image: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/themed/gnome.png?raw=true", }, ]; diff --git a/components/gallery.tsx b/components/gallery.tsx index 28881c8..eacc5ca 100644 --- a/components/gallery.tsx +++ b/components/gallery.tsx @@ -2,12 +2,24 @@ import { DialogBasicImage } from "./ui/imageviewer"; import Marquee from "./ui/marquee"; const images = [ - { img: "/gnome-pure.png" }, - { img: "/gnome.jpg" }, - { img: "/xfce.png" }, - { img: "/xfce-pure.png" }, - { img: "/plasma.png" }, - { img: "/plasma-pure.png" }, + { + img: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/pure/gnome.png?raw=true", + }, + { + img: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/themed/gnome.png?raw=true", + }, + { + img: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/themed/xfce-themed.png?raw=true", + }, + { + img: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/pure/xfce-pure.png?raw=true", + }, + { + img: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/themed/plasma.png?raw=true", + }, + { + img: "https://github.com/arch-linux-gui/artwork/blob/dev/desktop-screenshots/desktop-ss/pure/plasma-pure.png?raw=true", + }, ]; const firstRow = images.slice(0, images.length / 2); diff --git a/components/ui/card-hover-effect.tsx b/components/ui/card-hover-effect.tsx index 1ca7997..8e3340f 100644 --- a/components/ui/card-hover-effect.tsx +++ b/components/ui/card-hover-effect.tsx @@ -34,7 +34,7 @@ export const HoverEffect = ({ {hoveredIndex === idx && ( )} - + {item.title}(null); + + useEffect(() => { + const observer = new IntersectionObserver( + ([entry]) => { + if (entry.isIntersecting) { + setIsInView(true); + observer.disconnect(); + } + }, + { threshold: 0.1 } + ); + + if (ref.current) { + observer.observe(ref.current); + } + + return () => observer.disconnect(); + }, []); + + const handleLoad = () => { + setIsLoaded(true); + }; + + if (!isInView) { + return ( +
+
Loading video...
+
+ ); + } + + return ( +
+