Updated gallery
All checks were successful
Build Website / Build NPM Project (push) Successful in 1m44s
Build Website / Tag Version (push) Successful in 11s
Build Website / Build & Push Dockerfile (push) Successful in 2m40s

This commit is contained in:
2024-01-12 12:04:59 -05:00
parent 905f734d91
commit e6ff564111
14 changed files with 472 additions and 155 deletions

View File

@@ -0,0 +1,43 @@
import {Component, Input} from '@angular/core';
@Component({
selector: 'xxx-placeholder',
styles: [`
.placeholder {
position: relative;
background-color: #bbbbbb;
background: linear-gradient(to right, #eeeeee 8%, #bbbbbb 18%, #eeeeee 33%);
background-size: 400% 100%;
min-height: 100px;
min-width: 200px;
animation-duration: 3s;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-name: placeHolderShimmer;
animation-timing-function: linear;
@keyframes placeHolderShimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
}
`],
template: `
<div *ngIf="loading" class="placeholder" [style.height]="height" [style.width]="width"></div>
<img [src]="src" [alt]="alt" [style]="style" [style.height]="height" [style.width]="width" loading="lazy" (load)="loading = false" />
`
})
export class PlaceholderComponent {
loading = true;
@Input() alt?: string;
@Input() src!: string;
@Input() style!: string;
@Input() height: string = 'auto';
@Input() width: string = 'auto';
}