clase:daw:diw:1eval:tema03.c
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
| clase:daw:diw:1eval:tema03.c [2025/11/05 12:15] – Lorenzo | clase:daw:diw:1eval:tema03.c [2025/11/10 11:52] (actual) – [Ejercicios] Lorenzo | ||
|---|---|---|---|
| Línea 9: | Línea 9: | ||
| Los objetivos son: | Los objetivos son: | ||
| - | • Predecible | + | * Predecible: Escribir reglas claras. |
| - | • Reutilizable | + | |
| - | • Mantenible | + | |
| - | • Escalable | + | |
| Buenas prácticas | Buenas prácticas | ||
| - | • Establecer reglas para que el equipo se entienda. | + | * Establecer reglas para que el equipo se entienda. |
| - | • Explicar la estructura base o dar los fundamentos del proyecto a un nuevo integrante. | + | |
| - | • Evitar hojas de estilo muy extensas. | + | |
| - | • Tener una buena documentación explicando ciertos aspectos del código. | + | |
| Línea 218: | Línea 218: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | |||
| + | ===== Ejercicios ===== | ||
| + | |||
| + | ==== Ejercicio 1.A ==== | ||
| + | Crea un componente que tenga lo siguiente: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | La imagen es esta: [[https:// | ||
| + | |||
| + | |||
| + | Los caracteres de la estrella y el camión son: | ||
| + | * ⭐ | ||
| + | * 🚚 | ||
| + | |||
| + | |||
| + | <sxh ts> | ||
| + | < | ||
| + | nombre=" | ||
| + | urlImagen=" | ||
| + | [precioActual]=" | ||
| + | [precioAnterior]=" | ||
| + | [valoracion]=" | ||
| + | [numeroOpiniones]=" | ||
| + | [fechaEntrega]=" | ||
| + | [precioEnvio]=" | ||
| + | [otrosEnvios]=" | ||
| + | /> | ||
| + | </ | ||
| + | |||
| + | |||
| + | <sxh ts; | ||
| + | import {Component, EventEmitter, | ||
| + | import {CommonModule} from ' | ||
| + | |||
| + | @Component({ | ||
| + | selector: ' | ||
| + | imports: [CommonModule], | ||
| + | templateUrl: | ||
| + | styleUrl: ' | ||
| + | }) | ||
| + | export class CArticulo | ||
| + | @Input() nombre: | ||
| + | @Input() urlImagen: | ||
| + | @Input() precioActual: | ||
| + | @Input() precioAnterior: | ||
| + | @Input() valoracion: | ||
| + | @Input() numeroOpiniones: | ||
| + | @Input() fechaEntrega: | ||
| + | @Input() precioEnvio: | ||
| + | @Input() otrosEnvios: | ||
| + | |||
| + | |||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | <sxh ts; | ||
| + | <div class=" | ||
| + | <img class=" | ||
| + | <h3 class=" | ||
| + | <p class=" | ||
| + | <span class=" | ||
| + | | ||
| + | <span class=" | ||
| + | </p> | ||
| + | <p> | ||
| + | <span class=" | ||
| + | <span class=" | ||
| + | <span class=" | ||
| + | </p> | ||
| + | <p class=""> | ||
| + | 🚚& | ||
| + | <span class=" | ||
| + | <span class=" | ||
| + | </p> | ||
| + | <p class=" | ||
| + | Otras opciones disponibles | ||
| + | </p> | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | <sxh sass; | ||
| + | .c-articulo { | ||
| + | font-family: | ||
| + | width: 197px; | ||
| + | color: #333; | ||
| + | |||
| + | & | ||
| + | font-size: 14px; | ||
| + | font-weight: | ||
| + | color: #333; | ||
| + | } | ||
| + | |||
| + | & | ||
| + | & | ||
| + | font-size: 17px; | ||
| + | font-weight: | ||
| + | color: #bf0019; | ||
| + | } | ||
| + | |||
| + | & | ||
| + | font-size: 14px; | ||
| + | color: #6e6e6e; | ||
| + | text-decoration: | ||
| + | } | ||
| + | |||
| + | &-envio { | ||
| + | color: #ff7a00; | ||
| + | font-weight: | ||
| + | } | ||
| + | } | ||
| + | |||
| + | & | ||
| + | font-size: 13px; | ||
| + | font-weight: | ||
| + | color: #333; | ||
| + | } | ||
| + | |||
| + | & | ||
| + | color: #333333; | ||
| + | font-size: 13px; | ||
| + | } | ||
| + | & | ||
| + | font-size: 13px; | ||
| + | font-weight: | ||
| + | |||
| + | & | ||
| + | color: #008000; | ||
| + | } | ||
| + | |||
| + | & | ||
| + | color: #333333; | ||
| + | } | ||
| + | } | ||
| + | |||
| + | & | ||
| + | font-size: 13px; | ||
| + | color: #777; | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ==== Ejercicio 1.B ==== | ||
| + | Modifica ahora el componente para que | ||
| + | * Si los gastos de envío | ||
| + | * Son 0€ se muestre " | ||
| + | * Sino que no es muestre nada. | ||
| + | * Si la fecha de entrega es | ||
| + | * Mañana que muestre | ||
| + | * Sino mostrara " | ||
| + | * Si no hay precio anterior que no lo muestre | ||
| + | * Si no hay otras opciones disponibles que no muestre el texto | ||
| + | |||
| + | {{: | ||
| + | |||
clase/daw/diw/1eval/tema03.c.1762341336.txt.gz · Última modificación: por Lorenzo
