From 8f75b8a125bd832e6efbb22c76e5c1e473182299 Mon Sep 17 00:00:00 2001 From: jleroy2023 Date: Mon, 18 Nov 2024 14:41:52 +0100 Subject: [PATCH] set front --- .env | 4 +- templates/admin/dashboard.html.twig | 101 ++++ templates/admin/importUser.html.twig | 16 + templates/base.html.twig | 104 ++++- templates/base/banner-svg.html.twig | 440 ++++++++++++++++++ templates/base/footer.html.twig | 11 + templates/base/icon-svg.html.twig | 174 +++++++ templates/base/navbar.html.twig | 130 ++++++ .../TwigBundle/Exception/error.html.twig | 19 + .../TwigBundle/Exception/error403.html.twig | 21 + .../TwigBundle/Exception/error404.html.twig | 21 + templates/frontend/outings-show.html.twig | 101 ++++ templates/frontend/outings.html.twig | 152 ++++++ templates/frontend/profile-readonly.html.twig | 56 +++ templates/frontend/profile.html.twig | 87 ++++ templates/group/create.html.twig | 56 +++ templates/group/index.html.twig | 92 ++++ templates/home/index.html.twig | 36 ++ templates/outing/card.html.twig | 90 ++++ templates/outing/create.html.twig | 273 +++++++++++ templates/outing/index.html.twig | 25 + templates/outing/preview.html.twig | 176 +++++++ templates/outing/search.html.twig | 108 +++++ templates/reset_password/email.html.twig | 9 + templates/reset_password/request.html.twig | 46 ++ templates/reset_password/reset.html.twig | 53 +++ templates/security/login.html.twig | 71 +++ templates/user/edit.html.twig | 73 +++ templates/user/index.html.twig | 56 +++ templates/user/reset_password.html.twig | 67 +++ 30 files changed, 2650 insertions(+), 18 deletions(-) create mode 100644 templates/admin/dashboard.html.twig create mode 100644 templates/admin/importUser.html.twig create mode 100644 templates/base/banner-svg.html.twig create mode 100644 templates/base/footer.html.twig create mode 100644 templates/base/icon-svg.html.twig create mode 100644 templates/base/navbar.html.twig create mode 100644 templates/bundles/TwigBundle/Exception/error.html.twig create mode 100644 templates/bundles/TwigBundle/Exception/error403.html.twig create mode 100644 templates/bundles/TwigBundle/Exception/error404.html.twig create mode 100644 templates/frontend/outings-show.html.twig create mode 100644 templates/frontend/outings.html.twig create mode 100644 templates/frontend/profile-readonly.html.twig create mode 100644 templates/frontend/profile.html.twig create mode 100644 templates/group/create.html.twig create mode 100644 templates/group/index.html.twig create mode 100644 templates/home/index.html.twig create mode 100644 templates/outing/card.html.twig create mode 100644 templates/outing/create.html.twig create mode 100644 templates/outing/index.html.twig create mode 100644 templates/outing/preview.html.twig create mode 100644 templates/outing/search.html.twig create mode 100644 templates/reset_password/email.html.twig create mode 100644 templates/reset_password/request.html.twig create mode 100644 templates/reset_password/reset.html.twig create mode 100644 templates/security/login.html.twig create mode 100644 templates/user/edit.html.twig create mode 100644 templates/user/index.html.twig create mode 100644 templates/user/reset_password.html.twig diff --git a/.env b/.env index 5b95169..57d6b52 100644 --- a/.env +++ b/.env @@ -25,8 +25,8 @@ APP_SECRET=ba1ab1eaa1c6662c10564a7a82901198 # # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" # DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4" -# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" -DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" + DATABASE_URL="mysql://root@10.4.200.16:3306/sortir?serverVersion=10.11.2-MariaDB&charset=utf8mb4" +# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8" ###< doctrine/doctrine-bundle ### ###> symfony/messenger ### diff --git a/templates/admin/dashboard.html.twig b/templates/admin/dashboard.html.twig new file mode 100644 index 0000000..6eef03d --- /dev/null +++ b/templates/admin/dashboard.html.twig @@ -0,0 +1,101 @@ +{% extends '@EasyAdmin/page/content.html.twig' %} + +{% block page_title %}Administration | Sortir{% endblock %} + +{% block content_title %}Administration{% endblock %} + +{% block main %} + + + +
+
+
+
+
+
Utilisateurs actifs
+

{{ numberUserActive }}

+

Comptes désactivés{{ numberUserDisable }}

+
+
+
+ +
+
+
+
Nombre de groupes
+

{{ numberGroup }}

+

Incroyable

+
+
+
+ +
+
+
+
Prochaine sorties
+

{{ numberOutingNotStarted }}

+

Sorties terminées{{ numberOutingFinished }}

+
+
+
+ +
+
+
+
Total participations
+

{{ numberRegistered }}

+

Sur l'ensemble des sorties

+
+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/importUser.html.twig b/templates/admin/importUser.html.twig new file mode 100644 index 0000000..3716d8b --- /dev/null +++ b/templates/admin/importUser.html.twig @@ -0,0 +1,16 @@ +{% extends '@EasyAdmin/page/content.html.twig' %} + +{% block page_title %}Importation des utilisateurs | {{ parent() }}{% endblock %} + +{% block content_title %}Importation des utilisateurs{% endblock %} + +{% block main %} + {{ form_start(requestForm) }} +
+ {{ form_row(requestForm.csvFile) }} +
+
+ {{ form_row(requestForm.submit) }} +
+ {{ form_end(requestForm) }} +{% endblock %} \ No newline at end of file diff --git a/templates/base.html.twig b/templates/base.html.twig index 367d082..78673ad 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -1,19 +1,91 @@ - - - - {% block title %}Welcome!{% endblock %} - - {% block stylesheets %} - {{ encore_entry_link_tags('app') }} - {% endblock %} + + + + {% block title %}Sortir{% endblock %} + + + + {% block stylesheets %} + {{ encore_entry_link_tags('app') }} + {% endblock %} - {% block javascripts %} - {{ encore_entry_script_tags('app') }} - {% block importmap %}{{ importmap('app') }}{% endblock %} - {% endblock %} - - - {% block body %}{% endblock %} - + {% block javascripts %} + {{ encore_entry_script_tags('app') }} + {% endblock %} + + +{% if app.flashes is defined %} +
+ {% for type, flash in app.flashes %} + {% for message in flash %} + + {% endfor %} + {% endfor %} +
+{% endif %} +{% include "base/navbar.html.twig" %} + +{% block body %}{% endblock %} + +{% include "base/footer.html.twig" %} + + diff --git a/templates/base/banner-svg.html.twig b/templates/base/banner-svg.html.twig new file mode 100644 index 0000000..0c39d33 --- /dev/null +++ b/templates/base/banner-svg.html.twig @@ -0,0 +1,440 @@ + + + + + + diff --git a/templates/base/footer.html.twig b/templates/base/footer.html.twig new file mode 100644 index 0000000..cac437e --- /dev/null +++ b/templates/base/footer.html.twig @@ -0,0 +1,11 @@ + diff --git a/templates/base/icon-svg.html.twig b/templates/base/icon-svg.html.twig new file mode 100644 index 0000000..170bc59 --- /dev/null +++ b/templates/base/icon-svg.html.twig @@ -0,0 +1,174 @@ + + + + + + \ No newline at end of file diff --git a/templates/base/navbar.html.twig b/templates/base/navbar.html.twig new file mode 100644 index 0000000..a2f31c2 --- /dev/null +++ b/templates/base/navbar.html.twig @@ -0,0 +1,130 @@ + + \ No newline at end of file diff --git a/templates/bundles/TwigBundle/Exception/error.html.twig b/templates/bundles/TwigBundle/Exception/error.html.twig new file mode 100644 index 0000000..e20b3e8 --- /dev/null +++ b/templates/bundles/TwigBundle/Exception/error.html.twig @@ -0,0 +1,19 @@ +{% extends 'base.html.twig' %} + +{% block body %} +
+
+
+

+ 😭 +

+

Oups ! Tu sembles perdu 🥲 +

+

{{ exception.message }}

+ Retour à la page + d'accueil +
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/bundles/TwigBundle/Exception/error403.html.twig b/templates/bundles/TwigBundle/Exception/error403.html.twig new file mode 100644 index 0000000..6335620 --- /dev/null +++ b/templates/bundles/TwigBundle/Exception/error403.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block body %} +
+
+
+

+ 403 +

+

Oups ! Tu sembles perdu 🥲 +

+

+ Vous n'avez pas les droits nécessaires pour accéder à cette page. +

+ Retour à la page + d'accueil +
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/bundles/TwigBundle/Exception/error404.html.twig b/templates/bundles/TwigBundle/Exception/error404.html.twig new file mode 100644 index 0000000..b8b1ef6 --- /dev/null +++ b/templates/bundles/TwigBundle/Exception/error404.html.twig @@ -0,0 +1,21 @@ +{% extends 'base.html.twig' %} + +{% block body %} +
+
+
+

+ 404 +

+

Oups ! Tu sembles perdu 🥲 +

+

+ Cette page n'existe pas ! +

+ Retour à la page + d'accueil +
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/frontend/outings-show.html.twig b/templates/frontend/outings-show.html.twig new file mode 100644 index 0000000..7a2c7c0 --- /dev/null +++ b/templates/frontend/outings-show.html.twig @@ -0,0 +1,101 @@ +{% extends 'base.html.twig' %} + +{% block title %} + +{% endblock %} + +{% block body %} +

+ {% if consultMode == 'create' %} + Créer une sortie + {% elseif consultMode == 'modif' %} + Modifier la sortie + {% else %} + Sortie + {% endif %} +

+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ +

Nantes

+
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+
+ +
+ + + +
+
+{% endblock %} diff --git a/templates/frontend/outings.html.twig b/templates/frontend/outings.html.twig new file mode 100644 index 0000000..07325e2 --- /dev/null +++ b/templates/frontend/outings.html.twig @@ -0,0 +1,152 @@ +{% extends 'base.html.twig' %} + +{% block title %}{{ parent() }} | Sorties{% endblock %} + +{% block body %} +
+
+ + +
+
+
Filtrez les sorties :
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+ + +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ +
+ +
+
+
+ + +
+ +
+ +
+

Vous êtes inscrit

+
+
+
NOM DE LA SORTIE (BLABLABLA JE RAJOUTE DU TEXTE SI CEST LONG)
+
Le 30/01/2024 à 18h30
+

Description, s'il y en a une

+
+
Nombre d'inscrits : 7/8
+
Clôture le 29/01/2024 à 18h30
+

Organisateur : totodu43

+ + + +
+
+ +
+
+
NOM DE LA SORTIE (BLABLABLA JE RAJOUTE DU TEXTE SI CEST LONG)
+
Le 30/01/2024 à 18h30
+

Description, s'il y en a une (longue description longue description longue description)

+
+
Nombre d'inscrits : 7/8
+
Clôture le 29/01/2024 à 18h30
+

Organisateur : totodu43

+ + + +
+
+ +
+
+
NOM DE LA SORTIE (BLABLABLA JE RAJOUTE DU TEXTE SI CEST LONG)
+
Le 30/01/2024 à 18h30
+

Description, s'il y en a une (longue description longue description longue description)

+
+
Nombre d'inscrits : 7/8
+
Clôture le 29/01/2024 à 18h30
+

Organisateur : totodu43

+ + + +
+
+ +
+
+
NOM DE LA SORTIE (BLABLABLA JE RAJOUTE DU TEXTE SI CEST LONG)
+
Le 30/01/2024 à 18h30
+

Description, s'il y en a une (longue description longue description longue description)

+
+
Nombre d'inscrits : 7/8
+
Clôture le 29/01/2024 à 18h30
+

Organisateur : totodu43

+ + + +
+
+
+
+
+{% endblock %} diff --git a/templates/frontend/profile-readonly.html.twig b/templates/frontend/profile-readonly.html.twig new file mode 100644 index 0000000..b76d93c --- /dev/null +++ b/templates/frontend/profile-readonly.html.twig @@ -0,0 +1,56 @@ +{% extends 'base.html.twig' %} + +{% block title %} + Mon Profil +{% endblock %} + +{% block body %} +
+
+
+

ShrekDu44

+ +
+
+ +
+

Shrek

+
+
+ +
+ +
+

Placeholder

+
+
+ +
+ +
+

0780078007

+
+
+ +
+ +
+

shrek@romainpourquoiencorecetteimage.fr

+
+
+ +
+ +
+

ENI Nantes

+
+
+ +
+
+ Retour +
+
+
+
+{% endblock %} diff --git a/templates/frontend/profile.html.twig b/templates/frontend/profile.html.twig new file mode 100644 index 0000000..4b0ecde --- /dev/null +++ b/templates/frontend/profile.html.twig @@ -0,0 +1,87 @@ +{% extends 'base.html.twig' %} + +{% block title %} + Mon Profil +{% endblock %} + +{% block body %} +
+

Mon profil

+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ + +
+
+
+
+{% endblock %} diff --git a/templates/group/create.html.twig b/templates/group/create.html.twig new file mode 100644 index 0000000..57533ac --- /dev/null +++ b/templates/group/create.html.twig @@ -0,0 +1,56 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouveau groupe | {{ parent() }}{% endblock %} + +{% block body %} +
+

+ {{ form_start(form) }} +
+
+ {{ form_row(form.groupName, { + 'attr': { + 'class': 'block rounded-t-lg px-2.5 pb-2.5 pt-5 w-full text-sm text-light-primary dark:text-dark-primary bg-light-secondary/50 dark:bg-dark-secondary border-0 border-b-2 border-light-primary/75 dark:border-dark-primary/75 appearance-none dark:border-dark-primary focus:outline-none focus:ring-0 focus:border-light-primary dark:focus:border-dark-primary peer', + 'id': 'groupeName', + 'placeholder': '' + } + }) }} + {{ form_label(form.groupName, 'Nom du groupe', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-dark-primary duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+
+ {{ form_widget(form.Guests, { + 'attr': { + 'class': 'block rousnded-t-lg px-2.5 pb-2.5 pt-5 w-full text-sm text-light-primary dark:text-dark-primary bg-light-secondary/50 dark:bg-dark-secondary border-0 border-b-2 border-light-primary/75 dark:border-dark-primary/75 appearance-none dark:border-dark-primary focus:outline-none focus:ring-0 focus:border-light-primary dark:focus:border-dark-primary peer', + 'id': 'guests', + 'placeholder': '' + } + }) }} + {{ form_label(form.Guests, 'Participants', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-dark-primary duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+
+ +
+
+ + +
+
+ + {{ form_end(form) }} + +
+{% endblock %} \ No newline at end of file diff --git a/templates/group/index.html.twig b/templates/group/index.html.twig new file mode 100644 index 0000000..cc18830 --- /dev/null +++ b/templates/group/index.html.twig @@ -0,0 +1,92 @@ +{% extends 'base.html.twig' %} + +{% block title %}Mes groupes | {{ parent() }}{% endblock %} + +{% block body %} +
+

Mes groupes

+ {% if groups %} +
+ {% for group in groups %} +

+ +

+ + {% endfor %} +
+{# #} + {% else %} +

Vous n'avez pas encore rejoint de + groupe

+{# #} +{# #} +{# #} + {% endif %} +
+{% endblock %} diff --git a/templates/home/index.html.twig b/templates/home/index.html.twig new file mode 100644 index 0000000..b7756d6 --- /dev/null +++ b/templates/home/index.html.twig @@ -0,0 +1,36 @@ +{% extends 'base.html.twig' %} + +{% block title %}{{ parent() }}{% endblock %} + +{% block body %} +
+
+
+ + +

+ Envie + + d'une sortie ? + +

+

+ Rejoignez des milliers de personnes pour sortir et faire de nouvelles rencontres +

+ +
+ +
+
+{% endblock %} diff --git a/templates/outing/card.html.twig b/templates/outing/card.html.twig new file mode 100644 index 0000000..cc48630 --- /dev/null +++ b/templates/outing/card.html.twig @@ -0,0 +1,90 @@ +
+
+
+ +
+
+
+ {% if outing.status.label == 'Annulée' %} + + Sortie annulée + + {% elseif outing.organizer == app.user %} + + Je suis l'organisateur + + {% elseif outing.isUserRegistered(app.user) %} + + Je suis inscrit + + {% elseif outing.canRegister() %} + + Inscriptions ouvertes + + {% elseif outing.registrations.count == outing.registrationsMax %} + + Sortie complète + + {% elseif outing.status.label == 'Activité en cours'%} + + Activité en cours + + {% elseif outing.status.label == 'Passée' or outing.startDate|date("Y-m-d H:i:s") > "now"|date("Y-m-d H:i:s") %} + + Sortie passée + + {% else %} + + Inscriptions fermées + + {% endif %} + + {% if outing.canRegister() %} +
+ + Inscription : {{ outing.registrations.count }}/{{ outing.registrationsMax }} + +
+ {% endif %} +
+
+ + {{ outing.startDate|date("d/m/Y") }} à {{ outing.startDate|date("H:i") }} + +
+
+
+ +
+

+ {{ outing.description }} +

+
+
+ +
+
+
\ No newline at end of file diff --git a/templates/outing/create.html.twig b/templates/outing/create.html.twig new file mode 100644 index 0000000..feaaffc --- /dev/null +++ b/templates/outing/create.html.twig @@ -0,0 +1,273 @@ +{% extends 'base.html.twig' %} + +{% set isModif = outing is defined and outing.id is not null %} + +{% block title %}{% if isModif %}Modifier la sortie "{{ outing.title }}"{% else %}Créer une sortie{% endif %} | {{ parent() }}{% endblock %} + +{% block body %} +
+

Créer une sortie

+ {{ form_start(form) }} +
+
+ {{ form_widget(form.title, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'title', + 'placeholder': '' + } + }) }} + {{ form_label(form.title, 'Nom de la sortie', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+
+ +
+ + +
+
+ {{ form_widget(form.startDate, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'startDate', + 'placeholder': '' + } + }) }} + {{ form_label(form.startDate, 'Date et heure de la sortie', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+ +
+ {{ form_widget(form.closingDate, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'closingDate', + 'placeholder': '' + } + }) }} + {{ form_label(form.closingDate, 'Date limite d\'inscription', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+ +
+ {{ form_widget(form.registrationsMax, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'registrationsMax', + 'placeholder': '' + } + }) }} + {{ form_label(form.registrationsMax, 'Nombre de place', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+ +
+ {{ form_widget(form.duration, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'duration', + 'placeholder': '' + } + }) }} + {{ form_label(form.duration, 'Durée (en minutes)', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+ +
+ {{ form_widget(form.place.city, { + 'attr': { + 'class': 'block rounded-t-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'city', + 'placeholder': '' + } + }) }} + {{ form_label(form.place.city, 'Ville', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+ +
+ {{ form_widget(form.place.name, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'placeName', + 'placeholder': '' + } + }) }} + {{ form_label(form.place.name, 'Lieu', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} + +
+ +
+ {{ form_widget(form.place.address, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'placeAddress', + 'placeholder': '' + } + }) }} + {{ form_label(form.place.address, 'Adresse', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+ +
+ {{ form_widget(form.place.latitude, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'placeLatitude', + 'placeholder': '' + } + }) }} + {{ form_label(form.place.latitude, 'Latitude', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+ +
+ {{ form_widget(form.place.longitude, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer', + 'id': 'placeLongitude', + 'placeholder': '' + } + }) }} + {{ form_label(form.place.longitude, 'Longitude', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + } + }) }} +
+
+
+ {{ form_widget(form.description, { + 'attr': { + 'class': 'block rounded-lg px-2.5 pb-2.5 pt-5 w-full text-sm dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300 peer columns-2', + 'id': 'description', + 'placeholder': '' + } + }) }} + {{ form_label(form.description, 'Description', { + 'label_attr': { + 'class': 'absolute text-sm text-light-primary dark:text-gray-300 duration-300 transform -translate-y-4 scale-75 top-4 z-10 origin-[0] start-2.5 peer-focus:text-light-primary dark:peer-focus:text-dark-primary peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto' + }, + }) }} +
+ +
+
+ +
+
+ + +
+ +
+
+ + + {% if isModif %} + + + + + Retour + + + + {% else %} + + {% endif %} +
+
+ + {{ form_end(form) }} +
+{% endblock %} \ No newline at end of file diff --git a/templates/outing/index.html.twig b/templates/outing/index.html.twig new file mode 100644 index 0000000..07410c3 --- /dev/null +++ b/templates/outing/index.html.twig @@ -0,0 +1,25 @@ +{% extends 'base.html.twig' %} + +{% block title %}Liste des sorties | {{ parent() }}{% endblock %} + +{% block body %} + +
+
+ {% include 'outing/search.html.twig' with {'formSearch':formSearch} only %} +
+ + {% if outings|length == 0 %} +

Aucune sortie ne correspond à + votre + recherche

+ {% else %} +
+ {% for outing in outings %} + {% include 'outing/card.html.twig' with {'outing': outing} %} + {% endfor %} +
+ {% endif %} +
+ +{% endblock %} diff --git a/templates/outing/preview.html.twig b/templates/outing/preview.html.twig new file mode 100644 index 0000000..edc8c86 --- /dev/null +++ b/templates/outing/preview.html.twig @@ -0,0 +1,176 @@ +{% extends 'base.html.twig' %} + +{% block title %}{{ outing.title }} | {{ parent() }}{% endblock %} + +{% block body %} +
+
+
+
+ {% if weather is not null %} +
+
+

{{ outing.place.city.name }}

+
+ {% if weather.weather == 0 %} + Météo + {% elseif weather.weather > 0 and weather.weather < 10 %} + Météo + {% elseif weather.weather >= 10 and weather.weather < 60 %} + Météo + {% elseif weather.weather >= 60 and weather.weather < 79 %} + Météo + {% elseif weather.weather >= 78 and weather.weather < 138 %} + Météo + {% else %} + Météo + {% endif %} + + +
{{ weather.tmin }}°C / {{ weather.tmax }}°C +
+
+ {% endif %} +
+

Publié par :

+ + {% if outing.organizer.profilePicture %} + Photo de profil de {{ outing.organizer.pseudo }} + {% else %} + Photo de profil de {{ outing.organizer.pseudo }} + {% endif %} +
+

+ {% if outing.organizer == app.user %} + Vous + {% else %} + {{ outing.organizer.firstname|capitalize }} {{ outing.organizer.lastname|upper }} + {% endif %} +

+

@{{ outing.organizer.pseudo }}

+

{{ outing.organizer.site.name }}

+
+
+
+ + {% if outing.status.label == "Annulée" %} + + {% else %} + {% if outing.isUserRegistered(app.user) and outing.organizer != app.user %} + + Se désister + + {% elseif outing.canUserRegister(app.user) %} + + S'inscrire + + {% elseif outing.organizer != app.user %} + + {% endif %} + {% if outing.organizer == app.user %} + + Modifier + + {% endif %} + {% endif %} + + +
+
+ +
+
+ +
+
+

+ {{ outing.title }} +

+
+ {# On regarde le label du statut de l'outing, si c'est créée ou ouverte on met le texte en success, si c'est activité en cours on met text-warning, sinon on met text-danger #} + {% set labelColor = outing.status.label == 'Créée' or outing.status.label == 'Ouverte' ? 'text-dark-success text-light-success' : outing.status.label == 'Activité en cours' ? 'text-dark-warning text-light-warning' : 'text-dark-danger text-light-danger' %} +

+ {{ outing.status.label }} +

+
+ {% if outing.poster %} + poster + {% endif %} + {% if app.user %} +

Lieu : {{ outing.place.name }}

+

Adresse + : {{ outing.place.address }}, {{ outing.place.city.name }} ({{ outing.place.city.postcode }} + )

+

Date + : {{ outing.startDate|format_datetime('long', 'short', locale='fr') }}

+ {% if outing.closingDate > date('now') %} +

Clôture des inscriptions + : + {{ outing.closingDate|format_datetime('long', 'short', locale='fr') }} +

+ {% endif %} + {% endif %} +

Nombre de participants inscrits + : + + {{ outing.registrations|length }} / {{ outing.registrationsMax }} + + +

+
+ +
+

{{ outing.description }}

+
+
+ +
+ + {% if outing.registrations|length > 0 %} +
+

Liste des participants

+
+ {% for registration in outing.registrations %} + + {% endfor %} +
+
+ {% endif %} +
+{% endblock %} + diff --git a/templates/outing/search.html.twig b/templates/outing/search.html.twig new file mode 100644 index 0000000..f9836a0 --- /dev/null +++ b/templates/outing/search.html.twig @@ -0,0 +1,108 @@ +{% if formSearch %} + {{ form_start(formSearch) }} +
+

Rechercher une sortie

+
+
+ + + +
+ {{ form_widget(formSearch.name, { + 'attr': { + 'class': 'block w-full pl-10 p-2.5 text-sm rounded-lg dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300', + 'id': 'simple-search', + 'placeholder': 'Recherche' + } + }) }} +
+
+
+ + {{ form_widget(formSearch.site, { + 'attr': { + 'id': 'campus', + 'class': 'text-sm rounded-lg my-2 block w-full border-gray-200 dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300' + } + }) }} +
+
+ + {{ form_widget(formSearch.startDate, { + 'attr': { + 'id': 'startDate', + 'class': 'text-sm rounded-lg my-2 block w-full border-gray-200 dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300' + } + }) }} +
+
+ + {{ form_widget(formSearch.endDate, { + 'attr': { + 'id': 'endDate', + 'class': 'text-sm rounded-lg my-2 block w-full border-gray-200 dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300' + } + }) }} +
+ +
+
    +
  • +
    + {{ form_widget(formSearch.isOrganizer, { + 'id': 'author', + 'attr': { + 'class': 'text-sm rounded-lg cursor-pointer w-4 h-4 bg-white dark:bg-dark-font border border-gray-300 text-light-primary dark:text-dark-primary focus:ring-0 dark:focus:ring-dark-primary' + } + }) }} + +
    +
  • +
  • +
    + {{ form_widget(formSearch.isRegistered, { + 'id': 'register', + 'attr': { + 'class': 'text-sm rounded-lg cursor-pointer w-4 h-4 bg-white dark:bg-dark-font border border-gray-300 text-light-primary dark:text-dark-primary focus:ring-0 dark:focus:ring-dark-primary' + } + }) }} + +
    +
  • +
  • +
    + {{ form_widget(formSearch.isNotRegistered, { + 'id': 'notResgister', + 'attr': { + 'class': 'text-sm rounded-lg cursor-pointer w-4 h-4 bg-white dark:bg-dark-font border border-gray-300 text-light-primary dark:text-dark-primary focus:ring-0 dark:focus:ring-dark-primary' + } + }) }} + +
    +
  • +
  • +
    + {{ form_widget(formSearch.isFinished, { + 'id': 'endOuting', + 'attr': { + 'class': 'text-sm rounded-lg cursor-pointer w-4 h-4 bg-white dark:bg-dark-font border border-gray-300 text-light-primary dark:text-dark-primary focus:ring-0 dark:focus:ring-dark-primary' + } + }) }} + +
    +
  • +
+
+
+ +
+ + +
+
+ {{ form_end(formSearch) }} +{% endif %} diff --git a/templates/reset_password/email.html.twig b/templates/reset_password/email.html.twig new file mode 100644 index 0000000..b4f613e --- /dev/null +++ b/templates/reset_password/email.html.twig @@ -0,0 +1,9 @@ +

Salut l'ami 👋

+ +

Alors on a oublié son mot de passe, pas de problème tu peux le réinitialiser avec le lien suivant : Réinitialiser mon mot de passe +

+ +

Attention ce lien expirera dans {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}

+ +

À tout de suite 😉

diff --git a/templates/reset_password/request.html.twig b/templates/reset_password/request.html.twig new file mode 100644 index 0000000..fa0d3bf --- /dev/null +++ b/templates/reset_password/request.html.twig @@ -0,0 +1,46 @@ +{% extends 'base.html.twig' %} + +{% block title %}Mot de passe oublié | {{ parent() }}{% endblock %} + +{% block body %} + +
+
+

Tu as + oublié ton mot de passe 😓

+ +

+ Pas de problème, on s'occupe de tout 😉 +

+ + {{ form_start(requestForm) }} +
+

C'est quoi ton + email ?

+
+ +
+ {{ form_widget(requestForm.email, { id:'email', attr: { class: 'w-full rounded-lg p-4 pe-12 text-sm shadow-sm border-gray-200 dark:bg-dark-font dark:text-white dark:border-dark-primary focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary dark:placeholder-gray-300', placeholder: 'Entrer votre email' } } ) }} + + + + + +
+
+ +

+ Tu as retrouvé ton mot de passe ? + Se connecter +

+
+ {{ form_end(requestForm) }} +
+
+{% endblock %} diff --git a/templates/reset_password/reset.html.twig b/templates/reset_password/reset.html.twig new file mode 100644 index 0000000..21a73a9 --- /dev/null +++ b/templates/reset_password/reset.html.twig @@ -0,0 +1,53 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouveau mot de passe | {{ parent() }}{% endblock %} + +{% block body %} +
+
+

Nouveau mot + de passe 😊

+ {{ form_start(resetForm) }} +
+

Votre nouveau mot + de passe

+
+ +
+ {{ form_widget(resetForm.plainPassword.first, { id:'firstPassword', attr: { class: 'w-full rounded-lg border-gray-200 p-4 pe-12 text-sm shadow-sm focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary', placeholder: 'Entrer votre nouveau mot de passe' } } ) }} + + + + + + +
+
+
+ +
+ {{ form_widget(resetForm.plainPassword.second, { id:'secondPassword', attr: { class: 'w-full rounded-lg border-gray-200 p-4 pe-12 text-sm shadow-sm focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary', placeholder: 'Confirmer votre nouveau mot de passe' } } ) }} + + + + + + +
+
+
+ +
+ {{ form_end(resetForm) }} +
+
+{% endblock %} diff --git a/templates/security/login.html.twig b/templates/security/login.html.twig new file mode 100644 index 0000000..464da4e --- /dev/null +++ b/templates/security/login.html.twig @@ -0,0 +1,71 @@ +{% extends 'base.html.twig' %} + +{% block title %}Connexion | {{ parent() }}{% endblock %} +{% block body %} + {% if error %} +
{{ error.messageKey|trans(error.messageData, 'security') }}
+ {% endif %} + +
+
+

Salut à toi + 👋

+

+ Connecte-toi pour accéder aux sorties et rencontrer de nouvelles personnes +

+
+

Connexion à votre + compte

+
+ +
+ + + + + + +
+
+
+ +
+ + + + + + + +
+
+
+ +
+ + +

+ Tu as oublié ton mot de passe ? + Réinitialise ton mot de + passe +

+
+
+
+{% endblock %} \ No newline at end of file diff --git a/templates/user/edit.html.twig b/templates/user/edit.html.twig new file mode 100644 index 0000000..2f77f87 --- /dev/null +++ b/templates/user/edit.html.twig @@ -0,0 +1,73 @@ +{% extends 'base.html.twig' %} + +{% block title %}Modifier son profil | {{ parent() }}{% endblock %} +{% block javascripts %} + {{ parent() }} + +{% endblock %} + +{% block body %} +
+ Photo de profil de {{ user.pseudo }} +

@{{ user.pseudo }}

+ {{ form_start(form) }} +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ {{ form_widget(form.profilePicture, { id:'file-upload', attr: { class: 'hidden'}}) }} + +
+
+
+ +
+ {{ form_end(form) }} +
+{% endblock %} diff --git a/templates/user/index.html.twig b/templates/user/index.html.twig new file mode 100644 index 0000000..f8cd12f --- /dev/null +++ b/templates/user/index.html.twig @@ -0,0 +1,56 @@ +{% extends 'base.html.twig' %} + +{% block title %}{% if user == app.user %}Mon profil{% else %}Profil de {{ user.pseudo }}{% endif %} | {{ parent() }}{% endblock %} + +{% block body %} +
+ Photo de profil de {{ user.pseudo }} +

{{ user.firstname|capitalize }} {{ user.lastname|upper }}

+

@{{ user.pseudo }}

+
+ +
+ {% if user == app.user %} +
+ +
+
+ +
+ + {% endif %} +
+{% endblock %} diff --git a/templates/user/reset_password.html.twig b/templates/user/reset_password.html.twig new file mode 100644 index 0000000..3bc97b4 --- /dev/null +++ b/templates/user/reset_password.html.twig @@ -0,0 +1,67 @@ +{% extends 'base.html.twig' %} + +{% block title %}Nouveau mot de passe | {{ parent() }}{% endblock %} + +{% block body %} +
+
+

Nouveau mot + de passe 😊

+ {{ form_start(form) }} +
+

Votre nouveau mot + de passe

+
+ +
+ {{ form_widget(form.oldPassword, { id:'firstPassword', attr: { class: 'w-full rounded-lg border-gray-200 p-4 pe-12 text-sm shadow-sm focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary', placeholder: 'Mot de passe actuel' } } ) }} + + + + + + +
+
+
+ +
+ {{ form_widget(form.plainPassword.first, { id:'firstPassword', attr: { class: 'w-full rounded-lg border-gray-200 p-4 pe-12 text-sm shadow-sm focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary', placeholder: 'Entrer votre nouveau mot de passe' } } ) }} + + + + + + +
+
+
+ +
+ {{ form_widget(form.plainPassword.second, { id:'secondPassword', attr: { class: 'w-full rounded-lg border-gray-200 p-4 pe-12 text-sm shadow-sm focus:ring-light-primary dark:focus:ring-dark-primary focus:border-light-primary dark:focus:border-dark-primary', placeholder: 'Confirmer votre nouveau mot de passe' } } ) }} + + + + + + +
+
+ +
+ {{ form_end(form) }} +
+
+ {% endblock %}