-
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.
Create about page and add footer (#52)
- Loading branch information
1 parent
e430740
commit 8283e3b
Showing
12 changed files
with
180 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export namespace GitHub { | ||
export interface Contributor { | ||
id: number; | ||
login: string; | ||
url: string; | ||
html_url: string; | ||
avatar_url: string; | ||
// More fields can be added here | ||
} | ||
} |
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,53 @@ | ||
<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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
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'; | ||
import { GitHub } from 'app/@types/github'; | ||
|
||
@Component({ | ||
selector: 'app-about', | ||
standalone: true, | ||
imports: [AvatarComponent, AvatarImageComponent, AvatarFallbackComponent, ButtonComponent], | ||
templateUrl: './about.component.html' | ||
}) | ||
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<GitHub.Contributor[]>, | ||
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); | ||
}); | ||
} |
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,15 +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> | ||
<div class="flex gap-2 m-2 flex-col items-start"> | ||
<app-counter title="First Counter" /> | ||
<app-counter title="Second Counter" [byCount]="16" /> | ||
</div> | ||
<app-hello /> | ||
<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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
import { Routes } from '@angular/router'; | ||
import { AboutComponent } from 'app/about/about.component'; | ||
import { MainComponent } from 'app/main/main.component'; | ||
|
||
export const routes: Routes = []; | ||
export const routes: Routes = [ | ||
{ path: '', component: MainComponent }, | ||
{ path: 'about', component: AboutComponent } | ||
]; |
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,5 @@ | ||
<div class="flex gap-2 m-2 flex-col items-start"> | ||
<app-counter title="First Counter" /> | ||
<app-counter title="Second Counter" [byCount]="16" /> | ||
</div> | ||
<app-hello /> |
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,11 @@ | ||
import { Component } from '@angular/core'; | ||
import { CounterComponent } from 'app/example/counter/counter.component'; | ||
import { HelloComponent } from 'app/example/hello/hello.component'; | ||
|
||
@Component({ | ||
selector: 'app-main', | ||
standalone: true, | ||
imports: [CounterComponent, HelloComponent], | ||
templateUrl: './main.component.html' | ||
}) | ||
export class MainComponent {} |
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