Skip to content

Commit 373b060

Browse files
committed
feat: update Hero component to accept theme prop and add logo images
1 parent 6059af3 commit 373b060

6 files changed

Lines changed: 21 additions & 230 deletions

File tree

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function App() {
1313
<div className="min-h-screen">
1414
<Navbar theme={theme} onToggleTheme={toggleTheme} />
1515
<main>
16-
<Hero />
16+
<Hero theme={theme} />
1717
<Services />
1818
<About />
1919
<Contact />
107 KB
Loading
107 KB
Loading

src/assets/images/logos/m-logo.png

104 KB
Loading

src/components/sections/hero.tsx

Lines changed: 18 additions & 168 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
import { ArrowDown, Phone } from 'lucide-react'
22

3+
import fullLogoLight from '@/assets/images/logos/full-logo-light.png'
4+
import fullLogoDark from '@/assets/images/logos/full-logo.png'
35
import { ButtonLink } from '@/components/ui/button'
46

5-
export function Hero() {
7+
interface HeroProps {
8+
theme: 'light' | 'dark'
9+
}
10+
11+
export function Hero({ theme }: HeroProps) {
12+
const logoSrc = theme === 'light' ? fullLogoLight : fullLogoDark
613
return (
714
<section
815
id="inicio"
@@ -21,22 +28,24 @@ export function Hero() {
2128
</div>
2229

2330
<div className="relative mx-auto max-w-6xl px-4 py-20 text-center sm:px-6">
24-
{/* Logo mark */}
25-
<div className="mx-auto mb-8 flex h-28 w-28 items-center justify-center rounded-full bg-[var(--accent)] shadow-lg sm:h-36 sm:w-36">
26-
<HeroLogo className="h-20 w-20 sm:h-28 sm:w-28" />
27-
</div>
28-
2931
<h1 className="mb-4 text-4xl font-bold tracking-tight sm:text-5xl lg:text-6xl">
3032
<span className="text-[var(--primary)]">Centro de Servicios</span>
3133
<br />
3234
<span className="text-[var(--secondary)]">Educativos</span>
3335
</h1>
34-
35-
<p className="mx-auto mb-4 max-w-2xl text-lg text-[var(--muted-foreground)] sm:text-xl">
36+
{/* Logo mark */}
37+
<div className="mx-auto">
38+
<img
39+
src={logoSrc}
40+
alt="MAC Educando Logo"
41+
className="mx-auto h-48 w-auto sm:h-64 md:h-80"
42+
/>
43+
</div>
44+
{/* <p className="mx-auto mb-4 max-w-2xl text-lg text-[var(--muted-foreground)] sm:text-xl">
3645
<span className="font-semibold text-[var(--primary)]">
3746
M Adviser and Consultant Inc.
3847
</span>
39-
</p>
48+
</p> */}
4049

4150
<p className="mx-auto mb-10 max-w-2xl text-base text-[var(--muted-foreground)] sm:text-lg">
4251
Ofrecemos una amplia gama de servicios orientados al desarrollo{' '}
@@ -75,162 +84,3 @@ export function Hero() {
7584
</section>
7685
)
7786
}
78-
79-
function HeroLogo({ className }: { className?: string }) {
80-
return (
81-
<svg viewBox="0 0 200 200" className={className} aria-hidden="true">
82-
<defs>
83-
<linearGradient id="trunk-grad" x1="0" y1="0" x2="0" y2="1">
84-
<stop offset="0%" stopColor="#e8751a" />
85-
<stop offset="100%" stopColor="#8a3e0b" />
86-
</linearGradient>
87-
</defs>
88-
89-
{/* M letter */}
90-
<path
91-
d="M30 175 L30 95 L65 130 L100 95 L135 130 L170 95 L170 175 L148 175 L148 125 L120 158 L100 135 L80 158 L52 125 L52 175 Z"
92-
fill="var(--primary)"
93-
opacity="0.9"
94-
/>
95-
96-
{/* Tree trunk */}
97-
<path
98-
d="M92 95 C95 55 100 40 100 35 C100 40 105 55 108 95"
99-
fill="url(#trunk-grad)"
100-
/>
101-
102-
{/* Branches */}
103-
<path
104-
d="M100 60 C85 55 78 48 75 42"
105-
fill="none"
106-
stroke="#d4651a"
107-
strokeWidth="2.5"
108-
strokeLinecap="round"
109-
/>
110-
<path
111-
d="M100 60 C115 55 122 48 125 42"
112-
fill="none"
113-
stroke="#d4651a"
114-
strokeWidth="2.5"
115-
strokeLinecap="round"
116-
/>
117-
<path
118-
d="M100 50 C88 42 82 35 80 28"
119-
fill="none"
120-
stroke="#d4651a"
121-
strokeWidth="2"
122-
strokeLinecap="round"
123-
/>
124-
<path
125-
d="M100 50 C112 42 118 35 120 28"
126-
fill="none"
127-
stroke="#d4651a"
128-
strokeWidth="2"
129-
strokeLinecap="round"
130-
/>
131-
<path
132-
d="M100 42 C94 35 90 28 88 22"
133-
fill="none"
134-
stroke="#d4651a"
135-
strokeWidth="1.5"
136-
strokeLinecap="round"
137-
/>
138-
<path
139-
d="M100 42 C106 35 110 28 112 22"
140-
fill="none"
141-
stroke="#d4651a"
142-
strokeWidth="1.5"
143-
strokeLinecap="round"
144-
/>
145-
146-
{/* Leaves - dark green */}
147-
<ellipse
148-
cx="75"
149-
cy="38"
150-
rx="10"
151-
ry="6"
152-
fill="#2d6a2e"
153-
transform="rotate(-35 75 38)"
154-
/>
155-
<ellipse
156-
cx="88"
157-
cy="20"
158-
rx="9"
159-
ry="5.5"
160-
fill="#1b441b"
161-
transform="rotate(-15 88 20)"
162-
/>
163-
<ellipse cx="100" cy="14" rx="9" ry="5" fill="#2d6a2e" />
164-
165-
{/* Leaves - light green */}
166-
<ellipse
167-
cx="125"
168-
cy="38"
169-
rx="10"
170-
ry="6"
171-
fill="#7cb342"
172-
transform="rotate(35 125 38)"
173-
/>
174-
<ellipse
175-
cx="112"
176-
cy="20"
177-
rx="9"
178-
ry="5.5"
179-
fill="#4e9a47"
180-
transform="rotate(15 112 20)"
181-
/>
182-
<ellipse
183-
cx="68"
184-
cy="48"
185-
rx="8"
186-
ry="5"
187-
fill="#7cb342"
188-
transform="rotate(-25 68 48)"
189-
/>
190-
191-
{/* Leaves - yellow accent */}
192-
<ellipse
193-
cx="80"
194-
cy="28"
195-
rx="7"
196-
ry="4.5"
197-
fill="#ffd600"
198-
transform="rotate(-20 80 28)"
199-
/>
200-
<ellipse
201-
cx="132"
202-
cy="48"
203-
rx="8"
204-
ry="5"
205-
fill="#ffd600"
206-
transform="rotate(25 132 48)"
207-
/>
208-
<ellipse
209-
cx="120"
210-
cy="28"
211-
rx="7"
212-
ry="4.5"
213-
fill="#ffd600"
214-
transform="rotate(20 120 28)"
215-
/>
216-
217-
{/* Extra detail leaves */}
218-
<ellipse
219-
cx="94"
220-
cy="30"
221-
rx="6"
222-
ry="4"
223-
fill="#4e9a47"
224-
transform="rotate(-10 94 30)"
225-
/>
226-
<ellipse
227-
cx="106"
228-
cy="30"
229-
rx="6"
230-
ry="4"
231-
fill="#2d6a2e"
232-
transform="rotate(10 106 30)"
233-
/>
234-
</svg>
235-
)
236-
}

src/components/sections/navbar.tsx

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Menu, X, Sun, Moon } from 'lucide-react'
22
import { useState } from 'react'
33

4+
import mLogo from '@/assets/images/logos/m-logo.png'
45
import { Button } from '@/components/ui/button'
56
import { cn } from '@/lib/utils'
67

@@ -23,7 +24,7 @@ export function Navbar({ theme, onToggleTheme }: NavbarProps) {
2324
<nav className="fixed top-0 z-50 w-full border-b border-[var(--border)] bg-[var(--background)]/95 backdrop-blur-sm">
2425
<div className="mx-auto flex h-16 max-w-6xl items-center justify-between px-4 sm:px-6">
2526
<a href="#inicio" className="flex items-center gap-2">
26-
<MacLogo className="h-10 w-10" />
27+
<img src={mLogo} alt="MAC Logo" className="h-10 w-10" />
2728
<span className="text-lg font-bold text-[var(--primary)]">
2829
MAC{' '}
2930
<span className="hidden text-[var(--secondary)] sm:inline">
@@ -103,63 +104,3 @@ export function Navbar({ theme, onToggleTheme }: NavbarProps) {
103104
</nav>
104105
)
105106
}
106-
107-
function MacLogo({ className }: { className?: string }) {
108-
return (
109-
<svg viewBox="0 0 100 100" className={className} aria-hidden="true">
110-
{/* M letter */}
111-
<path
112-
d="M15 85 L15 40 L35 65 L50 45 L65 65 L85 40 L85 85 L72 85 L72 60 L58 78 L50 68 L42 78 L28 60 L28 85 Z"
113-
fill="var(--primary)"
114-
/>
115-
{/* Tree trunk */}
116-
<path
117-
d="M47 45 Q50 20 53 45"
118-
fill="none"
119-
stroke="#d4651a"
120-
strokeWidth="3"
121-
/>
122-
{/* Leaves */}
123-
<ellipse
124-
cx="42"
125-
cy="25"
126-
rx="6"
127-
ry="4"
128-
fill="#2d6a2e"
129-
transform="rotate(-30 42 25)"
130-
/>
131-
<ellipse
132-
cx="50"
133-
cy="18"
134-
rx="5"
135-
ry="3.5"
136-
fill="#4e9a47"
137-
transform="rotate(0 50 18)"
138-
/>
139-
<ellipse
140-
cx="58"
141-
cy="25"
142-
rx="6"
143-
ry="4"
144-
fill="#7cb342"
145-
transform="rotate(30 58 25)"
146-
/>
147-
<ellipse
148-
cx="45"
149-
cy="32"
150-
rx="5"
151-
ry="3"
152-
fill="#ffd600"
153-
transform="rotate(-20 45 32)"
154-
/>
155-
<ellipse
156-
cx="55"
157-
cy="32"
158-
rx="5"
159-
ry="3"
160-
fill="#2d6a2e"
161-
transform="rotate(20 55 32)"
162-
/>
163-
</svg>
164-
)
165-
}

0 commit comments

Comments
 (0)