-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a88526f
commit aac7730
Showing
7 changed files
with
158 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,53 @@ | ||
<p>about works!</p> | ||
<div class="flex flex-col gap-4"> | ||
<h1 class="text-3xl font-bold">About</h1> | ||
<p class="mb-4"> | ||
Hephaestus leverages generative AI to streamline software development and enhance developer training. Focused on improving every phase of the software development lifecycle | ||
(SDLC) and supporting agile practices, Hephaestus helps teams work more efficiently and adhere to best practices. | ||
</p> | ||
<h2 class="text-2xl font-semibold">Team</h2> | ||
@if (query.isPending()) { | ||
<span class="text-muted-foreground">Loading...</span> | ||
} @else if (query.error()) { | ||
<span class="text-destructive">An error has occurred</span> | ||
} | ||
|
||
@if (projectManager(); as projectManager) { | ||
<div class="flex items-center gap-3 mb-4"> | ||
<a | ||
[href]="projectManager.html_url" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
class="hover:scale-105 transition-all hover:shadow-secondary-foreground/15 hover:shadow-lg rounded-full" | ||
> | ||
<app-avatar class="size-32"> | ||
<app-avatar-image [src]="projectManager.avatar_url" [alt]="projectManager.login + '\'s avatar'" /> | ||
<app-avatar-fallback>{{ projectManager.login.slice(0, 1).toUpperCase() }}</app-avatar-fallback> | ||
</app-avatar> | ||
</a> | ||
<div> | ||
<div class="text-2xl font-semibold">Felix T.J. Dietrich</div> | ||
<div class="text-lg text-muted-foreground">Project Manager</div> | ||
<a href="https://ase.cit.tum.de/people/dietrich/" target="_blank" rel="noopener noreferrer" class="text-primary underline-offset-4 hover:underline">Website</a> | ||
</div> | ||
</div> | ||
} | ||
|
||
@if (contributors(); as contributors) { | ||
<h3 class="text-lg font-bold">Contributors</h3> | ||
<div class="flex flex-wrap gap-2"> | ||
@for (contributor of contributors; track contributor.id) { | ||
<a | ||
[href]="contributor.html_url" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
class="hover:scale-105 transition-all hover:shadow-secondary-foreground/15 hover:shadow-lg rounded-full" | ||
> | ||
<app-avatar class="size-20"> | ||
<app-avatar-image [src]="contributor.avatar_url" [alt]="contributor.login + '\'s avatar'" /> | ||
<app-avatar-fallback>{{ contributor.login.slice(0, 1).toUpperCase() }}</app-avatar-fallback> | ||
</app-avatar> | ||
</a> | ||
} | ||
</div> | ||
} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,60 @@ | ||
import { Component } from '@angular/core'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { Component, computed, inject } from '@angular/core'; | ||
import { injectQuery } from '@tanstack/angular-query-experimental'; | ||
import { lastValueFrom } from 'rxjs'; | ||
import { AvatarComponent } from 'app/ui/avatar/avatar.component'; | ||
import { AvatarImageComponent } from 'app/ui/avatar/avatar-image.component'; | ||
import { AvatarFallbackComponent } from 'app/ui/avatar/avatar-fallback.component'; | ||
import { ButtonComponent } from 'app/ui/button/button.component'; | ||
|
||
interface Contributor { | ||
id: number; | ||
login: string; | ||
url: string; | ||
html_url: string; | ||
avatar_url: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'app-about', | ||
standalone: true, | ||
imports: [], | ||
imports: [AvatarComponent, AvatarImageComponent, AvatarFallbackComponent, ButtonComponent], | ||
templateUrl: './about.component.html' | ||
}) | ||
export class AboutComponent {} | ||
export class AboutComponent { | ||
http = inject(HttpClient); | ||
|
||
query = injectQuery(() => ({ | ||
queryKey: ['contributors'], | ||
queryFn: async () => lastValueFrom(this.http.get('https://api.github.com/repos/ls1intum/hephaestus/contributors')) as Promise<Contributor[]>, | ||
gcTime: Infinity | ||
})); | ||
|
||
private queryArray = computed( | ||
() => | ||
this.query.data()?.map((contributor) => ({ | ||
queryKey: ['contributor', contributor.id], | ||
queryFn: async () => lastValueFrom(this.http.get(contributor.url)) as Promise<{ id: number; name: string }>, | ||
gcTime: Infinity | ||
})) ?? [] | ||
); | ||
|
||
projectManager = computed(() => { | ||
const data = this.query.data(); | ||
if (!data) { | ||
return undefined; | ||
} | ||
// 5898705 is the id of the project manager Felix T.J. Dietrich | ||
return data.find((contributor) => contributor.id === 5898705); | ||
}); | ||
|
||
contributors = computed(() => { | ||
const data = this.query.data(); | ||
if (!data) { | ||
return undefined; | ||
} | ||
return data.filter((contributor) => contributor.id !== 5898705); | ||
}); | ||
|
||
JSON = JSON; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { type Meta, type StoryObj } from '@storybook/angular'; | ||
import { AboutComponent } from './about.component'; | ||
|
||
const meta: Meta<AboutComponent> = { | ||
title: 'Pages/About', | ||
component: AboutComponent, | ||
tags: ['autodocs'] | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<AboutComponent>; | ||
|
||
export const Default: Story = { | ||
render: (args) => ({ | ||
props: args, | ||
template: `<app-about />` | ||
}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
<main class="container"> | ||
<header class="flex items-center justify-between py-4"> | ||
<a class="flex gap-2 items-center hover:text-muted-foreground" href="/"> | ||
<div class="flex flex-col min-h-dvh"> | ||
<header class="container flex items-center justify-between pt-4"> | ||
<a class="flex gap-2 items-center hover:text-muted-foreground" routerLink="/"> | ||
<lucide-angular name="hammer" class="size-6" /> | ||
<span class="text-xl font-semibold">Hephaestus</span> | ||
</a> | ||
<app-theme-switcher /> | ||
</header> | ||
<router-outlet /> | ||
</main> | ||
<main class="container flex-grow pt-4 pb-8"> | ||
<router-outlet /> | ||
</main> | ||
<footer class="py-6 md:px-8 md:py-0 border-t"> | ||
<div class="container flex flex-col items-center justify-between gap-4 md:h-24 md:flex-row"> | ||
<p class="text-balance text-center text-sm leading-loose text-muted-foreground md:text-left"> | ||
<a routerLink="about" class="font-medium underline underline-offset-4">About</a> | ||
</p> | ||
<p class="text-balance text-center text-sm leading-loose text-muted-foreground md:text-left"> | ||
Built by | ||
<a href="https://github.com/ls1intum" target="_blank" rel="noreferrer" class="font-medium underline underline-offset-4">LS1 Team</a> | ||
at | ||
<a href="https://www.tum.de/en/" target="_blank" rel="noreferrer" class="font-medium underline underline-offset-4">TUM</a>. The source code is available on | ||
<a href="https://github.com/ls1intum/hephaestus" target="_blank" rel="noreferrer" class="font-medium underline underline-offset-4"> GitHub</a>. | ||
</p> | ||
</div> | ||
</footer> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters