Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: crypto page layout issues fix #165

Merged
merged 4 commits into from
Aug 28, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.info {
position: relative;
display: flex;
padding: 1rem 0;
padding: 0.687rem 0;
justify-content: space-between;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,60 +1,64 @@
<div class="info">
<h3 class="row-title tui-space_top-0 tui-space_bottom-0">Top NFTs</h3>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
<tui-scrollbar>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
</tui-scrollbar>
</div>
<div class="info">
<h3 class="row-title tui-space_top-0 tui-space_bottom-0">Recent bought NFTs</h3>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
<tui-scrollbar>
<div class="list">
@for (nft of nfts; track $index) {
<button
tuiCardLarge
tuiSurface="elevated"
class="card-nft"
(click)="updateItem($index)"
>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
<tui-avatar
class="logo-nft"
[src]="nft.src"
/>
<div
class="text"
[style.margin-top]="0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
<p class="nft-name tui-space_top-1 tui-space_bottom-0">{{ nft.name }}</p>
<p
tuiSubtitle
class="tui-space_top-0 tui-space_bottom-0"
>
{{ nft.price | tuiAmount: 'USD' | async }}
</p>
</div>
</button>
}
</div>
</tui-scrollbar>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
justify-content: space-around;
padding: 1rem;
gap: 0.5rem;
overflow: visible;
max-width: 100%;
}

.info {
display: flex;
overflow: hidden;
flex-direction: column;
gap: 0.5rem;
}
Expand All @@ -27,7 +25,6 @@
}

.card-nft[tuiCardLarge][data-space] {
overflow: hidden;
padding: 0;
height: 9rem;
width: 7.5rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Output,
} from '@angular/core';
import {TuiAmountPipe} from '@taiga-ui/addon-commerce';
import {TuiAppearance, TuiSurface, TuiTitle} from '@taiga-ui/core';
import {TuiAppearance, TuiScrollbar, TuiSurface, TuiTitle} from '@taiga-ui/core';
import {TuiAvatar} from '@taiga-ui/kit';
import {TuiCardLarge, TuiHeader} from '@taiga-ui/layout';

Expand All @@ -24,6 +24,7 @@ import {NftService} from '../nft.service';
TuiAvatar,
TuiCardLarge,
TuiHeader,
TuiScrollbar,
TuiSurface,
TuiTitle,
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div
tuiAppearance="whiteblock"
tuiCardLarge="normal"
class="card"
>
<header tuiHeader>
<h2
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.card {
@media (min-width: 68rem) {
min-width: 37rem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {NftListComponent} from './nft-list/nft-list.component';
TuiTitle,
],
templateUrl: './nft.component.html',
styleUrl: './nft.component.less',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NFTComponent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}

.list {
max-height: 22.5rem;
max-height: 15.5rem;
overflow: scroll;
background-color: var(--tui-background-base-alt);
border-radius: 1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
tuiAppearance="whiteblock"
tuiCardLarge="normal"
[style.height]="'100%'"
[style.min-height]="'420px'"
>
<header tuiHeader>
<h2
Expand Down
Loading