mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-03 12:02:53 +00:00
refactor: use ion-img where lazy load needed
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<ion-card-content *ngFor="let characteristic of ('characteristics' | thingTranslate: item)">
|
||||
<p>
|
||||
<img *ngIf="characteristic.image"
|
||||
[src]="characteristic.image" /><span> {{characteristic.name}}</span>
|
||||
[src]="characteristic.image" alt=""/><span> {{characteristic.name}}</span>
|
||||
</p>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ion-back-button></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>
|
||||
<img src="assets/imgs/logo.png" />
|
||||
<img src="assets/imgs/logo.png" alt=""/>
|
||||
<span class="text">StApps</span>
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
<ion-card>
|
||||
<span *ngIf="item.url; else imageNoUrl">
|
||||
<a href="{{item.url}}">
|
||||
<ion-thumbnail>
|
||||
<img src="{{item.image}}" onerror="this.style.display = 'none'; this.nextSibling.style.display='block'" />
|
||||
<ion-thumbnail><ion-img src="{{item.image}}" (ionError)="$event.target.nextSibling.style.display='block'" alt=""></ion-img>
|
||||
<ion-icon name="newspaper-outline"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
</a>
|
||||
</span>
|
||||
<ng-template #imageNoUrl>
|
||||
<ion-thumbnail>
|
||||
<img src="{{item.image}}" onerror="this.style.display = 'none'; this.nextSibling.style.display='block'" />
|
||||
<ion-img src="{{item.image}}" (ionError)="$event.target.nextSibling.style.display='block'" alt=""></ion-img>
|
||||
<ion-icon name="newspaper-outline"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
</ng-template>
|
||||
|
||||
Reference in New Issue
Block a user