diff --git a/webapp/src/app/modules/dashboard/dashboard.component.html b/webapp/src/app/modules/dashboard/dashboard.component.html index ffa6554d..8629679a 100644 --- a/webapp/src/app/modules/dashboard/dashboard.component.html +++ b/webapp/src/app/modules/dashboard/dashboard.component.html @@ -205,7 +205,7 @@ [disabled]="!canScrollAnalyticalInstitutionTabsLeft" aria-label="Vorherige Institutionen anzeigen" (click)="scrollAnalyticalInstitutionTabs(-1)"> - chevron_left + {{ CHEVRON_LEFT_ICON }}
- chevron_right + {{ CHEVRON_RIGHT_ICON }}
@if (dashboardInstitutionsError) { diff --git a/webapp/src/app/modules/dashboard/dashboard.component.ts b/webapp/src/app/modules/dashboard/dashboard.component.ts index 827c12fe..bc185919 100644 --- a/webapp/src/app/modules/dashboard/dashboard.component.ts +++ b/webapp/src/app/modules/dashboard/dashboard.component.ts @@ -20,6 +20,8 @@ import { ACCOUNT_BALANCE_ICON, ACCOUNT_TREE_ICON, ARTICLE_ICON, + CHEVRON_LEFT_ICON, + CHEVRON_RIGHT_ICON, DESCRIPTION_ICON, GROUPS_ICON, MENU_BOOK_ICON, @@ -102,6 +104,9 @@ export class DashboardComponent implements OnInit, AfterViewInit { readonly AuthorTooltipComponent = AppAuthorTooltipComponent; readonly patentIcon = PATENT_ICON; + readonly PATENT_ICON = PATENT_ICON; + readonly CHEVRON_LEFT_ICON = CHEVRON_LEFT_ICON; + readonly CHEVRON_RIGHT_ICON = CHEVRON_RIGHT_ICON; readonly MENU_BOOK_ICON = MENU_BOOK_ICON; readonly GROUPS_ICON = GROUPS_ICON; readonly PUBLIC_ICON = PUBLIC_ICON; diff --git a/webapp/src/app/modules/institution-patents/institution-patents.component.html b/webapp/src/app/modules/institution-patents/institution-patents.component.html index 3a3a40d8..ed0ff933 100644 --- a/webapp/src/app/modules/institution-patents/institution-patents.component.html +++ b/webapp/src/app/modules/institution-patents/institution-patents.component.html @@ -25,7 +25,7 @@ - + {{ RULE_ICON }} @@ -42,7 +42,7 @@ - + {{ SORT_ICON }} diff --git a/webapp/src/app/modules/keywords-search/keywords-patents/keywords-patents.component.html b/webapp/src/app/modules/keywords-search/keywords-patents/keywords-patents.component.html index 9de1f52e..bfb93778 100644 --- a/webapp/src/app/modules/keywords-search/keywords-patents/keywords-patents.component.html +++ b/webapp/src/app/modules/keywords-search/keywords-patents/keywords-patents.component.html @@ -19,7 +19,7 @@ - + {{ SORT_ICON }} diff --git a/webapp/src/app/modules/person-card/person-card.component.html b/webapp/src/app/modules/person-card/person-card.component.html index 21633c95..1f8906ee 100644 --- a/webapp/src/app/modules/person-card/person-card.component.html +++ b/webapp/src/app/modules/person-card/person-card.component.html @@ -51,52 +51,13 @@
@if (institution(); as inst) {
- +
} diff --git a/webapp/src/app/modules/person-card/person-card.component.scss b/webapp/src/app/modules/person-card/person-card.component.scss index fb46ab44..da6232db 100644 --- a/webapp/src/app/modules/person-card/person-card.component.scss +++ b/webapp/src/app/modules/person-card/person-card.component.scss @@ -136,111 +136,6 @@ overflow: hidden; text-overflow: ellipsis; } -.institution { - display: flex; - align-items: center; - gap: 6px; - margin: 0; - font-size: 12px; - color: var(--sg-text-muted); - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.institution-tag { - background: var(--sg-primary-soft); - border: 1px solid var(--sg-primary-border, var(--sg-border)); - color: var(--sg-primary); - font-size: 10px; - font-weight: 600; - padding: 2px 6px; - border-radius: 4px; - cursor: pointer; - display: inline-flex; - align-items: center; - transition: all 0.2s ease; - max-width: 100%; - box-sizing: border-box; - margin: 0; - line-height: normal; - font-family: inherit; - - .institution-name { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - min-width: 0; - flex: 1; - } - - app-country-flag { - flex-shrink: 0; - } - - .country-code { - display: inline-block; - flex-shrink: 0; - white-space: nowrap; - } - - .institution-open-icon { - flex-shrink: 0; - width: 12px; - height: 12px; - margin-left: 5px; - font-size: 12px; - line-height: 1; - vertical-align: middle; - cursor: pointer; - opacity: 0; - transition: opacity 0.15s ease; - - &:hover { - opacity: 1; - } - } - - &:hover .institution-open-icon { - opacity: 0.7; - - &:hover { - opacity: 1; - } - } - - &:hover, - &:focus-visible { - background: var(--sg-primary); - color: var(--sg-background); - border-color: var(--sg-primary); - outline: none; - box-shadow: - 0 0 0 2px var(--sg-background), - 0 0 0 4px var(--sg-primary); - } - - &.active { - border-color: var(--sg-primary); - box-shadow: - 0 0 0 1px var(--sg-background), - 0 0 0 3px var(--sg-primary); - } - - &.active:hover, - &.active:focus-visible { - background: var(--sg-primary); - color: var(--sg-background); - } - - &.is-loading { - pointer-events: none; - background: var(--sg-surface-soft); - border-color: var(--sg-border); - color: var(--sg-text-soft); - box-shadow: none; - } -} .person-id { margin: 2px 0 0; diff --git a/webapp/src/app/modules/person-card/person-card.component.ts b/webapp/src/app/modules/person-card/person-card.component.ts index 0dacd32e..14a3cfe2 100644 --- a/webapp/src/app/modules/person-card/person-card.component.ts +++ b/webapp/src/app/modules/person-card/person-card.component.ts @@ -1,20 +1,18 @@ -import { Component, inject, input, computed, output } from '@angular/core'; +import { Component, input, computed, output } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { Router, RouterLink } from '@angular/router'; +import { RouterLink } from '@angular/router'; import { MatIconModule } from '@angular/material/icon'; 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 { AppInstitutionChipComponent } from '../../shared/ui/app-institution-chip/app-institution-chip.component'; import { CareerStageChipComponent } from '../../shared/ui/career-stage-chip/career-stage-chip.component'; import { topicHierarchyColor } from '../../resolvers/utils/topic-colors'; import { - APARTMENT_ICON, BOOKMARK_BORDER_ICON, BOOKMARK_ICON, NETWORK_ICON, - OPEN_IN_NEW_ICON, OVERVIEW_ICON, PUBLICATION_ICON, } from '../../shared/ui/icons'; @@ -29,7 +27,7 @@ import { SkTextDirective, MatTooltipModule, TopicChipComponent, - CountryFlagComponent, + AppInstitutionChipComponent, CareerStageChipComponent, ], templateUrl: './person-card.component.html', @@ -38,14 +36,10 @@ import { export class PersonCardComponent { readonly BOOKMARK_ICON = BOOKMARK_ICON; readonly BOOKMARK_BORDER_ICON = BOOKMARK_BORDER_ICON; - readonly APARTMENT_ICON = APARTMENT_ICON; - readonly OPEN_IN_NEW_ICON = OPEN_IN_NEW_ICON; readonly OVERVIEW_ICON = OVERVIEW_ICON; readonly PUBLICATION_ICON = PUBLICATION_ICON; readonly NETWORK_ICON = NETWORK_ICON; - private readonly router = inject(Router); - person = input.required(); isBookmarked = input(false); loading = input(false); @@ -89,20 +83,6 @@ export class PersonCardComponent { return newestInstitution; }); - institutionPageId = computed( - () => this.institution()?.id?.split('/').pop() ?? null, - ); - - openInstitutionPage(event: Event): void { - event.stopPropagation(); - event.preventDefault(); - - const id = this.institutionPageId(); - if (!id) return; - - void this.router.navigate(['/institution', id]); - } - isInstitutionActive = computed(() => { const active = this.normalizeInstitutionId(this.activeInstitutionId()); if (!active) return false; diff --git a/webapp/src/app/modules/person-funding/person-funding.component.html b/webapp/src/app/modules/person-funding/person-funding.component.html index f968c24d..cecb84c9 100644 --- a/webapp/src/app/modules/person-funding/person-funding.component.html +++ b/webapp/src/app/modules/person-funding/person-funding.component.html @@ -17,7 +17,7 @@ - + {{ FILTER_ICON }} @@ -31,7 +31,7 @@ - + {{ SORT_ICON }} diff --git a/webapp/src/app/modules/person-patents/person-patents.component.html b/webapp/src/app/modules/person-patents/person-patents.component.html index 1ee63846..ceb0e87d 100644 --- a/webapp/src/app/modules/person-patents/person-patents.component.html +++ b/webapp/src/app/modules/person-patents/person-patents.component.html @@ -19,7 +19,7 @@ - + {{ SORT_ICON }} diff --git a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.html b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.html deleted file mode 100644 index 059525c8..00000000 --- a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.html +++ /dev/null @@ -1,5 +0,0 @@ -
diff --git a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.scss b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.scss deleted file mode 100644 index f51d8c68..00000000 --- a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.chart-container { - height: 500px; - width: 100%; -} diff --git a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.ts b/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.ts deleted file mode 100644 index cb123796..00000000 --- a/webapp/src/app/modules/university-ranking/uni-line-chart/uni-line-chart.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { - Component, - ChangeDetectionStrategy, - input, - computed, -} from '@angular/core'; -import { EChartsOption } from 'echarts'; -import { NgxEchartsDirective } from 'ngx-echarts'; -import { UniversityTopicData } from '../../../api'; - -export type DashboardMetric = 'publications' | 'citations'; - -@Component({ - selector: 'app-university-line-chart', - templateUrl: './uni-line-chart.component.html', - styleUrl: './uni-line-chart.component.scss', - imports: [NgxEchartsDirective], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class UniversityLineChartComponent { - readonly data = input(null); - readonly metric = input('publications'); - - readonly chartOption = computed(() => { - const rawData = this.data(); - if (!rawData || rawData.length === 0) { - return {}; - } - - const years = rawData[0].yearly_data.map((d) => d.year); - const chosenMetric = this.metric(); - - const series = rawData.map((uni) => ({ - name: uni.university, - type: 'line', - smooth: true, - emphasis: { focus: 'series' }, - animationDuration: 2000, - data: uni.yearly_data.map((d) => { - if (chosenMetric === 'citations') { - return d.citations || 0; - } - return d.publications || 0; - }), - })); - - return { - title: { - text: 'Research Output Over Time', - left: 'center', - textStyle: { fontWeight: 'lighter' }, - }, - tooltip: { trigger: 'axis', axisPointer: { type: 'shadow' } }, - legend: { bottom: 0 }, - grid: { left: '3%', right: '4%', bottom: '15%', containLabel: true }, - xAxis: { - type: 'category', - boundaryGap: false, - data: years.map(String), - }, - yAxis: { - type: 'value', - name: chosenMetric === 'citations' ? 'Citations' : 'Publications', - }, - dataZoom: [{ type: 'slider', show: true, bottom: 40 }], - series: series as any, - }; - }); -} diff --git a/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.html b/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.html deleted file mode 100644 index 99da5bcb..00000000 --- a/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.html +++ /dev/null @@ -1,42 +0,0 @@ -
-

Topic Rankings

- @if (loading) { -
Loading rankings...
- } @else { - - - - - - - - - - - - @for (row of rankings; track $index) { - - - - - - - - } - -
RankUniversityLatest5Y GrowthTrend
#{{ row.rank }} - {{ row.university }} - @if (row.is_top_mover) { - 🔥 - } - {{ row.publications | number }} - {{ row.growth_rate | number: '1.0-1' }}% - - {{ getTrendIcon(row.trend) }} -
- } -
diff --git a/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.scss b/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.ts b/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.ts deleted file mode 100644 index 05db1334..00000000 --- a/webapp/src/app/modules/university-ranking/uni-ranking-table/uni-ranking-table.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -// src/app/modules/university-ranking/components/ranking-table/university-ranking-table.component.ts -import { Component, Input } from '@angular/core'; -import { UniversityRanking } from '../../../api'; -import { DecimalPipe } from '@angular/common'; - -@Component({ - selector: 'app-university-ranking-table', - templateUrl: './uni-ranking-table.component.html', - styleUrls: ['./uni-ranking-table.component.scss'], - imports: [DecimalPipe], -}) -export class UniversityRankingTableComponent { - @Input() rankings: UniversityRanking[] = []; - @Input() loading: boolean = false; - - getTrendIcon(trend: string): string { - if (trend === 'up') return '↑'; - if (trend === 'down') return '↓'; - return '→'; - } -} diff --git a/webapp/src/app/shared/ui/query-param-selector/query-param-selector.component.html b/webapp/src/app/shared/ui/query-param-selector/query-param-selector.component.html index ad4e23c8..9cd5dfb4 100644 --- a/webapp/src/app/shared/ui/query-param-selector/query-param-selector.component.html +++ b/webapp/src/app/shared/ui/query-param-selector/query-param-selector.component.html @@ -3,7 +3,7 @@ {{ label() }} } @if (icon()) { - + {{ icon() }} } @if (icon()) { - + {{ icon() }} } - + {{ FILTER_ICON }}