Skip to content

Commit

Permalink
style: Align text and remove bold count (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielPalafox authored May 30, 2023
1 parent 78f799b commit a51dfb7
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 30 deletions.
59 changes: 29 additions & 30 deletions src/app/cdk/panel/panels/panels.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<div class="text-container clickable" (click)="collapse()">
<h3 class="activity-header orc-font-body-large">
<strong> {{ title }} </strong>
{{ title }}
<ng-container *ngIf="type !== 'peer-review'">
<span
*ngIf="currentAmount && total && currentAmount !== total"
Expand Down Expand Up @@ -47,34 +47,33 @@ <h3 class="activity-header orc-font-body-large">
>
<span *ngIf="!currentAmount && currentAmount !== 0"></span>
</ng-container>
</h3>
<ng-container *ngIf="type === 'peer-review' && currentAmount !== 0">
<span>
({{ reviewsNumber }}
<ng-container *ngIf="reviewsNumber > 1" i18n="@@peerReview.reviews">
reviews
</ng-container>
<ng-container
*ngIf="reviewsNumber === 1"
i18n="@@peerReview.review"
>
review
</ng-container>
<ng-container i18n="@@peerReview.for"> for </ng-container>
{{ currentAmount }}
<ng-container
*ngIf="currentAmount > 1"
i18n="@@peerReview.publicationsGrants"
<ng-container *ngIf="type === 'peer-review' && currentAmount !== 0">
<span>
({{ reviewsNumber }}
<ng-container *ngIf="reviewsNumber > 1" i18n="@@peerReview.reviews">
reviews
</ng-container>
<ng-container
*ngIf="reviewsNumber === 1"
i18n="@@peerReview.review"
>
review
</ng-container>
<ng-container i18n="@@peerReview.for"> for </ng-container>
{{ currentAmount }}
<ng-container
*ngIf="currentAmount > 1"
i18n="@@peerReview.publicationsGrants"
>publications/grants</ng-container
>
<ng-container
*ngIf="currentAmount === 1"
i18n="@@peerReview.publicationGrant"
>
<ng-container
*ngIf="currentAmount === 1"
i18n="@@peerReview.publicationGrant"
>publication/grant</ng-container
>)
</span>
</ng-container>
<ng-container> </ng-container>
>)
</span>
</ng-container>
</h3>
</div>
</div>

Expand All @@ -90,7 +89,7 @@ <h3 class="activity-header orc-font-body-large">
<mat-icon class="large-material-icon" id="add-button">
add_circle_outline
</mat-icon>
<ng-container i18n="@@shared.add"> Add </ng-container>
<ng-container *ngIf="!isMobile" i18n="@@shared.add"> Add </ng-container>
</button>
<button
*ngIf="
Expand All @@ -107,7 +106,7 @@ <h3 class="activity-header orc-font-body-large">
<mat-icon class="large-material-icon add-button-multiple">
add_circle_outline
</mat-icon>
<ng-container i18n="@@shared.add"> Add </ng-container>
<ng-container *ngIf="!isMobile" i18n="@@shared.add"> Add </ng-container>
</button>
<mat-menu #menuAdd="matMenu">
<ng-container *ngIf="type === 'education' || type === 'qualification'">
Expand Down Expand Up @@ -186,7 +185,7 @@ <h3 class="activity-header orc-font-body-large">
[disabled]="!currentAmount && !total"
>
<mat-icon class="large-material-icon"> sort </mat-icon>
<ng-container i18n="@@shared.sort"> Sort </ng-container>
<ng-container *ngIf="!isMobile" i18n="@@shared.sort"> Sort </ng-container>
</button>
<mat-menu #menu="matMenu">
<button
Expand Down
9 changes: 9 additions & 0 deletions src/app/cdk/panel/panels/panels.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,25 @@
.text-container {
margin-bottom: 5px;
margin-top: 5px;
h3 {
span {
font-weight: normal;
}
}
}
}
.controls {
display: flex;

button {
min-width: 40px;
font-weight: normal;
padding: 0 6px;

mat-icon {
font-size: 32px;
height: 32px;
width: 32px;
margin-right: 8px;
margin-bottom: 2px;
}
Expand Down
4 changes: 4 additions & 0 deletions src/app/cdk/panel/panels/panels.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export class PanelsComponent implements OnInit {
@Input() labelExportButton = $localize`:@@shared.exportItems:Export Items`
@Input() labelSortButton = $localize`:@@shared.addItem:Add Item`
IS_QA: boolean
isMobile: boolean

ariaLabelAscending = $localize`:@@shared.ariaLabelAscending:Ascending`
ariaLabelDescending = $localize`:@@shared.ariaLabelDescending:Descending`
Expand Down Expand Up @@ -178,6 +179,9 @@ export class PanelsComponent implements OnInit {
}

ngOnInit(): void {
this._platform.get().subscribe((platform) => {
this.isMobile = platform.columns4 || platform.columns8
})
this.IS_QA = isQA()
}
}

0 comments on commit a51dfb7

Please sign in to comment.