adriano2005 commited on
Commit
7c3c6fa
·
verified ·
1 Parent(s): b3087b2

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +14 -312
index.html CHANGED
@@ -1,315 +1,17 @@
1
  <!DOCTYPE html>
2
  <html lang="pt-BR">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>ACME Pro - Premium Store</title>
7
-
8
- <script src="https://cdn.tailwindcss.com"></script>
9
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
10
-
11
- <script>
12
- tailwind.config = {
13
- theme: {
14
- extend: {
15
- fontFamily: { sans: ['Inter', 'sans-serif'] },
16
- colors: { appleGray: '#f5f5f7', airbnbDark: '#161117' },
17
- animation: {
18
- 'fade-up': 'fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards',
19
- 'slide-in-right': 'slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards',
20
- },
21
- keyframes: {
22
- fadeUp: {
23
- '0%': { opacity: '0', transform: 'translateY(20px)' },
24
- '100%': { opacity: '1', transform: 'translateY(0)' },
25
- },
26
- slideInRight: {
27
- '0%': { transform: 'translateX(100%)' },
28
- '100%': { transform: 'translateX(0)' },
29
- }
30
- }
31
- }
32
- }
33
- }
34
- </script>
35
-
36
- <style>
37
- body { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
38
- .no-scrollbar::-webkit-scrollbar { display: none; }
39
- .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
40
- /* Utilitário para delay dinâmico nas animações */
41
- .delay-100 { animation-delay: 100ms; }
42
- .delay-200 { animation-delay: 200ms; }
43
- .delay-300 { animation-delay: 300ms; }
44
- </style>
45
-
46
- <script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
47
- <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
48
- <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
49
- </head>
50
- <body class="bg-white text-gray-900 overflow-x-hidden selection:bg-black selection:text-white">
51
-
52
- <div id="root"></div>
53
-
54
- <script type="text/babel" data-presets="react">
55
- const { useState, useMemo } = React;
56
-
57
- const mockProducts = [
58
- { id: "1", name: "Tênis Phantom Pro", price: 899.00, category: "Performance", description: "Engenharia aeroespacial para seus pés. O Phantom Pro redefine o conceito de amortecimento com nossa nova espuma cinética.", imageUrl: "https://images.unsplash.com/photo-1542291026-7eec264c27ff?w=800&q=80" },
59
- { id: "2", name: "Jaqueta Apex Zero", price: 1249.00, category: "Vestuário", description: "Impermeabilidade absoluta. Isolamento térmico de titânio. Desenhada para ambientes extremos, feita para a cidade.", imageUrl: "https://images.unsplash.com/photo-1551028719-00167b16eac5?w=800&q=80" },
60
- { id: "3", name: "Mochila Stealth 2.0", price: 549.00, category: "Acessórios", description: "Design minimalista com proteção militar. Compartimentos magnéticos e tecido balístico resistente a cortes.", imageUrl: "https://images.unsplash.com/photo-1553062407-98eeb64c6a62?w=800&q=80" },
61
- { id: "4", name: "Vision Watch Ultra", price: 3299.00, category: "Eletrônicos", description: "Corpo em titânio escovado. Tela de safira contínua. O smartwatch mais avançado já criado pela humanidade.", imageUrl: "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800&q=80" }
62
- ];
63
-
64
- const Icons = {
65
- Cart: () => <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><path d="M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z"></path><line x1="3" y1="6" x2="21" y2="6"></line><path d="M16 10a4 4 0 0 1-8 0"></path></svg>,
66
- Close: () => <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>,
67
- ArrowLeft: () => <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>
68
- };
69
-
70
- function App() {
71
- const [cartItems, setCartItems] = useState([]);
72
- const [currentView, setCurrentView] = useState('home');
73
- const [selectedProduct, setSelectedProduct] = useState(null);
74
- const [isCartOpen, setIsCartOpen] = useState(false);
75
-
76
- const addToCart = (product) => {
77
- setCartItems(prev => {
78
- const exists = prev.find(i => i.id === product.id);
79
- if (exists) return prev.map(i => i.id === product.id ? { ...i, quantity: i.quantity + 1 } : i);
80
- return [...prev, { ...product, quantity: 1 }];
81
- });
82
- setIsCartOpen(true);
83
- };
84
-
85
- const removeFromCart = (productId) => setCartItems(prev => prev.filter(i => i.id !== productId));
86
-
87
- const totalCartValue = useMemo(() => cartItems.reduce((acc, item) => acc + (item.price * item.quantity), 0), [cartItems]);
88
- const totalItemsCount = useMemo(() => cartItems.reduce((acc, item) => acc + item.quantity, 0), [cartItems]);
89
-
90
- const openProduct = (product) => {
91
- setSelectedProduct(product);
92
- setCurrentView('product');
93
- window.scrollTo({ top: 0, behavior: 'smooth' });
94
- };
95
-
96
- const goHome = () => {
97
- setCurrentView('home');
98
- setSelectedProduct(null);
99
- window.scrollTo({ top: 0, behavior: 'smooth' });
100
- };
101
-
102
- return (
103
- <div className="min-h-screen flex flex-col">
104
- {/* 🎯 HEADER APPLE-STYLE: Glassmorphism e minimalismo absoluto */}
105
- <header className="fixed top-0 z-40 w-full bg-white/70 backdrop-blur-xl border-b border-gray-100/50 transition-all duration-300">
106
- <div className="max-w-7xl mx-auto px-6 md:px-12 h-16 flex justify-between items-center">
107
- <h1 onClick={goHome} className="text-xl font-bold tracking-tight cursor-pointer hover:text-gray-500 transition-colors">
108
- ACME <span className="font-light">Pro</span>
109
- </h1>
110
-
111
- <div className="flex items-center gap-6">
112
- <button onClick={() => setIsCartOpen(true)} className="relative p-2 text-gray-900 hover:text-gray-500 transition-colors group">
113
- <Icons.Cart />
114
- {totalItemsCount > 0 && (
115
- <span className="absolute top-0 right-0 bg-black text-white text-[10px] font-bold w-4 h-4 rounded-full flex items-center justify-center transform group-hover:scale-110 transition-transform">
116
- {totalItemsCount}
117
- </span>
118
- )}
119
- </button>
120
- </div>
121
- </div>
122
- </header>
123
-
124
- <main className="flex-grow w-full pt-16">
125
- {currentView === 'home' && (
126
- <HomeView products={mockProducts} onSelectProduct={openProduct} />
127
- )}
128
-
129
- {currentView === 'product' && selectedProduct && (
130
- <ProductView product={selectedProduct} onBack={goHome} onAdd={() => addToCart(selectedProduct)} />
131
- )}
132
- </main>
133
-
134
- {/* 🎯 FOOTER AIRBNB-STYLE: Fundo escuro, links estruturados */}
135
- <footer className="bg-airbnbDark text-white py-16 px-6 md:px-12 mt-24">
136
- <div className="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-4 gap-12">
137
- <div>
138
- <h3 className="text-lg font-bold mb-4">ACME Pro</h3>
139
- <p className="text-gray-400 text-sm leading-relaxed">Projetado na Califórnia.<br/>Construído para o mundo.</p>
140
- </div>
141
- <div>
142
- <h4 className="font-semibold mb-4 text-sm">Explorar</h4>
143
- <ul className="space-y-2 text-gray-400 text-sm">
144
- <li><a href="#" className="hover:text-white transition-colors">Lançamentos</a></li>
145
- <li><a href="#" className="hover:text-white transition-colors">Mais Vendidos</a></li>
146
- <li><a href="#" className="hover:text-white transition-colors">Acessórios</a></li>
147
- </ul>
148
- </div>
149
- <div>
150
- <h4 className="font-semibold mb-4 text-sm">Suporte</h4>
151
- <ul className="space-y-2 text-gray-400 text-sm">
152
- <li><a href="#" className="hover:text-white transition-colors">Fale Conosco</a></li>
153
- <li><a href="#" className="hover:text-white transition-colors">Garantia</a></li>
154
- <li><a href="#" className="hover:text-white transition-colors">Devoluções</a></li>
155
- </ul>
156
- </div>
157
- <div>
158
- <h4 className="font-semibold mb-4 text-sm">Legal</h4>
159
- <ul className="space-y-2 text-gray-400 text-sm">
160
- <li><a href="#" className="hover:text-white transition-colors">Privacidade</a></li>
161
- <li><a href="#" className="hover:text-white transition-colors">Termos de Uso</a></li>
162
- </ul>
163
- </div>
164
- </div>
165
- <div className="max-w-7xl mx-auto border-t border-gray-800 mt-12 pt-8 text-sm text-gray-500 text-center">
166
- © 2026 ACME Store. Padrão Elite Staff Engineer.
167
- </div>
168
- </footer>
169
-
170
- {/* MODAL DO CARRINHO (SLIDE LATERAL) */}
171
- {isCartOpen && (
172
- <div className="fixed inset-0 z-50 flex justify-end">
173
- <div className="fixed inset-0 bg-black/40 backdrop-blur-sm transition-opacity" onClick={() => setIsCartOpen(false)}></div>
174
- <div className="relative w-full max-w-md bg-white h-full flex flex-col animate-slide-in-right shadow-2xl">
175
- <div className="flex items-center justify-between p-6 border-b border-gray-100">
176
- <h2 className="text-2xl font-bold tracking-tight">Sacola</h2>
177
- <button onClick={() => setIsCartOpen(false)} className="p-2 hover:bg-gray-100 rounded-full transition-colors"><Icons.Close /></button>
178
- </div>
179
-
180
- <div className="flex-1 overflow-y-auto p-6 no-scrollbar">
181
- {cartItems.length === 0 ? (
182
- <div className="flex flex-col items-center justify-center h-full text-gray-400">
183
- <Icons.Cart />
184
- <p className="mt-4 font-medium">Sua sacola está vazia.</p>
185
- </div>
186
- ) : (
187
- <ul className="space-y-8">
188
- {cartItems.map(item => (
189
- <li key={item.id} className="flex items-center gap-6 group">
190
- <div className="w-24 h-24 bg-appleGray rounded-2xl p-2 flex-shrink-0">
191
- <img src={item.imageUrl} alt={item.name} className="w-full h-full object-cover rounded-xl" />
192
- </div>
193
- <div className="flex-1">
194
- <h4 className="font-semibold text-gray-900">{item.name}</h4>
195
- <p className="text-gray-500 text-sm mt-1">Qtd: {item.quantity}</p>
196
- <p className="font-bold mt-2">R$ {(item.price * item.quantity).toFixed(2)}</p>
197
- </div>
198
- <button onClick={() => removeFromCart(item.id)} className="text-gray-300 hover:text-red-500 text-sm font-medium transition-colors">Remover</button>
199
- </li>
200
- ))}
201
- </ul>
202
- )}
203
- </div>
204
-
205
- <div className="p-8 border-t border-gray-100 bg-white">
206
- <div className="flex justify-between font-bold text-xl mb-6">
207
- <span>Total</span>
208
- <span>R$ {totalCartValue.toFixed(2)}</span>
209
- </div>
210
- <button disabled={cartItems.length === 0} className="w-full bg-black text-white py-4 rounded-full font-semibold text-lg hover:scale-[1.02] hover:bg-gray-800 disabled:opacity-50 disabled:hover:scale-100 disabled:cursor-not-allowed transition-all">
211
- Finalizar Compra
212
- </button>
213
- </div>
214
- </div>
215
- </div>
216
- )}
217
- </div>
218
- );
219
- }
220
-
221
- // --- VIEW: HOME ---
222
- function HomeView({ products, onSelectProduct }) {
223
- return (
224
- <div className="w-full animate-fade-up">
225
- {/* HERO SECTION APPLE-STYLE */}
226
- <section className="w-full max-w-7xl mx-auto px-6 md:px-12 pt-12 pb-24 text-center">
227
- <h2 className="text-5xl md:text-7xl font-black tracking-tighter mb-6 bg-clip-text text-transparent bg-gradient-to-r from-gray-900 to-gray-500">
228
- Projetado para <br/> a excelência.
229
- </h2>
230
- <p className="text-xl text-gray-500 max-w-2xl mx-auto mb-10 font-light">
231
- Descubra a nova coleção. Materiais premium, design implacável e a performance que você exige no seu dia a dia.
232
- </p>
233
- </section>
234
-
235
- {/* GRID DE PRODUTOS MINIMALISTA */}
236
- <section className="w-full max-w-7xl mx-auto px-6 md:px-12 pb-24">
237
- <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-16">
238
- {products.map((product, index) => (
239
- <article
240
- key={product.id}
241
- onClick={() => onSelectProduct(product)}
242
- className={`group cursor-pointer flex flex-col opacity-0 animate-fade-up delay-${index * 100}`}
243
- style={{ animationDelay: `${index * 100}ms` }}
244
- >
245
- <div className="relative aspect-[4/5] rounded-[2rem] bg-appleGray mb-6 overflow-hidden transition-all duration-500 group-hover:shadow-2xl group-hover:shadow-black/10 group-hover:-translate-y-2">
246
- <img
247
- src={product.imageUrl}
248
- alt={product.name}
249
- className="object-cover w-full h-full p-4 mix-blend-multiply group-hover:scale-105 transition-transform duration-700 ease-out"
250
- />
251
- </div>
252
- <div className="text-center px-2">
253
- <span className="text-xs font-semibold tracking-widest uppercase text-orange-500 mb-2 block">{product.category}</span>
254
- <h3 className="font-bold text-xl text-gray-900 mb-1">{product.name}</h3>
255
- <p className="text-gray-500 font-medium">R$ {product.price.toFixed(2)}</p>
256
- </div>
257
- </article>
258
- ))}
259
- </div>
260
- </section>
261
- </div>
262
- );
263
- }
264
-
265
- // --- VIEW: DETALHES DO PRODUTO ---
266
- function ProductView({ product, onBack, onAdd }) {
267
- return (
268
- <div className="max-w-7xl mx-auto px-6 md:px-12 py-12 animate-fade-up">
269
- <button onClick={onBack} className="flex items-center gap-2 text-gray-500 hover:text-black mb-12 font-medium transition-colors">
270
- <Icons.ArrowLeft /> Voltar
271
- </button>
272
-
273
- <div className="grid grid-cols-1 md:grid-cols-2 gap-16 lg:gap-24 items-center">
274
- {/* Imagem grande com fundo AppleGray */}
275
- <div className="relative aspect-square md:aspect-[4/5] rounded-[3rem] bg-appleGray p-8 md:p-12">
276
- <img src={product.imageUrl} alt={product.name} className="object-cover w-full h-full mix-blend-multiply rounded-2xl" />
277
- </div>
278
-
279
- <div className="flex flex-col">
280
- <span className="text-sm font-bold tracking-widest uppercase text-orange-500 mb-4">{product.category}</span>
281
- <h1 className="text-5xl md:text-6xl font-black tracking-tighter mb-6 text-gray-900">{product.name}</h1>
282
- <p className="text-3xl text-gray-500 mb-10 font-light">R$ {product.price.toFixed(2)}</p>
283
-
284
- <p className="text-gray-600 text-lg leading-relaxed mb-12 font-light">
285
- {product.description}
286
- </p>
287
-
288
- <button
289
- onClick={onAdd}
290
- className="w-full md:w-auto bg-black text-white px-10 py-5 rounded-full font-semibold text-lg hover:bg-gray-800 active:scale-95 transition-all duration-200"
291
- >
292
- Adicionar à Sacola
293
- </button>
294
-
295
- <div className="mt-16 pt-10 border-t border-gray-100 grid grid-cols-2 gap-8 text-sm">
296
- <div>
297
- <span className="block font-bold text-gray-900 mb-2">Envio Rápido</span>
298
- <span className="text-gray-500">Entrega gratuita em compras acima de R$ 999.</span>
299
- </div>
300
- <div>
301
- <span className="block font-bold text-gray-900 mb-2">Devoluções</span>
302
- <span className="text-gray-500">Devolva gratuitamente em até 14 dias.</span>
303
- </div>
304
- </div>
305
- </div>
306
- </div>
307
- </div>
308
- );
309
- }
310
-
311
- const root = ReactDOM.createRoot(document.getElementById('root'));
312
- root.render(<App />);
313
- </script>
314
- </body>
315
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="pt-BR">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+
8
+ <meta name="description" content="E-commerce estático de alta performance hospedado no Hugging Face." />
9
+ <title>E-commerce | Elite Architecture</title>
10
+ </head>
11
+ <body class="bg-gray-50 text-gray-900 antialiased">
12
+ <noscript>Você precisa habilitar o JavaScript para rodar este aplicativo.</noscript>
13
+ <div id="root"></div>
14
+
15
+ <script type="module" src="/src/main.tsx"></script>
16
+ </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  </html>