Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/app/webshop/basket/basket.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ <h1 class="no-margin no-padding">Din indkøbsvogn</h1>
Antal
</th>
<td mat-cell *matCellDef="let line">
<input matInput [(ngModel)]="line.quantity" (ngModelChange)="updateLineQuantity(line)" class="table-input" type="number" [value]="line.quantity">
<input matInput [(ngModel)]="line.quantity" (ngModelChange)="updateLineQuantity(line)" class="table-input" type="number" min="1"
[value]="line.quantity" oninput="this.value = !!this.value ? Math.abs(this.value) : 1">
</td>
</ng-container>

Expand Down
2 changes: 1 addition & 1 deletion src/app/webshop/catalogue/catalogue.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ mat-grid-tile {
}

.itemPriceCatalogue{
color: mat.get-color-from-palette($my-primary);
color: mat.get-color-from-palette($custom-primary);
}
2 changes: 1 addition & 1 deletion src/app/webshop/item-display/item-display.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h1 class="itemPrice" style="font-size: 4rem; ">{{ item.price }},-</h1>
<div fxFlex fxLayoutAlign="center center" fxLayout="column">
<mat-form-field class="full-width">
<mat-label>Antal</mat-label>
<input matInput [(ngModel)]="quantity" type="number" value="1">
<input matInput [(ngModel)]="quantity" type="number" value="1" min="1" oninput="this.value = !!this.value ? Math.abs(this.value) : 1">
</mat-form-field>
<button class="full-width" (click)="addToCart(item)" mat-raised-button color="primary">Føj til kurv</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/webshop/item-display/item-display.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
}

.itemPrice{
color: mat.get-color-from-palette($my-primary);
color: mat.get-color-from-palette($custom-primary);
}
20 changes: 10 additions & 10 deletions src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ html, body {

// This overrides the color pallets from the original theme, whilst still keeping padding
@include mat.core();
$my-primary: mat.define-palette($custom-red-palette);
$my-accent: mat.define-palette($custom-blue-palette);
$my-warn: mat.define-palette($custom-warn-palette);
$custom_primary: mat.define-palette($custom-red-palette);
$custom_accent: mat.define-palette($custom-blue-palette);
$custom_warn: mat.define-palette($custom-warn-palette);

$my-theme: mat.define-light-theme((
$custom_theme: mat.define-light-theme((
color: (
primary: $my-primary,
accent: $my-accent,
warn: $my-warn
primary: $custom_primary,
accent: $custom_accent,
warn: $custom_warn
)
));
@include mat.core-theme($my-theme);
@include mat.button-theme($my-theme);
@include mat.progress-spinner-color($my-theme);
@include mat.core-theme($custom-theme);
@include mat.button-theme($custom-theme);
@include mat.progress-spinner-color($custom-theme);