use country-flag component in person card

This commit is contained in:
2026-08-03 21:19:00 +02:00
parent 53a36e7974
commit c31aef4131
3 changed files with 9 additions and 12 deletions
@@ -86,12 +86,11 @@
>{{ inst.display_name ?? '' }}</span
>
@if (inst.country_code && !loading()) {
<img
alt=""
class="flag-img"
[src]="`https://flagcdn.io/${inst.country_code.toLowerCase()}.svg`"
height="10"
style="margin-left: 6px; vertical-align: middle" />
<app-country-flag
[countryCode]="inst.country_code"
[height]="10"
[bordered]="false"
style="margin-left: 6px" />
<span
class="country-code"
style="font-size: 9px; margin-left: 2px; vertical-align: middle"
@@ -174,8 +174,9 @@
flex: 1;
}
.flag-img {
app-country-flag {
flex-shrink: 0;
border: 1px solid;
}
.country-code {
@@ -242,11 +243,6 @@
}
}
.flag-img {
border: 1px solid;
vertical-align: middle;
}
.person-id {
margin: 2px 0 0;
font-size: 10px;
@@ -6,6 +6,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
import { CustomAuthor, DehydratedInstitution, WorkTopic } from '../../api';
import { SkTextDirective } from '../../custom-directives/sk-text.directive';
import { TopicChipComponent } from '../../shared/ui/topic-chip/topic-chip.component';
import { CountryFlagComponent } from '../../shared/ui/country-flag/country-flag.component';
import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
@Component({
@@ -18,6 +19,7 @@ import { topicHierarchyColor } from '../../resolvers/utils/topic-colors';
SkTextDirective,
MatTooltipModule,
TopicChipComponent,
CountryFlagComponent,
],
templateUrl: './person-card.component.html',
styleUrl: './person-card.component.scss',