-
Notifications
You must be signed in to change notification settings - Fork 815
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
Binary file removed
BIN
-110 KB
pruebas/02-bazar-universal/dano2906/src/assets/placeholder-product-image.png
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
pruebas/02-bazar-universal/dano2906/src/components/Navigation.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<header class="max-w-sm sm:max-w-md md:max-w-4xl mx-auto p-2"> | ||
<nav class="w-full h-auto"> | ||
<a href="/" class="text-lg font-tilt font-light text-purple-950 bg-gradient-to-br from-blue-200 via-pink-200 to-orange-200 p-1 my-1 rounded-lg hover:opacity-75">Buscar productos 🔍</a> | ||
<a href="/" class="text-lg font-tilt font-light text-purple-950 bg-gradient-to-br from-blue-200 via-pink-200 to-orange-200 p-1 my-1 rounded-lg transition-all hover:scale-105">Buscar productos 🔍</a> | ||
</nav> | ||
</header> |
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
15 changes: 13 additions & 2 deletions
15
pruebas/02-bazar-universal/dano2906/src/pages/items/[id]/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
--- | ||
import MainLayout from "@layouts/MainLayout.astro"; | ||
const {id} = Astro.params | ||
import { Image } from "astro:assets"; | ||
import productImage from "../../../../public/placeholder-product-image.png" | ||
const {id} = Astro.params | ||
const res = await fetch(Astro.url.origin + `/api/items/${id}/data.json`) | ||
const {product} = await res.json() | ||
const {title,description,price,category,rating} = product | ||
--- | ||
|
||
<MainLayout title={`Producto numero ${id}`} description="Tienda implementada para la prueba técnica #2 de midudev basada en una prueba de Mercado Libre" keywords={['prueba tecnica','desarrollo','tienda online']}> | ||
<h1>{id}</h1> | ||
<Image src={productImage} alt={title} width={192} height={192} class="rounded-lg" transition:name="img"/> | ||
<h2 class="text-2xl font-tilt font-bold text-purple-950" transition:name="title">{title}</h2> | ||
<p class="text-lg font-tilt font-light text-purple-950" transition:name="desc">{description}</p> | ||
<span class="text-sm font-tilt font-normal text-purple-950" transition:name="category">{category}</span> | ||
<span class="text-sm font-tilt font-light text-purple-950" transition:name="price">Price: ${price}</span> | ||
<span class="text-sm font-tilt font-light text-purple-950" transition:name="rating">Rating: {rating}/5</span> | ||
</MainLayout> |
3 changes: 2 additions & 1 deletion
3
pruebas/02-bazar-universal/dano2906/src/pages/items/index.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