diff --git a/src/app/app.component.html b/src/app/app.component.html index 481dd91..8f67211 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,6 +1,12 @@

Ratatouille

-
- - -
+ + +
+ +
\ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ac799f8..d6cb23a 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { RouterOutlet } from '@angular/router'; +import { RouterOutlet, RouterLink } from '@angular/router'; import { RecipeFormComponent } from './recipe-form/recipe-form.component'; import { RecipeService } from './services/recipe.service'; import { Recipe } from './model/recipe.model'; @@ -10,6 +10,7 @@ import { RecipeListComponent } from './components/recipe-list/recipe-list.compon standalone: true, imports: [ RouterOutlet, + RouterLink, RecipeFormComponent, RecipeListComponent, ], diff --git a/src/app/app.config.ts b/src/app/app.config.ts index 6c6ef60..b021de7 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -6,3 +6,4 @@ import { routes } from './app.routes'; export const appConfig: ApplicationConfig = { providers: [provideRouter(routes)] }; + diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index dc39edb..251c8c2 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,3 +1,9 @@ -import { Routes } from '@angular/router'; +import { Routes } from '@angular/router' -export const routes: Routes = []; +import { RecipeFormComponent } from "./recipe-form/recipe-form.component"; +import { RecipeListComponent } from "./components/recipe-list/recipe-list.component"; + +export const routes: Routes = [ + { path: 'add', component: RecipeFormComponent }, + { path: '', component: RecipeListComponent } +]; diff --git a/src/app/components/recipe-list/recipe-list.component.css b/src/app/components/recipe-list/recipe-list.component.css index e69de29..71f8b27 100644 --- a/src/app/components/recipe-list/recipe-list.component.css +++ b/src/app/components/recipe-list/recipe-list.component.css @@ -0,0 +1,5 @@ +#recipe-list { + display: flex; + flex-wrap: wrap; + gap: 2rem; +} \ No newline at end of file diff --git a/src/app/components/recipe-list/recipe-list.component.html b/src/app/components/recipe-list/recipe-list.component.html index 7f3ae28..8d0d34b 100644 --- a/src/app/components/recipe-list/recipe-list.component.html +++ b/src/app/components/recipe-list/recipe-list.component.html @@ -1,4 +1,3 @@ -

recipe-list works!

-
+
-
+
\ No newline at end of file diff --git a/src/app/components/recipe-mini/recipe-mini.component.css b/src/app/components/recipe-mini/recipe-mini.component.css index adfb662..437f992 100644 --- a/src/app/components/recipe-mini/recipe-mini.component.css +++ b/src/app/components/recipe-mini/recipe-mini.component.css @@ -3,8 +3,7 @@ border-radius: 8px; overflow: hidden; width: 300px; - margin: 10px; - box-shadow: 0 4px 8px rgba(0,0,0,0.1); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); } .recipe-image img { @@ -59,6 +58,7 @@ button span { position: relative; z-index: 1; } + button i { position: absolute; inset: 0; @@ -105,9 +105,11 @@ button:hover i::after { 0% { transform: translateX(0); } + 50% { transform: translateX(5px); } + 100% { transform: translateX(0); } @@ -117,10 +119,12 @@ button:hover i::after { 0% { box-shadow: #27272c; } + 50% { box-shadow: 0 0 25px var(--clr); } + 100% { box-shadow: #27272c; } -} +} \ No newline at end of file diff --git a/src/app/components/recipe-mini/recipe-mini.component.html b/src/app/components/recipe-mini/recipe-mini.component.html index 00c04a5..5c579ca 100644 --- a/src/app/components/recipe-mini/recipe-mini.component.html +++ b/src/app/components/recipe-mini/recipe-mini.component.html @@ -1,10 +1,11 @@
- {{recipe.name}} + {{recipe.name}}

{{recipe.name}}

{{recipe.description}}

-
+ \ No newline at end of file diff --git a/src/styles.css b/src/styles.css index 90d4ee0..f2bd8b6 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1 +1,3 @@ -/* You can add global styles to this file, and also import other style files */ +:root { + font-family: "Helvetica"; +} \ No newline at end of file