diff --git a/src/app/project-card/project-card.component.ts b/src/app/project-card/project-card.component.ts
index 820acb9..ea16e9d 100644
--- a/src/app/project-card/project-card.component.ts
+++ b/src/app/project-card/project-card.component.ts
@@ -27,6 +27,8 @@ export class ProjectCardComponent {
@ViewChild('description') descriptionElement!: ElementRef;
isExpanded = false;
isTruncated = false;
+ isTextVisible = true;
+ fullHeight: string = '13rem';
constructor(private cdr: ChangeDetectorRef) {}
@@ -38,8 +40,9 @@ export class ProjectCardComponent {
// Check if the description is being cut off
checkIfTruncated() {
const element = this.descriptionElement.nativeElement;
+ this.fullHeight = `${this.descriptionElement.nativeElement.scrollHeight}px`;
+ console.log(this.fullHeight);
this.isTruncated = element.scrollHeight > element.offsetHeight;
- console.log(this.isTruncated);
}
// Toggle expand/collapse
@@ -47,6 +50,10 @@ export class ProjectCardComponent {
this.isExpanded = !this.isExpanded;
if (this.isExpanded) {
this.isTruncated = false;
+ this.isTextVisible = false;
+ setTimeout(() => {
+ this.isTextVisible = true;
+ }, 500)
} else {
this.isTruncated = true;
}
diff --git a/src/app/projects/projects.component.ts b/src/app/projects/projects.component.ts
index be5ba5a..12fb420 100644
--- a/src/app/projects/projects.component.ts
+++ b/src/app/projects/projects.component.ts
@@ -16,6 +16,7 @@ export class ProjectsComponent {
title: 'Quiz App',
year: '2024',
description:
+ // 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'A little quiz game, using questions from the Open Trivia Database. This API only allows one request per 5 seconds. ' +
'\n\nTo combat this, the app collects all available questions in its own database. ' +
'To ensure the data stays fresh, it repeats this process every night, by creating a backup table, and then swapping it with the active one once it is finished. ' +