-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fusión de los componentes de la vista principal #2178
Open
gelisondo
wants to merge
22
commits into
platzi:main
Choose a base branch
from
gelisondo:main
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…s on the tags and modify ther behavior
…roductos a renderizar, iteramos el array para crear todos los elementos HTML desde JS y Organizar su maquetación, antes copiamos todo el CSS y el HTML necesario
… agregaron nuevos productos al array
… eliminar clases y crear ID, se modifico el JS asi como el estilo
…mos click, de esta manera podemos filtrar que objeto tiene dicha cadena y obtener su nombre y su precio, para que cuando se habra el detalle muestren los datos reales obtenidos de nuestro JSON
…Aside productDetail
…ya que estos ya no se usan en nuestro proyecto
…agrega un ID en el index.html para identificar el parrafo a modificar. Agregamos el codigo JS necesario para que aparesca la descripcion en el Aside Detail
…ML que tiene Hardcodido varios productos en el carrito de compras
…ito, se creao una nueva función para agregar esto, se añade un nuevo atribuo a cada elemento cartIcon con una llamada onclick a la funcion que agrega los objetos pasando como atributo el indexe del array que contine los productos
…n función agregarAlCarrito(), Creamos la función agregarAlCarrito() para agregar los nuevos elementos al array carritoCompras. Agregamos la función agregarAlCarrito() eliminarDelCarrito(), para finalizar creamos la función renderCarrito() que está sin terminar
…o con el numero de la pocicinón del array, de esta manera podemos acceder de manera puntual y remover manipulando el DOM desde JS el elemento seleccionado. De esta manera se visualiza como se quita el elemento HTML
…car desde HTML sin problemas. Se agrega verificación si el objeto ya existe en el array carritoCompras, y si es así aumente un valor en el campo cantidad
…del carrito, esto funciona correctamente. Se modifica el HTML para que hardcodiado muestre un 0 al inicio y despues se pueda mofificar
…mos todas las lógicas de Add, delte to acard utilizando el ID agregado y solucionamos problemas al eliminar los elementos del carrito.
…trar por categoría, estan son llamadas desde el menú HTML. Se cambio los anchors por span y se modifico el CSS para generar un puntero mas adecuado en elos elementos clickeables
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Agregamos los archivos index.html, styles.css y main.js para fusionar todos los componentes de la vista principal.