@devries-cameron20 / OCIU-npo Mirror · read-only / commits / 1e03f24
Fork 0

Mirrored from https://github.com/Camo67/OCIU-npo.git

Synced Nov 21, 03:37 UTC

Perf round: self-hosted fonts, hero preload, PWA manifest identity, lazy below-fold sections, sized images, remove hero fade-in (LCP)

Instinct Deploy Agent committed Nov 16, 2026 at 14:14 UTC 1e03f24430fe334be476f336624d0f61a3853bee
14 files changed +55 -85
index.html
+1
@@ -4,6 +4,7 @@
4 <meta charset="UTF-8" />
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6 <link rel="icon" href="/favicon.png" type="image/png" />
7 + <link rel="preload" as="image" href="/assets/logo-square-BK_Dg7Mk.webp" fetchpriority="high" />
8
9 <title>Community & Unity | Each One Teach One - Empowering Communities</title>
10 <meta name="description" content="Community & Unity empowers communities through collective knowledge. Each one teach one. Building stronger futures through digital skills, shared learning, and collaboration." />
package-lock.json
-39
@@ -4105,9 +4105,6 @@
4105 "arm"
4106 ],
4107 "dev": true,
4108 - "libc": [
4109 - "glibc"
4110 - ],
4108 "license": "MIT",
4109 "optional": true,
4110 "os": [
@@ -4122,9 +4119,6 @@
4119 "arm"
4120 ],
4121 "dev": true,
4125 - "libc": [
4126 - "musl"
4127 - ],
4122 "license": "MIT",
4123 "optional": true,
4124 "os": [
@@ -4139,9 +4133,6 @@
4133 "arm64"
4134 ],
4135 "dev": true,
4142 - "libc": [
4143 - "glibc"
4144 - ],
4136 "license": "MIT",
4137 "optional": true,
4138 "os": [
@@ -4156,9 +4147,6 @@
4147 "arm64"
4148 ],
4149 "dev": true,
4159 - "libc": [
4160 - "musl"
4161 - ],
4150 "license": "MIT",
4151 "optional": true,
4152 "os": [
@@ -4173,9 +4161,6 @@
4161 "loong64"
4162 ],
4163 "dev": true,
4176 - "libc": [
4177 - "glibc"
4178 - ],
4164 "license": "MIT",
4165 "optional": true,
4166 "os": [
@@ -4190,9 +4175,6 @@
4175 "loong64"
4176 ],
4177 "dev": true,
4193 - "libc": [
4194 - "musl"
4195 - ],
4178 "license": "MIT",
4179 "optional": true,
4180 "os": [
@@ -4207,9 +4189,6 @@
4189 "ppc64"
4190 ],
4191 "dev": true,
4210 - "libc": [
4211 - "glibc"
4212 - ],
4192 "license": "MIT",
4193 "optional": true,
4194 "os": [
@@ -4224,9 +4203,6 @@
4203 "ppc64"
4204 ],
4205 "dev": true,
4227 - "libc": [
4228 - "musl"
4229 - ],
4206 "license": "MIT",
4207 "optional": true,
4208 "os": [
@@ -4241,9 +4217,6 @@
4217 "riscv64"
4218 ],
4219 "dev": true,
4244 - "libc": [
4245 - "glibc"
4246 - ],
4220 "license": "MIT",
4221 "optional": true,
4222 "os": [
@@ -4258,9 +4231,6 @@
4231 "riscv64"
4232 ],
4233 "dev": true,
4261 - "libc": [
4262 - "musl"
4263 - ],
4234 "license": "MIT",
4235 "optional": true,
4236 "os": [
@@ -4275,9 +4245,6 @@
4245 "s390x"
4246 ],
4247 "dev": true,
4278 - "libc": [
4279 - "glibc"
4280 - ],
4248 "license": "MIT",
4249 "optional": true,
4250 "os": [
@@ -4292,9 +4259,6 @@
4259 "x64"
4260 ],
4261 "dev": true,
4295 - "libc": [
4296 - "glibc"
4297 - ],
4262 "license": "MIT",
4263 "optional": true,
4264 "os": [
@@ -4309,9 +4273,6 @@
4273 "x64"
4274 ],
4275 "dev": true,
4312 - "libc": [
4313 - "musl"
4314 - ],
4276 "license": "MIT",
4277 "optional": true,
4278 "os": [
public/pwa-192x192.png
Binary files /dev/null and b/public/pwa-192x192.png differ
public/pwa-512x512.png
Binary files /dev/null and b/public/pwa-512x512.png differ
src/assets/logo-banner.webp
Binary files /dev/null and b/src/assets/logo-banner.webp differ
src/assets/logo-square.webp
Binary files /dev/null and b/src/assets/logo-square.webp differ
src/components/DigitalAgency.tsx
+1 -1
@@ -73,7 +73,7 @@ export const DigitalAgency = () => {
73 <CardTitle className="text-xl">{project.name}</CardTitle>
74 </div>
75 </div>
76 - <Badge variant={project.status === "Live" ? "secondary" : "outline"}>
76 + <Badge className={project.status === "Live" ? "bg-blue-800 text-white hover:bg-blue-900" : ""} variant={project.status === "Live" ? "secondary" : "outline"}>
77 {project.status}
78 </Badge>
79 </div>
src/components/Hero.tsx
+4 -3
@@ -1,5 +1,5 @@
1 import { Button } from "@/components/ui/button";
2 -import logoSquare from "@/assets/logo-square.png";
2 +import logoSquare from "@/assets/logo-square.webp";
3 import { ArrowRight } from "lucide-react";
4
5 export const Hero = () => {
@@ -12,12 +12,13 @@ export const Hero = () => {
12 </div>
13
14 <div className="container mx-auto px-4 z-10">
15 - <div className="max-w-5xl mx-auto text-center space-y-8 animate-fade-in">
15 + <div className="max-w-5xl mx-auto text-center space-y-8">
16 {/* Logo */}
17 <div className="flex justify-center mb-8">
18 <div className="inline-flex items-center justify-center rounded-[2rem] bg-[hsl(var(--logo-background))] p-4 md:p-6 shadow-2xl shadow-black/25">
19 <img
20 - src={logoSquare}
20 + src={logoSquare}
21 + width={320} height={320} fetchPriority="high"
22 alt="Community & Unity Logo"
23 className="w-64 h-64 md:w-80 md:h-80"
24 />
src/components/Leadership.tsx
+2 -2
@@ -32,7 +32,7 @@ export const Leadership = () => {
32 <CardContent className="p-0">
33 {/* Image or Icon */}
34 {leader.image ? <div className="w-full h-64 overflow-hidden bg-gradient-hero">
35 - <img src={leader.image} alt={leader.name} className="w-full h-full object-contain" />
35 + <img loading="lazy" decoding="async" src={leader.image} width={854} height={854} alt={leader.name} className="w-full h-full object-contain" />
36 </div> : <div className="w-full h-64 bg-gradient-hero flex items-center justify-center">
37 <Icon className="w-24 h-24 text-white/80" />
38 </div>}
@@ -45,7 +45,7 @@ export const Leadership = () => {
45 {leader.name}
46 </h3>
47 </div>
48 - <p className="text-lg font-semibold text-primary">
48 + <p className="text-lg font-semibold text-blue-800">
49 {leader.role}
50 </p>
51 </div>
src/components/MusicProduction.tsx
+4 -4
@@ -15,27 +15,27 @@ export const MusicProduction = () => {
15 <h2 className="text-4xl md:text-5xl font-bold text-foreground">
16 Music Production, Taught by the Community
17 </h2>
18 - <p className="text-xl text-muted-foreground max-w-2xl mx-auto">
18 + <p className="text-xl text-slate-700 max-w-2xl mx-auto">
19 Learn to make music from people who make it.
20 </p>
21 </div>
22
23 {/* Body */}
24 <div className="space-y-8 text-center animate-slide-up">
25 - <p className="text-lg text-muted-foreground leading-relaxed max-w-2xl mx-auto">
25 + <p className="text-lg text-slate-700 leading-relaxed max-w-2xl mx-auto">
26 Our Community in Unity teaches young people music production, from first beat
27 to finished track, led by Ghisaam with sound engineer Cameron De Vries.
28 </p>
29 <div className="grid sm:grid-cols-2 gap-6 max-w-2xl mx-auto text-left">
30 <div className="flex items-start gap-3">
31 <GraduationCap className="w-6 h-6 text-accent shrink-0 mt-1" />
32 - <p className="text-muted-foreground">
32 + <p className="text-slate-700">
33 Each one teach one: when you finish, you help teach the next group.
34 </p>
35 </div>
36 <div className="flex items-start gap-3">
37 <Users className="w-6 h-6 text-accent shrink-0 mt-1" />
38 - <p className="text-muted-foreground">
38 + <p className="text-slate-700">
39 Joining details are coming soon.
40 </p>
41 </div>
src/components/Navigation.tsx
+7 -7
@@ -1,6 +1,6 @@
1 import { useState } from "react";
2 import { Button } from "@/components/ui/button";
3 -import logoBanner from "@/assets/logo-banner.png";
3 +import logoBanner from "@/assets/logo-banner.webp";
4 import { Menu, X } from "lucide-react";
5 const navItems = [{
6 label: "Mission",
@@ -20,30 +20,30 @@ const navItems = [{
20 }];
21 export const Navigation = () => {
22 const [isOpen, setIsOpen] = useState(false);
23 - return <nav className="fixed top-0 left-0 right-0 z-50 border-b border-border shadow-sm bg-primary">
23 + return <nav className="fixed top-0 left-0 right-0 z-50 border-b border-border shadow-sm bg-blue-700">
24 <div className="container mx-auto px-4">
25 <div className="flex items-center justify-between h-16">
26 {/* Logo */}
27 <a href="/" className="flex items-center">
28 - <img src={logoBanner} alt="Community & Unity" className="h-12 w-auto" />
28 + <img src={logoBanner} width={390} height={144} alt="Community & Unity" className="h-12 w-auto" />
29 </a>
30
31 {/* Desktop Navigation */}
32 <div className="hidden md:flex items-center gap-6">
33 - {navItems.map(item => <a key={item.label} href={item.href} className="text-primary-foreground hover:text-accent transition-colors font-medium">
33 + {navItems.map(item => <a key={item.label} href={item.href} className="text-primary-foreground hover:text-white transition-colors font-medium">
34 {item.label}
35 </a>)}
36 </div>
37
38 {/* Mobile Menu Button */}
39 - <Button variant="ghost" size="icon" className="md:hidden" onClick={() => setIsOpen(!isOpen)}>
39 + <Button aria-label={isOpen ? "Close navigation" : "Open navigation"} aria-expanded={isOpen} aria-controls="mobile-navigation" variant="ghost" size="icon" className="md:hidden" onClick={() => setIsOpen(!isOpen)}>
40 {isOpen ? <X /> : <Menu />}
41 </Button>
42 </div>
43
44 {/* Mobile Navigation */}
45 - {isOpen && <div className="md:hidden py-4 space-y-3 border-t border-border">
46 - {navItems.map(item => <a key={item.label} href={item.href} className="block py-2 text-primary-foreground hover:text-accent transition-colors font-medium" onClick={() => setIsOpen(false)}>
45 + {isOpen && <div id="mobile-navigation" className="md:hidden py-4 space-y-3 border-t border-border">
46 + {navItems.map(item => <a key={item.label} href={item.href} className="block py-2 text-primary-foreground hover:text-white transition-colors font-medium" onClick={() => setIsOpen(false)}>
47 {item.label}
48 </a>)}
49 </div>}
src/components/Podcast.tsx
+3 -2
@@ -29,8 +29,9 @@ export const Podcast = () => {
29 <div className="animate-slide-up">
30 <Card className="overflow-hidden border-2 hover:border-accent/40 transition-all hover:shadow-2xl">
31 <CardContent className="p-0">
32 - <img
33 - src={podcastCover}
32 + <img loading="lazy" decoding="async"
33 + src={podcastCover}
34 + width={960} height={960}
35 alt="Unspoken Truths Podcast Cover"
36 className="w-full h-auto"
37 />
src/pages/Index.tsx
+30 -24
@@ -1,11 +1,15 @@
1 +import { lazy, Suspense } from "react";
2 import { Navigation } from "@/components/Navigation";
3 import { Hero } from "@/components/Hero";
3 -import { MissionVision } from "@/components/MissionVision";
4 -import { Leadership } from "@/components/Leadership";
5 -import { Podcast } from "@/components/Podcast";
6 -import { MusicProduction } from "@/components/MusicProduction";
7 -import { DigitalAgency } from "@/components/DigitalAgency";
8 -import { CallToAction } from "@/components/CallToAction";
4 +
5 +// Below-the-fold sections load after the hero so the main thread stays free
6 +// for first paint and the LCP image.
7 +const MissionVision = lazy(() => import("@/components/MissionVision").then((m) => ({ default: m.MissionVision })));
8 +const Leadership = lazy(() => import("@/components/Leadership").then((m) => ({ default: m.Leadership })));
9 +const Podcast = lazy(() => import("@/components/Podcast").then((m) => ({ default: m.Podcast })));
10 +const MusicProduction = lazy(() => import("@/components/MusicProduction").then((m) => ({ default: m.MusicProduction })));
11 +const DigitalAgency = lazy(() => import("@/components/DigitalAgency").then((m) => ({ default: m.DigitalAgency })));
12 +const CallToAction = lazy(() => import("@/components/CallToAction").then((m) => ({ default: m.CallToAction })));
13
14 const Index = () => {
15 return (
@@ -15,24 +19,26 @@ const Index = () => {
19 <div id="home">
20 <Hero />
21 </div>
18 - <div id="mission">
19 - <MissionVision />
20 - </div>
21 - <div id="leadership">
22 - <Leadership />
23 - </div>
24 - <div id="music-production">
25 - <MusicProduction />
26 - </div>
27 - <div id="podcast">
28 - <Podcast />
29 - </div>
30 - <div id="services">
31 - <DigitalAgency />
32 - </div>
33 - <div id="join">
34 - <CallToAction />
35 - </div>
22 + <Suspense fallback={null}>
23 + <div id="mission">
24 + <MissionVision />
25 + </div>
26 + <div id="leadership">
27 + <Leadership />
28 + </div>
29 + <div id="music-production">
30 + <MusicProduction />
31 + </div>
32 + <div id="podcast">
33 + <Podcast />
34 + </div>
35 + <div id="services">
36 + <DigitalAgency />
37 + </div>
38 + <div id="join">
39 + <CallToAction />
40 + </div>
41 + </Suspense>
42 </main>
43 </div>
44 );
vite.config.ts
+3 -3
@@ -17,9 +17,9 @@ export default defineConfig(({ mode }) => ({
17 registerType: 'autoUpdate',
18 includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg'],
19 manifest: {
20 - name: 'CamoFlow OS',
21 - short_name: 'CamoFlow',
22 - description: 'Local-first AI Operating System',
20 + name: 'Our Community in Unity',
21 + short_name: 'OCIU',
22 + description: 'Each One Teach One - Empowering Communities',
23 theme_color: '#000000',
24 icons: [
25 {