diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 3c8cd69..f0b9900 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { RouterOutlet, RouterLink, RouterLinkActive } from '@angular/router'; +import { Router, RouterOutlet, RouterLink, RouterLinkActive } from '@angular/router'; import { MatToolbarModule } from '@angular/material/toolbar'; import { MatButtonModule } from '@angular/material/button'; import { MatTabsModule } from '@angular/material/tabs'; @@ -24,42 +24,88 @@ import { PokemonService } from './core/services/pokemon.service'; MatListModule ], template: ` - - OriginDex - - + +
+ OriginDex +
+ +
+ + +
+ +
Welcome, {{ auth.currentUser?.username }}! - +
+ - - +
+ + +
- - - - - Storage Carousel - - - Efficiency Plan - - - - -
- -
-
-
+ +
+ +
`, styles: [` - .spacer { - flex: 1 1 auto; + .top-bar { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + } + + .toolbar-left { + display: flex; + align-items: center; + flex: 1; + } + + .image-container { + display: flex; + align-items: center; + gap: 16px; /* Space between images */ + flex: 0; /* Do not grow or shrink */ } + .toolbar-right { + display: flex; + align-items: center; + gap: 8px; /* Space between the welcome message and buttons */ + flex: 1; + justify-content: flex-end; + } + + .top-bar-icon { + cursor: pointer; + height: 48px; /* Adjust as needed */ + width: auto; /* Maintain aspect ratio */ + transition: transform 0.3s ease, opacity 0.3s ease; /* Smooth transition effect */ + } + + .top-bar-icon:hover { + transform: scale(1.1); /* Slightly enlarge the image on hover */ + } + + + mat-toolbar { margin-bottom: 0; } @@ -94,10 +140,16 @@ import { PokemonService } from './core/services/pokemon.service'; `] }) export class AppComponent { + hoveredRoute: string = ''; constructor( public auth: AuthService, - public pokemonService: PokemonService + public pokemonService: PokemonService, + private router: Router ) { this.pokemonService.initializeCaughtPokemon(); } + + isRouteSelected(route: string): boolean { + return this.router.url === route || this.hoveredRoute === route; + } } \ No newline at end of file diff --git a/src/app/features/plan/plan-pokemon/plan-pokemon.component.ts b/src/app/features/plan/plan-pokemon/plan-pokemon.component.ts index 347d5ff..ed8fb9f 100644 --- a/src/app/features/plan/plan-pokemon/plan-pokemon.component.ts +++ b/src/app/features/plan/plan-pokemon/plan-pokemon.component.ts @@ -95,7 +95,6 @@ interface PokemonStatusEvent { Method _PLACEDHOLDER_ - Need: {{ 1 }} @@ -126,7 +125,6 @@ interface PokemonStatusEvent { Breed - Need: {{ 1 }} @@ -277,7 +275,8 @@ export class PlanPokemonComponent { this.representative_pokemon = null; this.evolve_to = [] this.breed_for = [] - + this.cdr.detectChanges(); + this.pokemonService.getPokemonFromPFIC(this.pokemon_family.representative).subscribe({ next: (pokemon) => { this.representative_pokemon = pokemon @@ -338,6 +337,7 @@ export class PlanPokemonComponent { this.representative_pokemon = null; this.evolve_to = [] this.breed_for = [] + this.cdr.detectChanges(); this.pokemonService.getPokemonFromPFIC(this.pokemon_family.representative).subscribe({ next: (pokemon) => { diff --git a/src/assets/images/map.png b/src/assets/images/map.png new file mode 100644 index 0000000..99f04e1 Binary files /dev/null and b/src/assets/images/map.png differ diff --git a/src/assets/images/map_selected.png b/src/assets/images/map_selected.png new file mode 100644 index 0000000..87c0922 Binary files /dev/null and b/src/assets/images/map_selected.png differ diff --git a/src/assets/images/poke_box.png b/src/assets/images/poke_box.png new file mode 100644 index 0000000..bede18e Binary files /dev/null and b/src/assets/images/poke_box.png differ diff --git a/src/assets/images/poke_box_selected.png b/src/assets/images/poke_box_selected.png new file mode 100644 index 0000000..6a8fa6f Binary files /dev/null and b/src/assets/images/poke_box_selected.png differ