Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

Commit 104b0aa

Browse files
committed
feat: new placeholder photos; error/not-found component
1 parent 0bd02a7 commit 104b0aa

15 files changed

+55
-6
lines changed

src/app/app.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $side-padding: calc((100% - #{$max-width}) / 2);
2424
justify-content: space-between;
2525

2626
.toolbar-logo {
27-
height: 100%;
27+
height: 75%;
2828
}
2929
}
3030

src/app/items/data/Item.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class Item {
5858
}
5959

6060
public fixPhotoUrl(index: number) {
61-
this.photoUrls[index] = "assets/error-photo.png";
61+
this.photoUrls[index] = "assets/could-not-load.png";
6262
}
6363

6464
equals(other: Item): boolean {

src/app/items/item-photos/item-photos.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
timings="250ms ease-in">
1313
<mat-carousel-slide *ngIf="item?.doesNotHavePhotos else slidesWithPhotos"
1414
[hideOverlay]="true">
15-
<div class="item-photo">
15+
<div class="item-photo gradient-bg">
1616
<img [src]="'assets/no-photo.png'" alt="Item photo">
1717
</div>
1818
</mat-carousel-slide>

src/app/items/item-photos/item-photos.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@
1111
.item-photo {
1212
height: 100%;
1313
width: 100%;
14+
border-radius: $dimen-xxs;
1415

1516
img {
1617
object-fit: contain;
1718
height: 100%;
1819
width: 100%;
1920
}
2021
}
22+
23+
.gradient-bg {
24+
background: rgb(100,147,213);
25+
background: linear-gradient(145deg, rgba(100,147,213,1) 0%, rgba(255,255,255,1) 85%);
26+
padding: $dimen-l;
27+
}

src/app/my-account/data/items/AbstractUserItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export abstract class AbstractUserItem {
3535
}
3636

3737
public fixPhotoUrl() {
38-
this.photoUrl = "assets/error-photo.png";
38+
this.photoUrl = "assets/could-not-load.png";
3939
}
4040

4141
equals(other: AbstractUserItem): boolean {
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<p>error works!</p>
1+
<div>
2+
<img src="assets/error.png" alt="Error">
3+
</div>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@import "src/dimens";
2+
3+
div {
4+
display: flex;
5+
align-items: center;
6+
justify-content: center;
7+
height: 100%;
8+
9+
padding: $dimen-xl;
10+
11+
background: rgb(100,147,213);
12+
background: linear-gradient(145deg, rgba(100,147,213,1) 0%, rgba(255,255,255,1) 85%);
13+
}
14+
15+
img {
16+
object-fit: contain;
17+
max-height: 100%;
18+
max-width: 100%;
19+
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
<p>not-found works!</p>
1+
<div>
2+
<img src="assets/not-found.png" alt="Not found">
3+
</div>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@import "src/dimens";
2+
3+
div {
4+
display: flex;
5+
align-items: center;
6+
justify-content: center;
7+
height: 100%;
8+
9+
padding: $dimen-xl;
10+
11+
background: rgb(100,147,213);
12+
background: linear-gradient(145deg, rgba(100,147,213,1) 0%, rgba(255,255,255,1) 85%);
13+
}
14+
15+
img {
16+
object-fit: contain;
17+
max-height: 100%;
18+
max-width: 100%;
19+
}

src/assets/ELX-dummy-logo.png

480 KB
Loading

0 commit comments

Comments
 (0)