View ProductoSeeder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$datos = [ | |
array( | |
'nombre' => "Café Caramel con Chocolate", | |
'precio' => 59.9, | |
'imagen' => "cafe_01", | |
'categoria_id' => 1, | |
'disponible' => true, | |
'created_at' => Carbon::now(), | |
'updated_at' => Carbon::now(), | |
), |
View CategoriaSeeder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DB::table('categorias')->insert([ | |
'nombre' => 'Café', | |
'icono' => 'cafe', | |
'created_at' => Carbon::now(), | |
'updated_at' => Carbon::now(), | |
]); | |
DB::table('categorias')->insert([ | |
'nombre' => 'Hamburguesas', | |
'icono' => 'hamburguesa', |
View ResumenProducto.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return ( | |
<div className="shadow space-y-1 p-4 bg-white"> | |
<div className="space-y-2"> | |
<p className="text-xl font-bold">{nombre}</p> | |
<p className="text-lg font-bold ">Cantidad: {cantidad}</p> | |
<p className="text-lg font-bold text-amber-500"> | |
Precio: | |
</p> | |
<p className="text-lg text-gray-700"> | |
Subtotal: |
View Layout.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const customStyles = { | |
content: { | |
top: "50%", | |
left: "50%", | |
right: "auto", | |
bottom: "auto", | |
marginRight: "-50%", | |
transform: "translate(-50%, -50%)", | |
}, | |
}; |
View productos.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const productos = [ | |
{ | |
nombre: "Café Caramel con Chocolate", | |
precio: 59.9, | |
imagen: "cafe_01", | |
categoria_id: 1, | |
id: 1 | |
}, | |
{ | |
nombre: "Café Frio con Chocolate Grande", |
View categorias.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const categorias = [ | |
{ | |
icono: "cafe", | |
nombre: "Café", | |
id:1 | |
}, | |
{ | |
icono: "hamburguesa", | |
nombre: "Hamburguesas", | |
id: 2 |
View Curso.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.curso { | |
padding: 10rem 0; | |
margin-top: 10rem; | |
background-size: cover; | |
background-position: center center; | |
} | |
@media (min-width: 768px) { | |
.grid { | |
display: grid; | |
grid-template-columns: repeat(2, 1fr); |
View [id].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.post { | |
max-width: 80rem; | |
margin: 0 auto; | |
} | |
.contenido { | |
padding: 1.5rem; | |
} | |
.contenido h3 { | |
font-weight: 900; |
View index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const formatearFecha = fecha => { | |
const opciones = { | |
year: 'numeric', | |
month: 'long', | |
day: '2-digit' | |
} | |
return new Date(fecha).toLocaleDateString('es-ES', opciones) | |
} |
View Post.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.post { | |
max-width: 80rem; | |
margin: 0 auto; | |
} | |
.contenido { | |
padding: 1.5rem; | |
} | |
.contenido h3 { | |
font-weight: 900; | |
font-size: 2.8rem; |
NewerOlder