diff --git a/src/Controller/EcurieController.php b/src/Controller/EcurieController.php index 8f54f665b2f1121f05977cb0921cbf8823087df4..5196eea78b10faaaba2e1af177b4b4de8253796f 100644 --- a/src/Controller/EcurieController.php +++ b/src/Controller/EcurieController.php @@ -19,10 +19,12 @@ use Symfony\Component\Routing\Annotation\Route; class EcurieController extends AbstractController { #[Route('/', name: 'app_ecurie_index', methods: ['GET'])] - public function index(EcurieRepository $ecurieRepository): Response + public function index(): Response { $categoryRepository = $this->getDoctrine() ->getRepository(Category::class); + $ecurieRepository = $this->getDoctrine() + ->getRepository(Ecurie::class); return $this->render('ecurie/index.html.twig', [ 'ecuries' => $ecurieRepository->findAll(), diff --git a/templates/category/show.html.twig b/templates/category/show.html.twig index 8a0c4a13d7f655c3aadcebd4e98a34274c223608..d1c49da9b1a0c505ee41f0534be8e319d7d8b552 100644 --- a/templates/category/show.html.twig +++ b/templates/category/show.html.twig @@ -9,15 +9,18 @@ <ul class="max-w-[80%] flex flex-wrap"> {% for clothes in category.clothes %} <li class="max-w-[33%] border-b-2"> - <a href="{{ path('app_cart_add', {id: clothes.id}) }}"> - <article class="flex flex-col justify-center"> - <img src="{{ clothes.picture }}" alt="{{ clothes.name }}"> - <div class="p-5"> - <h3 class="text-[#CC0000] font-bold">{{ clothes.price }} €</h3> - <p>{{ clothes.name }}</p> - </div> - </article> - </a> + <article class="flex flex-col justify-center"> + <img src="{{ clothes.picture }}" alt="{{ clothes.name }}"> + <div class="p-5 w-full"> + <h3 class="text-[#CC0000] font-bold">{{ clothes.price }} €</h3> + <p>{{ clothes.name }}</p> + <a href="{{ path('app_cart_add', {id: clothes.id}) }}" class=""> + <div class="w-full text-center p-3 bg-[#06e100] rounded-xl text-[#111111] font-bold my-5 hover:text-[#EEEEEE]"> + <i class="bi bi-cart-plus"></i> Ajouter au Panier + </div> + </a> + </div> + </article> </li> {% endfor %} </ul> diff --git a/templates/ecurie/index.html.twig b/templates/ecurie/index.html.twig index 695b4ea1c96c3e3dadce97ff0db55df0a35244e8..aa2020b2ed1c1a5dd6db5b0ec47dbd5271705fc4 100644 --- a/templates/ecurie/index.html.twig +++ b/templates/ecurie/index.html.twig @@ -3,35 +3,19 @@ {% block title %}Ecurie index{% endblock %} {% block body %} - <h1>Ecurie index</h1> - - <table class="table"> - <thead> - <tr> - <th>Id</th> - <th>Name</th> - <th>Picture</th> - <th>actions</th> - </tr> - </thead> - <tbody> +<div class="my-[5rem]"> + <h1 class="text-3xl capitalize font-bold text-center my-[2.5rem]">écuries</h1> + <ul class="flex flex-row justify-center my-[2.5rem] gap-8"> {% for ecurie in ecuries %} - <tr> - <td>{{ ecurie.id }}</td> - <td>{{ ecurie.name }}</td> - <td>{{ ecurie.picture }}</td> - <td> - <a href="{{ path('app_ecurie_show', {'id': ecurie.id}) }}">show</a> - <a href="{{ path('app_ecurie_edit', {'id': ecurie.id}) }}">edit</a> - </td> - </tr> - {% else %} - <tr> - <td colspan="4">no records found</td> - </tr> + <li class="flex items-center"> + <a href="{{ path('app_ecurie_show', {'id': ecurie.id}) }}"> + <img src="{{ asset('img/logo_equipes/' ~ ecurie.picture) }}" class="w-[50px] h-[50px] m-[15px]" alt=""> + <p class="text-center">{{ ecurie.name }}</p> + </a> + </li> {% endfor %} - </tbody> - </table> + </ul> +</div> <a href="{{ path('app_ecurie_new') }}">Create new</a> {% endblock %} diff --git a/templates/home.html.twig b/templates/home.html.twig index fe3ba824410a553da3c4287339d2e7f9f5c09774..61bbec74bcb03d52f39e406b8a82b799cb27a4ed 100644 --- a/templates/home.html.twig +++ b/templates/home.html.twig @@ -1,39 +1,18 @@ {% extends "base.html.twig" %} {% block body %} - - <a href=""> - <img src="{{ asset('img/DT_A_spot_2023_Teamwear_FR.avif') }}" alt=""> - </a> - <div class="text-center capitalize font-semibold text-xl">équipes</div> - <div> - <ul class="flex flex-row justify-center"> + <div class="my-[5rem]"> + <h1 class="text-3xl capitalize font-bold text-center my-[2.5rem]">écuries</h1> + <ul class="flex flex-row justify-center my-[2.5rem] gap-8"> {% for ecurie in ecuries %} <li class="flex items-center"> <a href="{{ path('app_ecurie_show', {'id': ecurie.id}) }}"> - <img src="img/logo_equipes/{{ ecurie.picture }}" class="w-[50px] m-[15px]" alt=""> + <img src="{{ asset('img/logo_equipes/' ~ ecurie.picture) }}" class="w-[50px] h-[50px] m-[15px]" alt=""> </a> </li> {% endfor %} </ul> </div> - - <h1 class="text-3xl px-[5rem]">Les Dernières Collections</h1> - <div class="my-[1.5rem]"> - <div class="flex flex-row*"> - <a href=""> - <img src="{{ asset('img/last-collections/mclaren.avif') }}" alt=""> - </a> - <a href=""> - <img src="{{ asset('img/last-collections/mercedes.avif') }}" alt=""> - </a> - </div> - <div class="flex flex-row"> - <a href=""> - <img src="{{ asset('img/last-collections/aston_martin.avif') }}" alt=""> - </a> - <a href=""> - <img src="{{ asset('img/last-collections/ferrari.avif') }}" alt=""> - </a> - </div> - </div> + <a href=""> + <img src="{{ asset('img/DT_A_spot_2023_Teamwear_FR.avif') }}" alt=""> + </a> {% endblock %} \ No newline at end of file diff --git a/templates/layouts/_footer.html.twig b/templates/layouts/_footer.html.twig index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..84f192f58b51ce317705dea12d58eee7977fa7fe 100644 --- a/templates/layouts/_footer.html.twig +++ b/templates/layouts/_footer.html.twig @@ -0,0 +1,3 @@ +<footer class="text-center relative bottom-0 py-[1.5rem] bg-[#000000] text-[#EEEEEE]"> + © Copyright 2023 | <a href="https://ericwagner.fr" class="hover:underline">Eric WAGNER</a> +</footer> \ No newline at end of file diff --git a/templates/layouts/_header.html.twig b/templates/layouts/_header.html.twig index 548b099ca778d13583da208dac40d3dc89bd4bdd..6a0fd0cc12356bf4c9914eb60d12363f9bac4965 100644 --- a/templates/layouts/_header.html.twig +++ b/templates/layouts/_header.html.twig @@ -1,20 +1,22 @@ <header class="pl-[5px] h-[120px] bg-[#000000] flex flex-row justify-between"> <div class="px-[15px]"> - <img src="{{ asset('img/logo_site.svg') }}" alt="logo F1" class="p-[20px] h-[120px]"> + <a href="{{path('home')}}"> + <img src="{{ asset('img/logo_site.svg') }}" alt="logo F1" class="p-[20px] h-[120px]"> + </a> </div> - <div class="flex flex-row justify-end"> + <div class="flex flex-row justify-end gap-5"> <ul class="flex-flex-row justify-end items-center h-[40px]"> <li class="flex items-center h-[40px] pl-[7px] pr-[5px] text-[#EEEEEE]"> <a href="" class="hover:underline">Mon Compte</a> </li> </ul> - <div class="w-[60px] h-[40px] bg-[#e10600] text-center pt-[0.5rem] pb-[0.4375rem]" role="complementary"> + <div class="w-[60px] h-[40px] bg-[#e10600] text-center pt-[0.5rem] pb-[0.4375rem] text-[#EEEEEE] hover:text-[#e10600] hover:bg-[#EEEEEE]" role="complementary"> <a href="/cart" data-trk-id="cart-icon" data-talos="linkCartIcon" {# class="{{ path('app_cart_show', {id: app.user.id}) }}" #} title="Vous avez 0 articles dans le panier. Le total est de 0,00 €"> - <i class="bi bi-cart-fill text-[#EEEEEE]"></i> + <i class="bi bi-cart-fill"></i> </a> </div> </div> @@ -22,11 +24,11 @@ <nav> <ul class="flex flex-row justify-around uppercase"> <li class="hover:bg-[#EEEEEE] px-[1rem] font-medium w-full text-center"> - <a href="{{ path('app_ecurie_index') }}" class="leading-[2.1875rem] ">équipes</a> + <a href="{{ path('app_ecurie_index') }}" class="leading-[2.1875rem] min-w-[100%]">écuries</a> </li> {% for category in categories %} <li class="hover:bg-[#EEEEEE] px-[1rem] font-medium w-full text-center"> - <a href="{{ path('app_category_show', {'id': category.id}) }}" class="leading-[2.1875rem] ">{{ category.name }}</a> + <a href="{{ path('app_category_show', {'id': category.id}) }}" class="leading-[2.1875rem] min-w-[100%]">{{ category.name }}</a> </li> {% endfor %} </ul>