-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
npx prettier 'src/**/*.{js,ts,mjs,cjs,json,scss,html}' --write
- Loading branch information
Showing
6 changed files
with
47 additions
and
22 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -10,5 +10,6 @@ | |
"parser": "angular" | ||
} | ||
} | ||
] | ||
], | ||
"plugins": ["@awmottaz/prettier-plugin-void-html"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,2 +1,2 @@ | ||
<h1>Comprar discos de vinil</h1> | ||
<app-article-list></app-article-list> | ||
<app-article-list></app-article-list> |
29 changes: 19 additions & 10 deletions
29
PAC4_Ex_Prac/ecommerce/src/app/articles/article-item/article-item.component.html
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,12 +1,21 @@ | ||
<div class="article-item" [class]="article.isOnSale ? 'article-item sale' : ''"> | ||
<img [src]="article.imageUrl" [alt]="article.name"> | ||
<div class="container"> | ||
<div class="name">{{article.name}}</div> | ||
<div class="prize" [class]="!article.isOnSale ? 'prize not-on-sale' : ''">{{article.price}} €</div> | ||
<div class="quantity" *ngIf="article.isOnSale"> | ||
<div><button [disabled]="article.quantityInCart === 0" (click)="decrementInCart()">-</button></div> | ||
<div>{{article.quantityInCart}}</div> | ||
<div><button (click)="incrementInCart()">+</button></div> | ||
</div> | ||
<div class="article-item" [class]="article.isOnSale ? 'article-item sale' : ''"> | ||
<img [src]="article.imageUrl" [alt]="article.name" /> | ||
<div class="container"> | ||
<div class="name">{{ article.name }}</div> | ||
<div class="prize" [class]="!article.isOnSale ? 'prize not-on-sale' : ''"> | ||
{{ article.price }} € | ||
</div> | ||
<div class="quantity" *ngIf="article.isOnSale"> | ||
<div> | ||
<button | ||
[disabled]="article.quantityInCart === 0" | ||
(click)="decrementInCart()" | ||
> | ||
- | ||
</button> | ||
</div> | ||
<div>{{ article.quantityInCart }}</div> | ||
<div><button (click)="incrementInCart()">+</button></div> | ||
</div> | ||
</div> | ||
</div> |
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,13 +1,13 @@ | ||
<!doctype html> | ||
<html lang="ca"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Botiga en línia de discos</title> | ||
<base href="/"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico"> | ||
</head> | ||
<body> | ||
<app-root></app-root> | ||
</body> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Botiga en línia de discos</title> | ||
<base href="/" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" type="image/x-icon" href="favicon.ico" /> | ||
</head> | ||
<body> | ||
<app-root></app-root> | ||
</body> | ||
</html> |