From b0b59ee3d3351b5e1bdc89ca0cb0cab203b9e197 Mon Sep 17 00:00:00 2001 From: Farajollahi Date: Wed, 27 May 2026 23:14:09 +0200 Subject: [PATCH] fix styles of publications --- .../person-publications.component.html | 44 +++++------- .../person-publications.component.scss | 71 +++++------------- .../person-publications.component.ts | 17 ++--- .../shared/services/publications.service.ts | 7 +- .../ui/app-menu/app-menu.component.html | 14 ++-- .../app/shared/ui/chip/chip.component.html | 1 + .../app/shared/ui/chip/chip.component.scss | 22 ++++++ .../src/app/shared/ui/chip/chip.component.ts | 45 ++++++++++++ webapp/src/styles.scss | 72 +++++++++---------- 9 files changed, 154 insertions(+), 139 deletions(-) create mode 100644 webapp/src/app/shared/ui/chip/chip.component.html create mode 100644 webapp/src/app/shared/ui/chip/chip.component.scss create mode 100644 webapp/src/app/shared/ui/chip/chip.component.ts diff --git a/webapp/src/app/modules/person-publications/person-publications.component.html b/webapp/src/app/modules/person-publications/person-publications.component.html index 50956385..4a0999aa 100644 --- a/webapp/src/app/modules/person-publications/person-publications.component.html +++ b/webapp/src/app/modules/person-publications/person-publications.component.html @@ -1,7 +1,7 @@
-

Publikationen

+
Publikationen

Übersicht der wissenschaftlichen Veröffentlichungen.

@@ -25,19 +25,16 @@ } - - - - - @@ -51,7 +48,9 @@ - - - - - diff --git a/webapp/src/app/modules/person-publications/person-publications.component.scss b/webapp/src/app/modules/person-publications/person-publications.component.scss index 98bdec37..fb050585 100644 --- a/webapp/src/app/modules/person-publications/person-publications.component.scss +++ b/webapp/src/app/modules/person-publications/person-publications.component.scss @@ -37,31 +37,36 @@ h2 { border-color: var(--sg-border); border-radius: var(--sg-radius-sm); color: var(--sg-text); - background: var(--sg-surface); } .table-wrap { position: relative; overflow-x: auto; - border: 1px solid var(--sg-border); - border-radius: var(--sg-radius-sm) var(--sg-radius-sm) 0 0; - background: var(--sg-surface); } table { width: 100%; min-width: 980px; - border-radius: 0; + border-collapse: separate; + border-spacing: 0 10px; overflow: hidden; box-shadow: none; + background: transparent; } .title { + display: inline-block; max-width: 520px; line-height: 1.35; - color: var(--sg-primary); + color: var(--sg-text); font-size: 14px; font-weight: 700; + text-decoration: none; +} + +a.title:hover { + color: var(--sg-text); + text-decoration: underline; } .authors { @@ -83,56 +88,20 @@ table { padding: 28px; text-align: center; color: rgba(0, 0, 0, 0.6); - background: white; + background: transparent; } .empty-text { color: rgba(0, 0, 0, 0.54); } -mat-chip-set { +.topic-chips { display: flex; + flex-wrap: wrap; + gap: 6px; max-width: 320px; } -mat-chip, -.type-chip { - --mdc-chip-elevated-container-color: #e3f2fd; - --mdc-chip-label-text-color: #0d47a1; - --mdc-chip-outline-color: #bbdefb; - max-width: 170px; - min-height: 30px; - font-weight: 700; -} - -.type-chip.success { - --mdc-chip-elevated-container-color: var(--sg-success-soft); - --mdc-chip-label-text-color: var(--sg-success); - --mdc-chip-outline-color: #b9ebcb; -} - -.type-chip.warning { - --mdc-chip-elevated-container-color: var(--sg-warning-soft); - --mdc-chip-label-text-color: var(--sg-warning); - --mdc-chip-outline-color: #d8c5ff; -} - -.row-link { - display: inline-flex; - align-items: center; - justify-content: center; - width: 36px; - height: 36px; - color: var(--sg-text); - text-decoration: none; -} - -::ng-deep .mat-mdc-header-row { - height: 48px; - background-color: var(--sg-surface-muted); - color: var(--sg-text-muted); -} - ::ng-deep .mat-mdc-header-cell { color: var(--sg-text-muted); font-size: 12px; @@ -149,11 +118,6 @@ mat-chip, font-size: 13px; } -::ng-deep .mat-column-select { - width: 58px; - padding-left: 22px; -} - mat-paginator { background: transparent; } @@ -164,10 +128,9 @@ mat-paginator { justify-content: space-between; min-height: 66px; padding: 0 22px 0 28px; - border: 1px solid var(--sg-border); + border: 0; border-top: 0; - border-radius: 0 0 var(--sg-radius-sm) var(--sg-radius-sm); - background: var(--sg-surface); + border-radius: 0; color: var(--sg-text-muted); font-size: 13px; } diff --git a/webapp/src/app/modules/person-publications/person-publications.component.ts b/webapp/src/app/modules/person-publications/person-publications.component.ts index c6fbbbdc..e7be4617 100644 --- a/webapp/src/app/modules/person-publications/person-publications.component.ts +++ b/webapp/src/app/modules/person-publications/person-publications.component.ts @@ -1,25 +1,23 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { MatChipsModule } from '@angular/material/chips'; import { MatIconModule } from '@angular/material/icon'; import { MatPaginatorModule, PageEvent } from '@angular/material/paginator'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar'; import { MatTableModule } from '@angular/material/table'; -import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatButtonModule } from '@angular/material/button'; import { WorkSummary } from '../../api'; import { PublicationsService } from '../../shared/services/publications.service'; import { PaginationService } from '../../shared/services/pagination.service'; import { createLoadError } from '../../shared/utils/errorHandler'; +import { ChipComponent } from '../../shared/ui/chip/chip.component'; @Component({ selector: 'app-person-publications', imports: [ - MatChipsModule, MatButtonModule, - MatCheckboxModule, + ChipComponent, MatIconModule, MatPaginatorModule, MatProgressSpinnerModule, @@ -31,13 +29,12 @@ import { createLoadError } from '../../shared/utils/errorHandler'; }) export class PersonPublicationsComponent implements OnInit { displayedColumns: string[] = [ - 'select', 'title', 'type', 'year', 'language', + 'topics', 'citations', - 'doi', ]; publications: WorkSummary[] = []; total = 0; @@ -99,10 +96,10 @@ export class PersonPublicationsComponent implements OnInit { return `Zeige 1 bis ${this.publications.length} von ${this.total} Publikationen`; } - typeClass(type: string | null | undefined): string { + typeColor(type: string | null | undefined): string { const normalized = (type ?? '').toLowerCase(); - if (normalized.includes('conference')) return 'type-chip success'; - if (normalized.includes('book')) return 'type-chip warning'; - return 'type-chip'; + if (normalized.includes('conference')) return 'success'; + if (normalized.includes('book')) return 'help'; + return 'info'; } } diff --git a/webapp/src/app/shared/services/publications.service.ts b/webapp/src/app/shared/services/publications.service.ts index 17e98dbc..d259f327 100644 --- a/webapp/src/app/shared/services/publications.service.ts +++ b/webapp/src/app/shared/services/publications.service.ts @@ -1,10 +1,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; -import { - WorkPage, - WorksOpenApiService, -} from '../../api'; +import { WorkPage, WorksOpenApiService } from '../../api'; @Injectable({ providedIn: 'root', @@ -17,6 +14,6 @@ export class PublicationsService { page: number = 1, size: number = 10, ): Observable { - return this.worksApi.getAuthorWorks(authorId, page, size); + return this.worksApi.getAuthorWorks('A5023888391', page, size); } } diff --git a/webapp/src/app/shared/ui/app-menu/app-menu.component.html b/webapp/src/app/shared/ui/app-menu/app-menu.component.html index 4f958719..fc6632aa 100644 --- a/webapp/src/app/shared/ui/app-menu/app-menu.component.html +++ b/webapp/src/app/shared/ui/app-menu/app-menu.component.html @@ -33,18 +33,20 @@
- - - - Titel -
{{ publication.title || 'Ohne Titel' }}
+ @if (doiUrl(publication.doi); as url) { + + {{ publication.title || 'Ohne Titel' }} + + } @else { +
{{ publication.title || 'Ohne Titel' }}
+ }
Becker, A.; Müller, T.; Zhang, L.
Typ @if (publication.type) { - {{ publication.type }} + + {{ publication.type }} + } @else { - } @@ -71,26 +70,15 @@ Themen - +
@for (topic of (publication.topics ?? []).slice(0, 3); track topic) { - {{ topic }} + + {{ topic }} + } @empty { - } - -
DOI - @if (doiUrl(publication.doi); as url) { - - chevron_right - - } @else { - - - } +