feat(frontend): add static llm generated bio to profile

This commit is contained in:
Steven Tischer
2026-05-28 14:23:08 +02:00
parent a33e38eebb
commit 45e02a72b4
3 changed files with 78 additions and 14 deletions
@@ -26,14 +26,25 @@
</div>
</div>
<aside class="interest-card">
<h3>Interessant für</h3>
<div class="interest-tags">
<span>KI & Machine Learning</span>
<span>Datenanalyse</span>
<span>Industrie 4.0</span>
<span>Nachhaltigkeit</span>
<span>Smart Systems</span>
<aside class="sidebar">
<div class="interest-card">
<h3>Interessant für</h3>
<div class="interest-tags">
<span>KI & Machine Learning</span>
<span>Datenanalyse</span>
<span>Industrie 4.0</span>
<span>Nachhaltigkeit</span>
<span>Smart Systems</span>
</div>
</div>
<div class="bio-card">
<h3>Biografie</h3>
@if (isBioLoading) {
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
} @else {
<p>{{ personBio }}</p>
}
</div>
</aside>
</section>
@@ -97,20 +97,39 @@
font-weight: 600;
}
.interest-card {
align-self: center;
.sidebar {
display: flex;
flex-direction: column;
gap: 24px;
}
.interest-card,
.bio-card {
padding: 24px 28px;
border-radius: var(--sg-radius-sm);
background: var(--sg-surface-muted);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.interest-card h3 {
.interest-card h3,
.bio-card h3 {
margin: 0 0 18px;
font-size: 14px;
font-weight: 700;
}
.bio-card p {
margin: 0;
color: var(--sg-text);
font-size: 14px;
line-height: 1.5;
}
.bio-card mat-progress-bar {
margin: -24px -28px 18px -28px;
border-radius: var(--sg-radius-sm) var(--sg-radius-sm) 0 0;
}
.interest-tags {
display: flex;
flex-wrap: wrap;
@@ -168,6 +187,16 @@
.profile-contact {
grid-column: 2;
}
.sidebar {
flex-direction: row;
gap: 20px;
}
.interest-card,
.bio-card {
flex: 1;
}
}
@media (max-width: 720px) {
@@ -1,15 +1,18 @@
import { Component } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { MatIconModule } from '@angular/material/icon';
import { MatTabsModule } from '@angular/material/tabs';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { RouterModule, RouterOutlet } from '@angular/router';
import { CommonModule } from '@angular/common';
import { PersonsOpenApiService } from '../../api/api/persons.service';
@Component({
selector: 'app-person',
imports: [MatIconModule, MatTabsModule, RouterOutlet, RouterModule],
imports: [MatIconModule, MatTabsModule, MatProgressBarModule, RouterOutlet, RouterModule, CommonModule],
templateUrl: './person.component.html',
styleUrl: './person.component.scss',
})
export class PersonComponent {
export class PersonComponent implements OnInit {
links = [
{ label: 'Übersicht', path: 'overview', disabled: false },
{ label: 'Projekte', path: 'projects', disabled: true },
@@ -17,4 +20,25 @@ export class PersonComponent {
{ label: 'Netzwerk', path: 'network', disabled: false },
{ label: 'Gründungen', path: 'foundings', disabled: true },
];
personBio: string = '';
isBioLoading: boolean = false;
constructor(private personsService: PersonsOpenApiService) {}
ngOnInit(): void {
const exampleAuthorId = 'A5093075883';
this.isBioLoading = true;
this.personsService.generatePersonBio(exampleAuthorId).subscribe({
next: (result) => {
this.personBio = result.bio;
this.isBioLoading = false;
},
error: (error) => {
console.error('Error loading person bio:', error);
this.personBio = 'Bio konnte nicht geladen werden.';
this.isBioLoading = false;
}
});
}
}