diff --git a/assets/app.js b/assets/app.js index 8506504..cb69778 100644 --- a/assets/app.js +++ b/assets/app.js @@ -7,3 +7,32 @@ // any CSS you import will output into a single css file (app.css in this case) import './styles/app.css'; + +console.log('Hello World de app.js'); + +function labourer() { + window.location.href = '/admin/labourer/' + document.getElementById('app_admin_labourer').value; +} + +// Attendre le chargement du DOM +document.addEventListener('DOMContentLoaded', () => { + // Générer une couleur pastel aléatoire + const genererCouleurPastel = () => { + // Utiliser des valeurs plus claires (180-255) pour obtenir des tons pastel + const r = Math.floor(Math.random() * 75 + 180); + const g = Math.floor(Math.random() * 75 + 180); + const b = Math.floor(Math.random() * 75 + 180); + return `rgb(${r}, ${g}, ${b})`; + }; + + const randombg = genererCouleurPastel(); + // Appliquer la couleur au body + document.body.style.backgroundColor = randombg; + // Appliquer le style pour .body-landing + const bodyLanding = document.querySelector('.body-landing'); + if (bodyLanding) { + bodyLanding.style.backgroundColor = randombg; + } + +}); + diff --git a/assets/styles/app.css b/assets/styles/app.css index cb33b13..e65de48 100644 --- a/assets/styles/app.css +++ b/assets/styles/app.css @@ -1,3 +1,9 @@ body { - background-color: lightgray; + background-color: rgb(236, 236, 236); } + +.body-landing .container { + background-color: white; + border-radius: 10px; + padding: 20px; +} \ No newline at end of file diff --git a/public/assets/css/global.css b/public/css/global.css similarity index 100% rename from public/assets/css/global.css rename to public/css/global.css diff --git a/public/css/main.css b/public/css/main.css new file mode 100644 index 0000000..52bc912 --- /dev/null +++ b/public/css/main.css @@ -0,0 +1,68 @@ +/* Layout général */ +.body-landing { + background-color: rgb(255, 255, 255); + min-height: 100vh; + padding-bottom: 5rem; +} + +/* Header */ +.main-header { + background-color: #fff; + box-shadow: 0 2px 4px rgba(0, 0, 0, .1); + padding: 1rem 0; + margin-bottom: 2rem; +} + +.main-header h1 { + font-size: 1.5rem; + margin: 0; +} + +.main-header a { + text-decoration: none; + color: inherit; +} + +/* Footer */ +.main-footer { + background-color: #f8f9fa; + padding: 2rem 0; + margin-top: 3rem; + border-top: 1px solid #dee2e6; +} + +.main-footer p { + margin-bottom: 0.5rem; +} + +.main-footer a { + color: #0d6efd; + text-decoration: none; +} + +.main-footer a:hover { + text-decoration: underline; +} + +/* Barre de progression */ +#completion_progress { + position: fixed; + bottom: 0; + width: 100%; + padding: 1rem; + background-color: white; + border-top: 1px solid #e9ecef; + z-index: 1000; + box-shadow: 0 -2px 4px rgba(0, 0, 0, .1); +} + +/* Media queries */ +@media (max-width: 768px) { + .main-header h1 { + font-size: 1.25rem; + } + + .main-footer { + padding: 1.5rem 0; + } +} \ No newline at end of file diff --git a/public/logo-osm.png b/public/logo-osm.png new file mode 100644 index 0000000..4388167 Binary files /dev/null and b/public/logo-osm.png differ diff --git a/src/Controller/AdminController.php b/src/Controller/AdminController.php index 1df185f..a7489d5 100644 --- a/src/Controller/AdminController.php +++ b/src/Controller/AdminController.php @@ -200,7 +200,7 @@ final class AdminController extends AbstractController ->setModifiedDate(new \DateTime()) ->setAskedHumainsSupport(false) ->setLastContactAttemptDate(null) - ->setStats(null) + ->setStats($stats) ->setNote($result['tags'] && isset($result['tags']['note']) ? isset($result['tags']['note']) : null) ->setHasOpeningHours($result['tags'] && isset($result['tags']['opening_hours']) ? isset($result['tags']['opening_hours']) : null) ->setHasAddress(($result['tags'] && isset($result['tags']['address']) || $result['tags'] && isset($result['tags']['contact:address'])) ? isset($result['tags']['address']) : null) diff --git a/templates/base.html.twig b/templates/base.html.twig index baf560e..2ea2361 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -1,112 +1,98 @@ - + + {% block title %}Welcome!{% endblock %} + + + {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #} - - {% block stylesheets %} - + {% block stylesheets %} {{ encore_entry_link_tags('app') }} {% endblock %} - -
-
-
-
- -
-
-
-
-
-
- - - {% for label, messages in app.flashes %} - {% for message in messages %} -
+ +
+
+
+
+
- - + +
+ {% block body %}{% endblock %} +
+ + {% block javascripts %} {{ encore_entry_script_tags('app') }} + {% endblock %} + diff --git a/templates/public/dashboard.html.twig b/templates/public/dashboard.html.twig index 99d952a..b43df5c 100644 --- a/templates/public/dashboard.html.twig +++ b/templates/public/dashboard.html.twig @@ -12,6 +12,15 @@ {% endblock %} +{% block javascripts %} + {{ parent() }} + +{% endblock %} + {% block body %}
@@ -21,6 +30,10 @@

Statistiques : {{ stats|length }} commerces

+ + + + diff --git a/templates/public/edit.html.twig b/templates/public/edit.html.twig index 03352e7..0bae6e2 100644 --- a/templates/public/edit.html.twig +++ b/templates/public/edit.html.twig @@ -11,22 +11,26 @@ .is-invalid { border: 1px solid red; } .is-invalid #validation_messages { color: red; } img { max-width: 100%; max-height: 400px; } + @media (max-width: 768px) { + .form-label { margin-bottom: 0.5rem; } + .mb-3 { margin-bottom: 1rem !important; } + } {% endblock %} {% block body %} -
-
-
+
+
+
-

{{ 'display.welcome'|trans }} {{ commerce_overpass.tags_converted.name }}

-
+

{{ 'display.welcome'|trans }} {{ commerce_overpass.tags_converted.name }}

+
{% if commerce_overpass is not empty %}
-
+
-
- {{ 'display.contact_humans'|trans }} +
{% if commerce.tags_converted.image is defined %} - Image du lieu + Image du lieu {% endif %} -

{{ 'display.attributes'|trans }}

-
-
- +

{{ 'display.attributes'|trans }}

+
+
+
-
+
@@ -63,14 +68,9 @@ {% include 'public/edit/address.html.twig' %} {% endif %} - {% if hide_filled_inputs and (commerce_overpass.tags_converted.opening_hours) is defined and commerce_overpass.tags_converted.opening_hours is empty %} {% include 'public/edit/opening_hours.html.twig' %} {% endif %} - - {% if (commerce_overpass.tags_converted.wheelchair) is defined %} - {{ dump(commerce_overpass.tags_converted.wheelchair) }} - {% endif %} {% if hide_filled_inputs and (commerce_overpass.tags_converted.wheelchair) is defined and commerce_overpass.tags_converted.wheelchair is empty %} {% include 'public/edit/wheelchair.html.twig' %} @@ -81,33 +81,43 @@ {% include 'public/edit/tags.html.twig' %} -
- +
+
+ +
{% endif %}
-
-
- - {{ 'display.last_modification'|trans }}: {{ commerce_overpass['@attributes'].timestamp }}, - {{ 'display.days_ago'|trans({'%days%': date(commerce_overpass['@attributes'].timestamp).diff(date()).days}) }} - {{ 'display.by'|trans }} - {{ commerce_overpass['@attributes'].user }} -
- {{ 'display.view_on_osm'|trans }} +
+
+
+
+
+
+ {{ 'display.last_modification'|trans }}: {{ commerce_overpass['@attributes'].timestamp }}, + {{ 'display.days_ago'|trans({'%days%': date(commerce_overpass['@attributes'].timestamp).diff(date()).days}) }} + {{ 'display.by'|trans }} + {{ commerce_overpass['@attributes'].user }} +
+ +
+
+

+ {{ 'display.disclaimer.title'|trans }}: + {{ 'display.disclaimer.text'|trans }} +

+
- -
-

- {{ 'display.disclaimer.title'|trans }}: - {{ 'display.disclaimer.text'|trans }} -

diff --git a/templates/public/home.html.twig b/templates/public/home.html.twig index 8b98a98..f85eda6 100644 --- a/templates/public/home.html.twig +++ b/templates/public/home.html.twig @@ -20,25 +20,26 @@

Mon Commerce OSM

-

- Bonjour, ce site permet de modifier les informations de votre commerce sur OpenStreetMap afin de gagner en visibilité sur des milliers de sites web à la fois en une minute, c'est gratuit et sans engagement. Nous sommes bénévoles dans une association à but non lucratif. -
- Nous vous enverrons un lien unique pour cela par email, et si vous en avez besoin, nous pouvons vous aider. +

+ Bonjour, ce site permet de modifier les informations de votre commerce sur OpenStreetMap afin de gagner en visibilité sur des milliers de sites web à la fois en une minute, c'est gratuit et sans engagement. +
Nous sommes bénévoles dans une association à but non lucratif. +
Nous vous enverrons un lien unique pour cela par email, et si vous en avez besoin, nous pouvons vous aider.

-
- -
+ +
@@ -62,13 +63,13 @@ // Créer les divs pour les messages const proposeLinkHtml = ` -