Spaces:
Sleeping
Sleeping
Upload 56 files
Browse files- components/DataForm.tsx +8 -9
- components/DetailView.tsx +19 -20
- index.html +1 -0
components/DataForm.tsx
CHANGED
|
@@ -71,7 +71,6 @@ export const DataForm: React.FC<DataFormProps> = ({ initialData, onSave, onCance
|
|
| 71 |
<label className="block text-sm font-medium text-gray-400">Resumen / Descripción Principal</label>
|
| 72 |
</div>
|
| 73 |
<textarea
|
| 74 |
-
required
|
| 75 |
rows={4}
|
| 76 |
className="w-full bg-background border border-white/10 rounded-lg p-4 text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none transition-colors resize-y"
|
| 77 |
value={summary}
|
|
@@ -83,26 +82,26 @@ export const DataForm: React.FC<DataFormProps> = ({ initialData, onSave, onCance
|
|
| 83 |
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-background/30 rounded-xl border border-white/5">
|
| 84 |
<div>
|
| 85 |
<label className="flex items-center gap-2 text-sm font-medium text-primary mb-2">
|
| 86 |
-
<
|
| 87 |
</label>
|
| 88 |
<input
|
| 89 |
type="url"
|
| 90 |
className="w-full bg-surface border border-white/10 rounded-lg p-3 text-white focus:border-primary outline-none text-sm placeholder-gray-600"
|
| 91 |
-
value={
|
| 92 |
-
onChange={(e) =>
|
| 93 |
-
placeholder="https://
|
| 94 |
/>
|
| 95 |
</div>
|
| 96 |
<div>
|
| 97 |
<label className="flex items-center gap-2 text-sm font-medium text-primary mb-2">
|
| 98 |
-
<
|
| 99 |
</label>
|
| 100 |
<input
|
| 101 |
type="url"
|
| 102 |
className="w-full bg-surface border border-white/10 rounded-lg p-3 text-white focus:border-primary outline-none text-sm placeholder-gray-600"
|
| 103 |
-
value={
|
| 104 |
-
onChange={(e) =>
|
| 105 |
-
placeholder="https://
|
| 106 |
/>
|
| 107 |
</div>
|
| 108 |
</div>
|
|
|
|
| 71 |
<label className="block text-sm font-medium text-gray-400">Resumen / Descripción Principal</label>
|
| 72 |
</div>
|
| 73 |
<textarea
|
|
|
|
| 74 |
rows={4}
|
| 75 |
className="w-full bg-background border border-white/10 rounded-lg p-4 text-white focus:border-primary focus:ring-1 focus:ring-primary outline-none transition-colors resize-y"
|
| 76 |
value={summary}
|
|
|
|
| 82 |
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 p-6 bg-background/30 rounded-xl border border-white/5">
|
| 83 |
<div>
|
| 84 |
<label className="flex items-center gap-2 text-sm font-medium text-primary mb-2">
|
| 85 |
+
<LinkIcon size={16} /> Enlace de Visita
|
| 86 |
</label>
|
| 87 |
<input
|
| 88 |
type="url"
|
| 89 |
className="w-full bg-surface border border-white/10 rounded-lg p-3 text-white focus:border-primary outline-none text-sm placeholder-gray-600"
|
| 90 |
+
value={visitUrl}
|
| 91 |
+
onChange={(e) => setVisitUrl(e.target.value)}
|
| 92 |
+
placeholder="https://mi-sitio-web.com"
|
| 93 |
/>
|
| 94 |
</div>
|
| 95 |
<div>
|
| 96 |
<label className="flex items-center gap-2 text-sm font-medium text-primary mb-2">
|
| 97 |
+
<Download size={16} /> Enlace de Descarga
|
| 98 |
</label>
|
| 99 |
<input
|
| 100 |
type="url"
|
| 101 |
className="w-full bg-surface border border-white/10 rounded-lg p-3 text-white focus:border-primary outline-none text-sm placeholder-gray-600"
|
| 102 |
+
value={downloadUrl}
|
| 103 |
+
onChange={(e) => setDownloadUrl(e.target.value)}
|
| 104 |
+
placeholder="https://drive.google.com/..."
|
| 105 |
/>
|
| 106 |
</div>
|
| 107 |
</div>
|
components/DetailView.tsx
CHANGED
|
@@ -496,27 +496,7 @@ export const DetailView: React.FC<DetailViewProps> = ({ item, onBack, onUpdate,
|
|
| 496 |
|
| 497 |
<div className={`${getCardClasses(item.cardStyle)} h-fit rounded-xl p-6 relative mb-8 flex flex-col md:block`}>
|
| 498 |
<div className="flex justify-end gap-2 mb-4 md:absolute md:top-5 md:right-5 md:mb-0 z-20">
|
| 499 |
-
{item.visitUrl && (
|
| 500 |
-
<a href={item.visitUrl} target="_blank" rel="noopener noreferrer">
|
| 501 |
-
<Button
|
| 502 |
-
variant="outline"
|
| 503 |
-
className="!py-1.5 !px-3 text-xs h-8"
|
| 504 |
-
>
|
| 505 |
-
<ExternalLink size={14} /> <span className="hidden sm:inline">Visitar</span>
|
| 506 |
-
</Button>
|
| 507 |
-
</a>
|
| 508 |
-
)}
|
| 509 |
|
| 510 |
-
{item.downloadUrl && (
|
| 511 |
-
<a href={item.downloadUrl} target="_blank" rel="noopener noreferrer">
|
| 512 |
-
<Button
|
| 513 |
-
variant="outline"
|
| 514 |
-
className="!py-1.5 !px-3 text-xs h-8"
|
| 515 |
-
>
|
| 516 |
-
<Download size={14} /> <span className="hidden sm:inline">Descargar</span>
|
| 517 |
-
</Button>
|
| 518 |
-
</a>
|
| 519 |
-
)}
|
| 520 |
|
| 521 |
{isEditable && (
|
| 522 |
<>
|
|
@@ -577,6 +557,25 @@ export const DetailView: React.FC<DetailViewProps> = ({ item, onBack, onUpdate,
|
|
| 577 |
))}
|
| 578 |
</div>
|
| 579 |
)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 580 |
</div>
|
| 581 |
|
| 582 |
{item.blocks && item.blocks.length > 0 && (
|
|
|
|
| 496 |
|
| 497 |
<div className={`${getCardClasses(item.cardStyle)} h-fit rounded-xl p-6 relative mb-8 flex flex-col md:block`}>
|
| 498 |
<div className="flex justify-end gap-2 mb-4 md:absolute md:top-5 md:right-5 md:mb-0 z-20">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 499 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 500 |
|
| 501 |
{isEditable && (
|
| 502 |
<>
|
|
|
|
| 557 |
))}
|
| 558 |
</div>
|
| 559 |
)}
|
| 560 |
+
|
| 561 |
+
{(item.visitUrl || item.downloadUrl) && (
|
| 562 |
+
<div className="flex flex-col sm:flex-row gap-3 pt-6 mt-2">
|
| 563 |
+
{item.visitUrl && (
|
| 564 |
+
<a href={item.visitUrl} target="_blank" rel="noopener noreferrer" className="flex-1 flex w-full">
|
| 565 |
+
<button className="w-full flex items-center justify-center gap-2 py-2.5 px-4 rounded-xl border border-primary/30 text-primary hover:bg-primary/10 transition-colors text-sm font-medium">
|
| 566 |
+
<ExternalLink size={16} /> Visitar Enlace
|
| 567 |
+
</button>
|
| 568 |
+
</a>
|
| 569 |
+
)}
|
| 570 |
+
{item.downloadUrl && (
|
| 571 |
+
<a href={item.downloadUrl} target="_blank" rel="noopener noreferrer" className="flex-1 flex w-full">
|
| 572 |
+
<button className="w-full flex items-center justify-center gap-2 py-2.5 px-4 rounded-xl border border-blue-500/30 text-blue-400 hover:bg-blue-500/10 transition-colors text-sm font-medium">
|
| 573 |
+
<Download size={16} /> Descargar
|
| 574 |
+
</button>
|
| 575 |
+
</a>
|
| 576 |
+
)}
|
| 577 |
+
</div>
|
| 578 |
+
)}
|
| 579 |
</div>
|
| 580 |
|
| 581 |
{item.blocks && item.blocks.length > 0 && (
|
index.html
CHANGED
|
@@ -5,6 +5,7 @@
|
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>CodeByDante</title>
|
|
|
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script>
|
| 10 |
tailwind.config = {
|
|
|
|
| 5 |
<meta charset="UTF-8" />
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
<title>CodeByDante</title>
|
| 8 |
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
| 9 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 10 |
<script>
|
| 11 |
tailwind.config = {
|