From 527131de00754b05921350a732341e2b68727247 Mon Sep 17 00:00:00 2001 From: yusuf-intern Date: Wed, 10 Dec 2025 15:54:54 +0000 Subject: [PATCH] Clean up UI components, remove unnecessary libs, improve navigation & portfolio Fix navigation dropdown, scroll behavior, and particle colors, removed ai slop removed phone numbers and removed link icon from portfolio added appropriate comments removed unnecessary libs --- src/App.tsx | 2 ++ src/components/Footer.tsx | 4 ++-- src/components/Navigation.tsx | 2 +- src/components/ParticleField.tsx | 6 +++++- src/components/ScrollToTop.tsx | 12 ++++++++++++ src/components/ui/button.tsx | 2 +- src/index.css | 4 ++++ src/pages/Contact.tsx | 8 ++++---- src/pages/Index.tsx | 8 ++++---- src/pages/Portfolio.tsx | 4 ++-- src/pages/services/AmcSupport.tsx | 12 ++++++------ src/pages/services/ECommerce.tsx | 12 ++++++------ src/pages/services/ErpSystems.tsx | 8 ++++---- src/pages/services/RmmServices.tsx | 14 +++++++------- 14 files changed, 60 insertions(+), 38 deletions(-) create mode 100644 src/components/ScrollToTop.tsx diff --git a/src/App.tsx b/src/App.tsx index f474327..9daad96 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,5 @@ import { Toaster } from "@/components/ui/toaster"; +import ScrollToTop from './components/ScrollToTop'; import { Toaster as Sonner } from "@/components/ui/sonner"; import { TooltipProvider } from "@/components/ui/tooltip"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; @@ -23,6 +24,7 @@ const App = () => ( + {/* component added to scroll to top of page */} } /> } /> diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index efa4877..b3b4bd0 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -121,12 +121,12 @@ const Footer = () => { info@openxpert.com -
  • + {/*
  • +971 XXX XXXX -
  • + */}
  • diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx index ec5ddf3..b860c6e 100644 --- a/src/components/Navigation.tsx +++ b/src/components/Navigation.tsx @@ -67,7 +67,7 @@ const Navigation = () => { {isServicesOpen && ( -
    +
    {/*changed mt-2 to mt-0 to remove gap triggering leave*/} {services.map((service) => ( { const drawParticles = () => { ctx.clearRect(0, 0, canvas.width, canvas.height); + const particleColor = getComputedStyle(document.documentElement) //added particle colour + .getPropertyValue('--particle') + .trim(); + particles.forEach((particle) => { ctx.beginPath(); ctx.arc(particle.x, particle.y, particle.size, 0, Math.PI * 2); - ctx.fillStyle = `hsla(205, 100%, 88%, ${particle.opacity})`; + ctx.fillStyle = `hsl(${particleColor} / ${particle.opacity})`; ctx.fill(); // Update position diff --git a/src/components/ScrollToTop.tsx b/src/components/ScrollToTop.tsx new file mode 100644 index 0000000..35a2e82 --- /dev/null +++ b/src/components/ScrollToTop.tsx @@ -0,0 +1,12 @@ +import { useEffect } from 'react'; +import { useLocation } from 'react-router-dom'; +//component added to scroll to top of page +export default function ScrollToTop() { + const { pathname } = useLocation(); + + useEffect(() => { + window.scrollTo(0, 0); + }, [pathname]); + + return null; +} \ No newline at end of file diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index cdedd4f..86433c7 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -9,7 +9,7 @@ const buttonVariants = cva( { variants: { variant: { - default: "bg-primary text-primary-foreground hover:bg-primary/90", + default: "bg-primary text-foreground hover:bg-primary/90", //changed text-primary-foreground to text-foreground destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground", secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", diff --git a/src/index.css b/src/index.css index 2e7c4bd..baa54a9 100644 --- a/src/index.css +++ b/src/index.css @@ -64,6 +64,8 @@ All colors MUST be HSL. --sidebar-accent-foreground: 240 5.9% 10%; --sidebar-border: 220 13% 91%; --sidebar-ring: 217.2 91.2% 59.8%; + + --particle: 210 100% 18%; } .dark { @@ -114,6 +116,8 @@ All colors MUST be HSL. --sidebar-accent-foreground: 240 4.8% 95.9%; --sidebar-border: 240 3.7% 15.9%; --sidebar-ring: 217.2 91.2% 59.8%; + + --particle: 210 100% 88%; /* added particle colour */ } } diff --git a/src/pages/Contact.tsx b/src/pages/Contact.tsx index 1e33d9c..e29eff9 100644 --- a/src/pages/Contact.tsx +++ b/src/pages/Contact.tsx @@ -52,12 +52,12 @@ const Contact = () => {
    -
    + {/*
    -
    +
    */}
    -
    + {/*
    @@ -101,7 +101,7 @@ const Contact = () => {

    +971 XXX XXXX

    +971 XXX XXXX

    -
    + */}
    diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 7b4f395..f682f66 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -62,13 +62,13 @@ const Index = () => { {/* Hero Section */}
    {/* Floating sparkle effects */} - - - @@ -78,7 +78,7 @@ const Index = () => {

    Precision. Innovation. - + {/*removed css animate-glow-pulse*/} Open Solutions.

    diff --git a/src/pages/Portfolio.tsx b/src/pages/Portfolio.tsx index cf728d6..c4a5b2f 100644 --- a/src/pages/Portfolio.tsx +++ b/src/pages/Portfolio.tsx @@ -79,9 +79,9 @@ const Portfolio = () => {
    {/* Hover Icon */} -
    + {/*
    -
    +
    */}
    {/* Content */} diff --git a/src/pages/services/AmcSupport.tsx b/src/pages/services/AmcSupport.tsx index 714aef4..06d0958 100644 --- a/src/pages/services/AmcSupport.tsx +++ b/src/pages/services/AmcSupport.tsx @@ -168,7 +168,7 @@ const AmcSupport = () => {
    {/* Animated Support Visual */} -
    + {/*
    @@ -192,7 +192,7 @@ const AmcSupport = () => {
    ))}
    -
    +
    */} {/* Features Grid */} @@ -290,7 +290,7 @@ const AmcSupport = () => { {/* Pricing Tiers */} -
    + {/*

    Choose Your Support Plan

    @@ -338,10 +338,10 @@ const AmcSupport = () => { ))}
    - + */} {/* Testimonials */} -
    + {/*

    What Our Clients Say

    @@ -365,7 +365,7 @@ const AmcSupport = () => { ))} -
    +
    */} {/* CTA Section */}
    diff --git a/src/pages/services/ECommerce.tsx b/src/pages/services/ECommerce.tsx index 7c6fb1f..e3c6b02 100644 --- a/src/pages/services/ECommerce.tsx +++ b/src/pages/services/ECommerce.tsx @@ -125,7 +125,7 @@ const ECommerce = () => { {/* Animated Store Preview */} -
    + {/*
    @@ -147,7 +147,7 @@ const ECommerce = () => {
    ))}
    -
    +
    */}
    {/* Features Grid */} @@ -180,7 +180,7 @@ const ECommerce = () => { {/* Theme Playground */} -
    + {/*

    Live Theme Customizer @@ -213,7 +213,7 @@ const ECommerce = () => {

    -
    +
    */} {/* Conversion Features */}
    @@ -242,7 +242,7 @@ const ECommerce = () => {
    {/* Pricing Packages */} -
    + {/*

    Choose Your Package

    @@ -279,7 +279,7 @@ const ECommerce = () => { ))} -
    +
    */} {/* CTA Section */}
    diff --git a/src/pages/services/ErpSystems.tsx b/src/pages/services/ErpSystems.tsx index 2ee2693..c1afd60 100644 --- a/src/pages/services/ErpSystems.tsx +++ b/src/pages/services/ErpSystems.tsx @@ -104,7 +104,7 @@ const ErpSystems = () => { {/* Animated Dashboard Preview */} -
    + {/*
    {[ { label: "Revenue", value: "$2.4M", trend: "+12%" }, @@ -122,7 +122,7 @@ const ErpSystems = () => {
    -
    +
    */}
    {/* Modules Section */} @@ -155,7 +155,7 @@ const ErpSystems = () => { {/* ROI Calculator */} -
    + {/*

    Calculate Your ROI @@ -218,7 +218,7 @@ const ErpSystems = () => {

    -
    +
    */} {/* Features Comparison */}
    diff --git a/src/pages/services/RmmServices.tsx b/src/pages/services/RmmServices.tsx index 509e4f5..83fb494 100644 --- a/src/pages/services/RmmServices.tsx +++ b/src/pages/services/RmmServices.tsx @@ -126,7 +126,7 @@ const RmmServices = () => { {/* Hero Section */} -
    + {/*

    RMM Services @@ -139,7 +139,7 @@ const RmmServices = () => {

    - {/* Animated Network Map */} +
    @@ -168,7 +168,7 @@ const RmmServices = () => { ))}
    -
    +
    */} {/* Features Grid */}
    @@ -200,7 +200,7 @@ const RmmServices = () => {
    {/* Live Status Simulation */} -
    + {/*

    Live Dashboard Preview @@ -245,7 +245,7 @@ const RmmServices = () => {

    )} -
    +
    */} {/* Benefits Stats */}
    @@ -270,7 +270,7 @@ const RmmServices = () => {
    {/* Pricing Tiers */} -
    + {/*

    Choose Your Monitoring Plan

    @@ -308,7 +308,7 @@ const RmmServices = () => { ))} -
    +
    */} {/* CTA Section */}