This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="page">
|
||||
<div class="section-heading">
|
||||
<div>
|
||||
<h2>Publikationen</h2>
|
||||
<h6>Publikationen</h6>
|
||||
<p>Übersicht der wissenschaftlichen Veröffentlichungen.</p>
|
||||
</div>
|
||||
<div class="table-actions">
|
||||
@@ -25,19 +25,16 @@
|
||||
}
|
||||
|
||||
<table mat-table [dataSource]="publications" class="mat-elevation-z2">
|
||||
<ng-container matColumnDef="select">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<mat-checkbox aria-label="Alle Publikationen auswählen"></mat-checkbox>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let publication">
|
||||
<mat-checkbox aria-label="Publikation auswählen"></mat-checkbox>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef>Titel</th>
|
||||
<td mat-cell *matCellDef="let publication">
|
||||
<div class="title">{{ publication.title || 'Ohne Titel' }}</div>
|
||||
@if (doiUrl(publication.doi); as url) {
|
||||
<a class="title" [href]="url" target="_blank" rel="noopener">
|
||||
{{ publication.title || 'Ohne Titel' }}
|
||||
</a>
|
||||
} @else {
|
||||
<div class="title">{{ publication.title || 'Ohne Titel' }}</div>
|
||||
}
|
||||
<div class="authors">Becker, A.; Müller, T.; Zhang, L.</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -51,7 +48,9 @@
|
||||
<th mat-header-cell *matHeaderCellDef>Typ</th>
|
||||
<td mat-cell *matCellDef="let publication">
|
||||
@if (publication.type) {
|
||||
<mat-chip [class]="typeClass(publication.type)">{{ publication.type }}</mat-chip>
|
||||
<app-chip [color]="typeColor(publication.type)">
|
||||
{{ publication.type }}
|
||||
</app-chip>
|
||||
} @else {
|
||||
<span class="empty-text">-</span>
|
||||
}
|
||||
@@ -71,26 +70,15 @@
|
||||
<ng-container matColumnDef="topics">
|
||||
<th mat-header-cell *matHeaderCellDef>Themen</th>
|
||||
<td mat-cell *matCellDef="let publication">
|
||||
<mat-chip-set aria-label="Themen">
|
||||
<div class="topic-chips" aria-label="Themen">
|
||||
@for (topic of (publication.topics ?? []).slice(0, 3); track topic) {
|
||||
<mat-chip>{{ topic }}</mat-chip>
|
||||
<app-chip variant="outlined" color="primary">
|
||||
{{ topic }}
|
||||
</app-chip>
|
||||
} @empty {
|
||||
<span class="empty-text">-</span>
|
||||
}
|
||||
</mat-chip-set>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="doi">
|
||||
<th mat-header-cell *matHeaderCellDef>DOI</th>
|
||||
<td mat-cell *matCellDef="let publication">
|
||||
@if (doiUrl(publication.doi); as url) {
|
||||
<a class="row-link" [href]="url" target="_blank" rel="noopener" aria-label="DOI öffnen">
|
||||
<mat-icon>chevron_right</mat-icon>
|
||||
</a>
|
||||
} @else {
|
||||
<span class="empty-text">-</span>
|
||||
}
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<WorkPage> {
|
||||
return this.worksApi.getAuthorWorks(authorId, page, size);
|
||||
return this.worksApi.getAuthorWorks('A5023888391', page, size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,18 +33,20 @@
|
||||
<div class="account-card">
|
||||
<div class="avatar">M</div>
|
||||
<div>
|
||||
<strong>{{ (credentialService.login | async) || 'Max Mustermann' }}</strong>
|
||||
<strong>{{
|
||||
(credentialService.login | async) || "Max Mustermann"
|
||||
}}</strong>
|
||||
<span>Startup Coach</span>
|
||||
</div>
|
||||
<mat-icon>expand_more</mat-icon>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-actions">
|
||||
<a mat-list-item routerLink="/settings" class="utility-link">
|
||||
<mat-icon matListItemIcon>settings</mat-icon>
|
||||
<span matListItemTitle>Einstellungen</span>
|
||||
</a>
|
||||
<button class="utility-link" type="button" (click)="credentialService.logoutAcount()">
|
||||
<button
|
||||
class="utility-link"
|
||||
type="button"
|
||||
(click)="credentialService.logoutAcount()"
|
||||
>
|
||||
<mat-icon>logout</mat-icon>
|
||||
<span>Abmelden</span>
|
||||
</button>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<ng-content></ng-content>
|
||||
@@ -0,0 +1,22 @@
|
||||
:host {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
min-height: 28px;
|
||||
padding: 4px 12px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 7px;
|
||||
background: color-mix(in srgb, var(--chip-color) 12%, #ffffff);
|
||||
color: var(--chip-color);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 1.2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:host(.outlined) {
|
||||
border-color: color-mix(in srgb, var(--chip-color) 42%, #ffffff);
|
||||
background: #ffffff;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Component, HostBinding, Input } from '@angular/core';
|
||||
|
||||
type ChipVariant = 'normal' | 'outlined';
|
||||
type ChipColor =
|
||||
| 'primary'
|
||||
| 'secondary'
|
||||
| 'success'
|
||||
| 'info'
|
||||
| 'warn'
|
||||
| 'help'
|
||||
| 'danger'
|
||||
| 'contrast'
|
||||
| string;
|
||||
|
||||
const CHIP_COLORS: Record<string, string> = {
|
||||
primary: '#111827',
|
||||
secondary: '#64708f',
|
||||
success: '#22c55e',
|
||||
info: '#0ea5e9',
|
||||
warn: '#f97316',
|
||||
help: '#a855f7',
|
||||
danger: '#ef4444',
|
||||
contrast: '#101a3d',
|
||||
};
|
||||
|
||||
@Component({
|
||||
selector: 'app-chip',
|
||||
templateUrl: './chip.component.html',
|
||||
styleUrl: './chip.component.scss',
|
||||
standalone: true,
|
||||
})
|
||||
export class ChipComponent {
|
||||
@Input() variant: ChipVariant = 'normal';
|
||||
@Input() color: ChipColor = 'primary';
|
||||
|
||||
@HostBinding('class.outlined')
|
||||
get outlined(): boolean {
|
||||
return this.variant === 'outlined';
|
||||
}
|
||||
|
||||
@HostBinding('style.--chip-color')
|
||||
get chipColor(): string {
|
||||
return CHIP_COLORS[this.color] ?? this.color;
|
||||
}
|
||||
}
|
||||
+36
-36
@@ -1,48 +1,49 @@
|
||||
// Custom Theming for Angular Material
|
||||
// For more information: https://material.angular.io/guide/theming
|
||||
@use '@angular/material' as mat;
|
||||
@use 'm3-theme' as m3;
|
||||
@use "@angular/material" as mat;
|
||||
@use "m3-theme" as m3;
|
||||
|
||||
@include mat.elevation-classes();
|
||||
@include mat.app-background();
|
||||
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Montserrat';
|
||||
font-family: "Montserrat";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('assets/fonts/montserrat-v26-latin-regular.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Montserrat';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: url('assets/fonts/montserrat-v26-latin-italic.woff2') format('woff2');
|
||||
src: url("assets/fonts/montserrat-v26-latin-regular.woff2") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('assets/fonts/open-sans-v40-latin-regular.woff2') format('woff2');
|
||||
}
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Open Sans';
|
||||
font-family: "Montserrat";
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: url('assets/fonts/open-sans-v40-latin-italic.woff2') format('woff2');
|
||||
src: url("assets/fonts/montserrat-v26-latin-italic.woff2") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: 'Material Icons';
|
||||
font-display: swap;
|
||||
font-family: "Open Sans";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url('assets/fonts/material-icons-v142-latin-regular.woff2') format('woff2');
|
||||
src: url("assets/fonts/open-sans-v40-latin-regular.woff2") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: "Open Sans";
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: url("assets/fonts/open-sans-v40-latin-italic.woff2") format("woff2");
|
||||
}
|
||||
@font-face {
|
||||
font-display: swap;
|
||||
font-family: "Material Icons";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url("assets/fonts/material-icons-v142-latin-regular.woff2")
|
||||
format("woff2");
|
||||
}
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-family: "Material Icons";
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px;
|
||||
@@ -58,7 +59,8 @@
|
||||
}
|
||||
|
||||
html {
|
||||
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
||||
padding: env(safe-area-inset-top) env(safe-area-inset-right)
|
||||
env(safe-area-inset-bottom) env(safe-area-inset-left);
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
@include mat.all-component-themes(m3.$light-theme);
|
||||
@@ -69,7 +71,7 @@ body {
|
||||
margin: 0;
|
||||
background: #ffffff;
|
||||
color: #101a3d;
|
||||
font-family: 'Open Sans', Arial, sans-serif;
|
||||
font-family: "Open Sans", Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
@@ -84,14 +86,15 @@ body {
|
||||
--sg-text: #101a3d;
|
||||
--sg-text-muted: #64708f;
|
||||
--sg-text-soft: #8a95b3;
|
||||
--sg-primary: #0057ff;
|
||||
--sg-primary-strong: #0047d6;
|
||||
--sg-primary-soft: #eef4ff;
|
||||
--sg-primary: #0b1020;
|
||||
--sg-primary-strong: #030712;
|
||||
--sg-primary-soft: #f1f3f7;
|
||||
--sg-success: #12864e;
|
||||
--sg-success-soft: #e9f9f0;
|
||||
--sg-warning-soft: #f4ecff;
|
||||
--sg-warning: #6c3bd2;
|
||||
--sg-shadow-sm: 0 1px 2px rgba(16, 26, 61, 0.04), 0 1px 8px rgba(16, 26, 61, 0.04);
|
||||
--sg-shadow-sm:
|
||||
0 1px 2px rgba(16, 26, 61, 0.04), 0 1px 8px rgba(16, 26, 61, 0.04);
|
||||
--sg-shadow-md: 0 12px 32px rgba(16, 26, 61, 0.08);
|
||||
--sg-sidebar-width: 280px;
|
||||
--sg-radius-sm: 8px;
|
||||
@@ -120,7 +123,7 @@ input {
|
||||
.mat-mdc-raised-button,
|
||||
.mat-mdc-outlined-button,
|
||||
.mat-mdc-unelevated-button {
|
||||
font-family: 'Open Sans', Arial, sans-serif;
|
||||
font-family: "Open Sans", Arial, sans-serif;
|
||||
}
|
||||
|
||||
.mat-mdc-list-item,
|
||||
@@ -135,12 +138,10 @@ h1,
|
||||
h2,
|
||||
h3 {
|
||||
color: var(--sg-text);
|
||||
font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
|
||||
font-family: "Montserrat", "Open Sans", Arial, sans-serif;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.primary-button {
|
||||
@include mat.button-color(m3.$light-theme, $color-variant: primary);
|
||||
}
|
||||
@@ -160,8 +161,7 @@ h3 {
|
||||
@include mat.icon-color(m3.$light-theme, $color-variant: tertiary);
|
||||
}
|
||||
|
||||
|
||||
.menu button {
|
||||
--mat-icon-button-disabled-icon-color: rgba(255,255,255,0.35);
|
||||
--mat-icon-button-disabled-icon-color: rgba(255, 255, 255, 0.35);
|
||||
--mat-icon-button-icon-color: #ffffff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user