header got favs and logout

This commit is contained in:
ZeKap 2024-02-22 15:36:13 +01:00
parent d557c7e353
commit c5c57796a4
No known key found for this signature in database
GPG Key ID: 8D70E0631DD5792A
2 changed files with 29 additions and 26 deletions

View File

@ -8,7 +8,7 @@ use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\HttpFoundation\Request;
use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Album;
Use App\Utils;
use App\Utils;
#[Route('/favorite')]
class FavoriteController extends AbstractController
@ -54,7 +54,7 @@ class FavoriteController extends AbstractController
return new Response("ca a marche");
}
#[Route('/', name: 'app_favorites')]
#[Route('/', name: 'app_favorite')]
public function index(Request $request): Response
{
$user = $this->getUser();

View File

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@ -41,16 +41,19 @@
<img src="{{ asset('/styles/search.svg') }}" alt="Search" />
</label>
</form>
{% if app.user %}
<div>
<a class="no-style" href="{{url('app_favorite')}}">Favorites</a>
<a class="no-style" href="{{url('app_logout')}}">Logout</a>
</div>
{% else %}
<div>
<a class="no-style" href="{{url('app_register')}}">Register</a>
<a class="no-style" href="{{url('app_login')}}">Login</a>
</div>
{% endif%}
</header>
{% endblock %}
{% block body %}{% endblock %}
{% block footer %}
{% endblock %} {% block body %}{% endblock %} {% block footer %}
<footer>
<p>Done by: Capelier 🏳️‍⚧️ — Rubini 💅 — Simaila 🤓 — V????? 🛠️</p>
</footer>