From aaead76390a160d33b6130c782d5307b7b032c40 Mon Sep 17 00:00:00 2001 From: louis-19041904 Date: Mon, 1 Jun 2026 00:18:05 +0200 Subject: [PATCH] Adapt research timeline to topic timeline data --- .../research-timeline.component.html | 75 ++++--- .../research-timeline.component.scss | 195 ++++++++++-------- .../research-timeline.component.ts | 90 ++++---- .../person-overview.component.html | 2 +- .../person-overview.component.ts | 172 ++++++++++++++- 5 files changed, 373 insertions(+), 161 deletions(-) diff --git a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html index fde6ab41..4f1fe51a 100644 --- a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html +++ b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.html @@ -4,7 +4,7 @@

Forschungstimeline

Entwicklung der Forschungsthemen im Zeitverlauf - (basierend auf Projekten und Publikationen) + (basierend auf Publikationen)

@@ -19,45 +19,56 @@ -
-
-
- {{ item.year }} - +
+
+ + +
+
+ {{ item.year }} + +
- -
+
+
+

{{ getMainTopic(item) }}

-
-
-

{{ item.title }}

- -
- - {{ keyword }} + + {{ item.publication_count }} + {{ item.publication_count === 1 ? 'Publikation' : 'Publikationen' }} -
-
+ +
+ + {{ topic.name }} + {{ topic.count }} + +
+
+
- Hauptforschungsschwerpunkte im jeweiligen Zeitraum + Die drei häufigsten Topics je Jahr, gezählt über Publikationen.
+ + +
+ Keine Timeline-Daten vorhanden. +
+
\ No newline at end of file diff --git a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.scss b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.scss index 2c641366..6fad9a1c 100644 --- a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.scss +++ b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.scss @@ -12,7 +12,7 @@ justify-content: space-between; align-items: flex-start; gap: 24px; - margin-bottom: 34px; + margin-bottom: 28px; h2 { margin: 0 0 6px; @@ -74,48 +74,28 @@ .timeline-wrapper { width: 100%; overflow-x: auto; - padding-top: 8px; + padding: 4px 0 8px; } -.timeline-line { +.timeline-inner { position: relative; - display: grid; - align-items: center; - min-width: 1000px; - margin: 0 32px 18px; - border-top: 2px solid #23395d; + padding: 0 34px 8px; } -.timeline-point { - position: relative; - transform: translateY(-50%); - text-align: center; - - .year { - position: absolute; - top: -28px; - left: 50%; - transform: translateX(-50%); - color: #15213f; - font-size: 14px; - font-weight: 600; - white-space: nowrap; - } - - .dot { - display: inline-block; - width: 12px; - height: 12px; - border: 3px solid #ffffff; - border-radius: 50%; - box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.1); - } -} - -.line-arrow { +.timeline-axis { position: absolute; - right: -2px; - top: -6px; + top: 34px; + left: 34px; + right: 34px; + height: 2px; + background: #23395d; +} + +.timeline-axis::after { + content: ""; + position: absolute; + top: -5px; + right: -10px; width: 0; height: 0; border-top: 6px solid transparent; @@ -123,43 +103,107 @@ border-left: 12px solid #23395d; } -.timeline-content { +.timeline-points { + position: relative; + z-index: 1; display: grid; - min-width: 1000px; - gap: 20px; + align-items: start; + min-height: 58px; } -.timeline-item { - text-align: center; +.timeline-point { + display: flex; + flex-direction: column; + align-items: center; + min-width: 0; - h3 { - min-height: 44px; - margin: 0 0 14px; - color: #07163d; - font-size: 15px; - font-weight: 600; - line-height: 1.35; + .year { + margin-bottom: 9px; + color: #15213f; + font-size: 14px; + font-weight: 700; + line-height: 18px; + white-space: nowrap; + } + + .dot { + width: 13px; + height: 13px; + border: 3px solid #ffffff; + border-radius: 50%; + box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.16); } } -.keyword-list { +.timeline-content { + display: grid; + gap: 0; + margin-top: 8px; +} + +.timeline-item { + min-width: 0; + padding: 0 16px; + text-align: center; + + h3 { + min-height: 42px; + margin: 0 0 8px; + color: #07163d; + font-size: 15px; + font-weight: 700; + line-height: 1.35; + overflow-wrap: anywhere; + } +} + +.publication-count { + display: block; + margin-bottom: 14px; + color: #68748f; + font-size: 12px; +} + +.topic-list { display: flex; flex-direction: column; align-items: center; gap: 8px; } -.keyword-chip { +.topic-chip { display: inline-flex; align-items: center; justify-content: center; + gap: 7px; width: fit-content; - max-width: 100%; - padding: 6px 12px; - border-radius: 7px; + max-width: 210px; + min-height: 34px; + padding: 6px 10px; + border-radius: 8px; font-size: 12px; font-weight: 500; - white-space: nowrap; + line-height: 1.25; +} + +.topic-name { + min-width: 0; + overflow-wrap: anywhere; +} + +.topic-count { + display: inline-flex; + flex: 0 0 auto; + align-items: center; + justify-content: center; + min-width: 18px; + height: 18px; + padding: 0 5px; + border-radius: 999px; + background: rgba(255, 255, 255, 0.78); + color: inherit; + font-size: 11px; + font-weight: 700; } .purple { @@ -192,31 +236,31 @@ } } -.keyword-chip.purple { +.topic-chip.purple { border: 1px solid #d8cafe; background: #f6f0ff; color: #7255d9; } -.keyword-chip.blue { +.topic-chip.blue { border: 1px solid #bdd4ff; background: #f0f6ff; color: #0b63ce; } -.keyword-chip.green { +.topic-chip.green { border: 1px solid #bdebcf; background: #effaf3; color: #24834f; } -.keyword-chip.orange { +.topic-chip.orange { border: 1px solid #ffd796; background: #fff7e8; color: #c67500; } -.keyword-chip.pink { +.topic-chip.pink { border: 1px solid #ffc7d7; background: #fff1f5; color: #d12f61; @@ -227,7 +271,7 @@ justify-content: center; align-items: center; gap: 10px; - margin-top: 24px; + margin-top: 22px; color: #68748f; font-size: 13px; } @@ -240,16 +284,13 @@ background: #52627f; } -@media (max-width: 1100px) { - .timeline-line { - display: none; - } - - .timeline-content { - min-width: 0; - grid-template-columns: repeat(3, 1fr) !important; - row-gap: 28px; - } +.empty-timeline { + display: flex; + min-height: 120px; + align-items: center; + justify-content: center; + color: #68748f; + font-size: 14px; } @media (max-width: 700px) { @@ -260,16 +301,4 @@ .timeline-header { flex-direction: column; } - - .timeline-content { - grid-template-columns: 1fr !important; - } - - .timeline-item { - text-align: left; - } - - .keyword-list { - align-items: flex-start; - } } \ No newline at end of file diff --git a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts index ff324de8..665acc45 100644 --- a/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts +++ b/webapp/src/app/modules/person-overview/components/research-timeline/research-timeline.component.ts @@ -1,11 +1,15 @@ import { CommonModule } from '@angular/common'; -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; -interface ResearchTimelineItem { +export interface TopicTimelineTopic { + name: string; + count: number; +} + +export interface TopicTimelineElement { year: number; - title: string; - keywords: string[]; - color: 'purple' | 'blue' | 'green' | 'orange' | 'pink'; + publication_count: number; + topics: TopicTimelineTopic[]; } @Component({ @@ -16,42 +20,42 @@ interface ResearchTimelineItem { styleUrls: ['./research-timeline.component.scss'], }) export class ResearchTimelineComponent { - timelineItems: ResearchTimelineItem[] = [ - { - year: 2014, - title: 'Datenanalyse und Statistik', - keywords: ['Datenanalyse', 'Statistik', 'Big Data'], - color: 'purple', - }, - { - year: 2016, - title: 'Maschinelles Lernen Grundlagen', - keywords: ['Machine Learning', 'Klassifikation', 'Feature Engineering'], - color: 'blue', - }, - { - year: 2018, - title: 'Deep Learning Anwendungen', - keywords: ['Deep Learning', 'Neuronale Netze', 'Bildverarbeitung'], - color: 'green', - }, - { - year: 2020, - title: 'KI in der Industrie', - keywords: ['Industrie 4.0', 'Predictive Analytics', 'Prozessoptimierung'], - color: 'orange', - }, - { - year: 2022, - title: 'Nachhaltige KI und Ethik', - keywords: ['Nachhaltigkeit', 'Responsible AI', 'Ethik'], - color: 'pink', - }, - { - year: 2024, - title: 'KI und Gesellschaft', - keywords: ['Smart Systems', 'Gesellschaft', 'Digitale Transformation'], - color: 'purple', - }, - ]; + @Input() elements: TopicTimelineElement[] = []; + + private readonly colors = ['purple', 'blue', 'green', 'orange', 'pink']; + private readonly columnWidth = 240; + + get timelineItems(): TopicTimelineElement[] { + return this.elements ?? []; + } + + get gridTemplateColumns(): string { + const count = Math.max(this.timelineItems.length, 1); + return `repeat(${count}, minmax(${this.columnWidth}px, 1fr))`; + } + + get timelineMinWidth(): number { + const count = Math.max(this.timelineItems.length, 1); + return Math.max(count * this.columnWidth, 1000); + } + + getTopTopics(item: TopicTimelineElement): TopicTimelineTopic[] { + return (item.topics ?? []).slice(0, 3); + } + + getMainTopic(item: TopicTimelineElement): string { + return this.getTopTopics(item)[0]?.name ?? 'Keine Topics'; + } + + getColorClass(index: number): string { + return this.colors[index % this.colors.length]; + } + + trackByYear(_: number, item: TopicTimelineElement): number { + return item.year; + } + + trackByTopic(_: number, topic: TopicTimelineTopic): string { + return topic.name; + } } \ No newline at end of file diff --git a/webapp/src/app/modules/person-overview/person-overview.component.html b/webapp/src/app/modules/person-overview/person-overview.component.html index fa007d36..8831e155 100644 --- a/webapp/src/app/modules/person-overview/person-overview.component.html +++ b/webapp/src/app/modules/person-overview/person-overview.component.html @@ -1,3 +1,3 @@
- +
\ No newline at end of file diff --git a/webapp/src/app/modules/person-overview/person-overview.component.ts b/webapp/src/app/modules/person-overview/person-overview.component.ts index e8891dd7..6416bbf3 100644 --- a/webapp/src/app/modules/person-overview/person-overview.component.ts +++ b/webapp/src/app/modules/person-overview/person-overview.component.ts @@ -1,5 +1,8 @@ import { Component } from '@angular/core'; -import { ResearchTimelineComponent } from './components/research-timeline/research-timeline.component'; +import { + ResearchTimelineComponent, + TopicTimelineElement, +} from './components/research-timeline/research-timeline.component'; @Component({ selector: 'app-person-overview', @@ -7,4 +10,169 @@ import { ResearchTimelineComponent } from './components/research-timeline/resear templateUrl: './person-overview.component.html', styleUrl: './person-overview.component.scss', }) -export class PersonOverviewComponent {} \ No newline at end of file +export class PersonOverviewComponent { + topicTimelineElements: TopicTimelineElement[] = [ + { + year: 2009, + publication_count: 1, + topics: [ + { name: 'Security and Verification in Computing', count: 1 }, + { name: 'Advanced Malware Detection Techniques', count: 1 }, + { name: 'Cloud Data Security Solutions', count: 1 }, + ], + }, + { + year: 2010, + publication_count: 2, + topics: [ + { name: 'Security and Verification in Computing', count: 2 }, + { name: 'Distributed systems and fault tolerance', count: 2 }, + { name: 'Parallel Computing and Optimization Techniques', count: 1 }, + ], + }, + { + year: 2011, + publication_count: 9, + topics: [ + { name: 'Advanced Malware Detection Techniques', count: 8 }, + { name: 'Security and Verification in Computing', count: 8 }, + { name: 'Digital and Cyber Forensics', count: 3 }, + ], + }, + { + year: 2012, + publication_count: 5, + topics: [ + { name: 'Advanced Malware Detection Techniques', count: 3 }, + { name: 'Security and Verification in Computing', count: 3 }, + { name: 'Network Security and Intrusion Detection', count: 3 }, + ], + }, + { + year: 2013, + publication_count: 6, + topics: [ + { name: 'Security and Verification in Computing', count: 6 }, + { name: 'Advanced Malware Detection Techniques', count: 6 }, + { name: 'Network Security and Intrusion Detection', count: 2 }, + ], + }, + { + year: 2014, + publication_count: 14, + topics: [ + { name: 'Advanced Malware Detection Techniques', count: 9 }, + { name: 'Security and Verification in Computing', count: 8 }, + { name: 'Diamond and Carbon-based Materials Research', count: 3 }, + ], + }, + { + year: 2015, + publication_count: 19, + topics: [ + { name: 'Security and Verification in Computing', count: 19 }, + { name: 'Advanced Malware Detection Techniques', count: 19 }, + { name: 'Diamond and Carbon-based Materials Research', count: 6 }, + ], + }, + { + year: 2016, + publication_count: 23, + topics: [ + { name: 'Security and Verification in Computing', count: 13 }, + { name: 'Advanced Malware Detection Techniques', count: 8 }, + { name: 'Cloud Data Security Solutions', count: 4 }, + ], + }, + { + year: 2017, + publication_count: 7, + topics: [ + { name: 'Security and Verification in Computing', count: 7 }, + { name: 'Advanced Malware Detection Techniques', count: 5 }, + { name: 'Diamond and Carbon-based Materials Research', count: 4 }, + ], + }, + { + year: 2018, + publication_count: 5, + topics: [ + { name: 'Security and Verification in Computing', count: 5 }, + { name: 'Advanced Malware Detection Techniques', count: 4 }, + { name: 'Diamond and Carbon-based Materials Research', count: 2 }, + ], + }, + { + year: 2019, + publication_count: 4, + topics: [ + { name: 'Advanced Malware Detection Techniques', count: 2 }, + { name: 'Security and Verification in Computing', count: 2 }, + { name: 'Blockchain Technology Applications and Security', count: 2 }, + ], + }, + { + year: 2020, + publication_count: 5, + topics: [ + { name: 'Security and Verification in Computing', count: 5 }, + { name: 'Advanced Malware Detection Techniques', count: 4 }, + { name: 'Diamond and Carbon-based Materials Research', count: 2 }, + ], + }, + { + year: 2021, + publication_count: 7, + topics: [ + { name: 'Physical Unclonable Functions (PUFs) and Hardware Security', count: 3 }, + { name: 'Parallel Computing and Optimization Techniques', count: 2 }, + { name: 'Security and Verification in Computing', count: 2 }, + ], + }, + { + year: 2022, + publication_count: 5, + topics: [ + { name: 'Security and Verification in Computing', count: 5 }, + { name: 'Advanced Malware Detection Techniques', count: 5 }, + { name: 'Physical Unclonable Functions (PUFs) and Hardware Security', count: 2 }, + ], + }, + { + year: 2023, + publication_count: 6, + topics: [ + { name: 'Security and Verification in Computing', count: 5 }, + { name: 'Advanced Malware Detection Techniques', count: 5 }, + { name: 'Blockchain Technology Applications and Security', count: 2 }, + ], + }, + { + year: 2024, + publication_count: 6, + topics: [ + { name: 'Security and Verification in Computing', count: 5 }, + { name: 'Advanced Malware Detection Techniques', count: 3 }, + { name: 'User Authentication and Security Systems', count: 2 }, + ], + }, + { + year: 2025, + publication_count: 6, + topics: [ + { name: 'Blockchain Technology Applications and Security', count: 2 }, + { name: 'Radiation Effects in Electronics', count: 1 }, + { name: 'Risk and Safety Analysis', count: 1 }, + ], + }, + { + year: 2026, + publication_count: 6, + topics: [ + { name: 'Advanced Malware Detection Techniques', count: 6 }, + { name: 'Security and Verification in Computing', count: 6 }, + { name: 'Web Application Security Vulnerabilities', count: 2 }, + ], + }, + ]; +} \ No newline at end of file