Featured assets and asset groups

This commit is contained in:
softsimon
2022-02-06 01:20:26 +04:00
parent 8e2943a6a0
commit d2bb3356da
19 changed files with 421 additions and 110 deletions

View File

@@ -0,0 +1,27 @@
<div *ngIf="featuredAssets$ | async as featured; else loading" class="featuredBox">
<div *ngFor="let group of featured.featured">
<div class="card">
<ng-template [ngIf]="group.assets" [ngIfElse]="singleAsset">
<img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.assets[0] + '/icon'">
<div class="title"><a [routerLink]="['/assets/asset-group', group.id]">{{ group.name }}</a></div>
<div class="sub-title">Group of {{ group.assets.length | number }} assets</div>
</ng-template>
<ng-template #singleAsset>
<img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.asset + '/icon'">
<div class="title">
<a [routerLink]="['/assets/asset/', group.asset]">{{ group.name }}</a>
</div>
<div class="ticker">{{ group.ticker }}</div>
</ng-template>
</div>
</div>
</div>
<ng-template #loading>
<br>
<div class="text-center loadingGraphs">
<div class="spinner-border text-light"></div>
</div>
</ng-template>