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

Add ellipsis workshop card #690

Merged
merged 4 commits into from
Nov 30, 2021
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 @@ -15,7 +15,7 @@
<div>
<mat-card-header>
<mat-card-title [matTooltip]="childFullName" showTooltipIfTruncated matTooltipClass="tooltip"
[matTooltipPosition]="below">{{child.lastName}} {{child.firstName}} {{child.middleName}}</mat-card-title>
[matTooltipPosition]="below" class="card-title">{{child.lastName}} {{child.firstName}} {{child.middleName}}</mat-card-title>
</mat-card-header>
<mat-card-content fxLayout="column" fxLayoutAlign="space-between start">
<p class="card_text">
Expand All @@ -26,12 +26,12 @@ <h5 class="card_text card_text_bold">
<mat-icon class="card_icon">apps</mat-icon>Гуртки
</h5>
<div *ngIf="applications?.length; else NoWorkshops ">
<div fxLayout="row" fxLayoutAlign="end start">
<div [routerLink]="['/workshop-details', application.workshop.workshopId]"
class="card-list card-list-workshop" *ngFor="let application of applications">
class="card-list card-list-workshop" *ngFor="let application of applications"
[matTooltip]="application.workshop.title" showTooltipIfTruncated matTooltipClass="tooltip"
[matTooltipPosition]="below">
{{application.workshop.title}}
</div>
</div>
</div>
</mat-card-content>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="wrap-for-details">
<mat-card-header>
<mat-card-title [matTooltip]="workshop.title" showTooltipIfTruncated matTooltipClass="tooltip"
[matTooltipPosition]="below">{{workshop.title}}</mat-card-title>
[matTooltipPosition]="below" class="card-title">{{workshop.title}}</mat-card-title>
</mat-card-header>

<mat-card-content fxLayout="column" fxLayoutAlign="space-between">
Expand Down Expand Up @@ -82,13 +82,16 @@
(click)="onWorkshopLeave()">Залишити гурток
</p>
</div>

<p class="card_text">
<mat-icon class="card_icon">star</mat-icon> {{ workshop.rating }}
</p>
<p class="card_text">
<mat-icon class="card_icon">home</mat-icon>{{ workshop.providerTitle }}
</p>
<div class="card_text">
<mat-icon class="card_icon">home</mat-icon>
<p class="card_text_label" [matTooltip]="workshop.providerTitle"
showTooltipIfTruncated matTooltipClass="tooltip"
[matTooltipPosition]="below">{{ workshop.providerTitle }}</p>
</div>
<p class="card_text" [ngClass]="isCreateApplicationView ? 'hide': ''">
<mat-icon class="card_icon">person</mat-icon>{{ workshop.minAge }} - {{ workshop.maxAge }} років
</p>
Expand All @@ -100,9 +103,12 @@
{{ workshop.isPerMonth
? 'місяць' : 'заняття' }}
</p>
<p class="card_text">
<div class="card_text">
<mat-icon class="card_icon">location_on</mat-icon>
{{workshop.address.city}},
{{workshop.address.street}}, {{workshop.address.buildingNumber}}
</p>
<p class="card_text_label" [matTooltip]="workshop.address.city + ', ' + workshop.address.street + ', ' +
workshop.address.buildingNumber"
showTooltipIfTruncated matTooltipClass="tooltip"
[matTooltipPosition]="below">{{workshop.address.city}},
{{workshop.address.street}}, {{workshop.address.buildingNumber}}</p>
</div>
</ng-template>
35 changes: 26 additions & 9 deletions src/app/shared/styles/cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@

&_link {
color: #3849F9;
font-family: Innerspace;
font-weight: 700;
font-style: normal;
font-size: 13px;

.arrow {
margin: 1rem;
Expand All @@ -43,14 +46,17 @@

&-list {
color: #3849F9;
font-weight: 700;
margin-left: 2rem;
margin: 1rem 0 1rem 2rem;
padding: 0;
}
&-list-workshop{
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&:hover {
cursor: pointer;
}
}
}

&_text {
Expand All @@ -65,6 +71,15 @@
color: #333333;
margin: 0.3rem;
padding: 0;
min-width: 0;

&_label{
margin: 0;
width: 200px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

&_bold{
font-weight: bold;
Expand All @@ -83,7 +98,7 @@

color: #AAAAAA;
margin-right: 0.2rem;
font-size: 20px;
font-size: 16px;

&_blue{
color: #3849F9;
Expand Down Expand Up @@ -168,12 +183,14 @@
.mat-card {
padding: 0;
}
.mat-card-content,
.mat-card-footer{
margin: 0 1rem !important;
.mat-card-content {
margin: 0 1.5rem !important;
}
.mat-card-footer {
margin: 1.5rem 1.5rem 0 1.5rem !important;
}
.mat-card-header{
margin:0 1rem !important;
.mat-card-header {
margin: 0 1rem !important;
display: flex;
justify-content: space-between;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/styles/side-menu-cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
.card_icon {
position: relative;
color: #AAAAAA;
font-size: 20px;
font-size: 16px;
}
a {
color: #3849F9;
Expand Down