funders page: responsive design for sorting actions

This commit is contained in:
Alex Martzios 2023-07-07 16:30:51 +03:00
parent 378d7ccb83
commit 9556ae36b9
1 changed files with 37 additions and 12 deletions

View File

@ -42,18 +42,43 @@
<ng-container *ngIf="!showLoading && funders?.length"> <ng-container *ngIf="!showLoading && funders?.length">
<div class="uk-container uk-container-large" uk-height-match="target: .percentage;"> <div class="uk-container uk-container-large" uk-height-match="target: .percentage;">
<div id="target" class="uk-section" uk-height-match="target: .alias;"> <div id="target" class="uk-section" uk-height-match="target: .alias;">
<div *ngIf="groupedFunders" class="uk-padding-small uk-padding-remove-vertical uk-margin-medium-bottom uk-flex uk-flex-middle uk-flex-between"> <!-- sorting desktop view -->
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap"> <div class="uk-visible@m">
<li *ngFor="let item of groupedFunders; let i = index;" class="uk-margin-right" [class.uk-margin-left]="i != 0" <div *ngIf="groupedFunders" class="uk-padding-small uk-padding-remove-vertical uk-margin-medium-bottom uk-flex uk-flex-middle uk-flex-between">
[class]="index == i ? 'uk-active':''" (click)="changeDisplayedFunders(i)"> <ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
<a class="uk-padding-remove">{{item.group}}</a> <li *ngFor="let item of groupedFunders; let i = index;" class="uk-margin-right" [class.uk-margin-left]="i != 0"
</li> [class]="index == i ? 'uk-active':''" (click)="changeDisplayedFunders(i)">
</ul> <a class="uk-padding-remove">{{item.group}}</a>
<div class="uk-width-medium"> </li>
<div input </ul>
type="select" placeholder="Show" inputClass="flat x-small" <div class="uk-width-medium">
[options]="options" [(value)]="sortBy" [disabled]="isDisabled" <div input
(valueChange)="sortByChanged()"></div> type="select" placeholder="Show" inputClass="flat x-small"
[options]="options" [(value)]="sortBy" [disabled]="isDisabled"
(valueChange)="sortByChanged()"></div>
</div>
</div>
</div>
<!-- sorting mobile view -->
<div class="uk-hidden@m">
<div *ngIf="groupedFunders" class="uk-padding-small uk-padding-remove-vertical uk-margin-bottom uk-flex uk-flex-column uk-flex-middle">
<div class="uk-width-medium">
<div input
type="select" placeholder="Show" inputClass="flat x-small"
[options]="options" [(value)]="sortBy" [disabled]="isDisabled"
(valueChange)="sortByChanged()"></div>
</div>
<div class="uk-padding uk-padding-remove-horizontal" >
<div class="uk-margin-left uk-margin-small-bottom uk-text-meta uk-text-small">
Sort Alphabetically
</div>
<ul class="uk-nav uk-nav-default uk-grid uk-grid-small uk-child-width-1-6" uk-grid>
<li *ngFor="let item of groupedFunders; let i = index;"
[class]="index == i ? 'uk-active':''" (click)="changeDisplayedFunders(i)">
<a class="uk-padding-remove">{{item.group}}</a>
</li>
</ul>
</div>
</div> </div>
</div> </div>
<div class="uk-margin-large-bottom" uk-height-match="target: .name;"> <div class="uk-margin-large-bottom" uk-height-match="target: .name;">