From 0ab1ecbba491ec4ffd956aee36461ad52c3e7df5 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 28 Jun 2022 16:35:46 +0200 Subject: [PATCH 01/35] =?UTF-8?q?Tentatives=20d'ic=C3=B4nes=20monochrome?= =?UTF-8?q?=20openmoji=20adapt=C3=A9s=20pour=20=C3=A9cran=20de=20fin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/model/alimentation . boisson.svg | 24 ++++ source/images/model/alimentation . repas.svg | 77 +++++++++++++ .../model/transport . voiture . empreinte.svg | 103 ++++++++++++++++++ source/sites/publicodes/chart/SquaresGrid.tsx | 7 +- 4 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 source/images/model/alimentation . boisson.svg create mode 100644 source/images/model/alimentation . repas.svg create mode 100644 source/images/model/transport . voiture . empreinte.svg diff --git a/source/images/model/alimentation . boisson.svg b/source/images/model/alimentation . boisson.svg new file mode 100644 index 0000000000..0be6d57a2e --- /dev/null +++ b/source/images/model/alimentation . boisson.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/alimentation . repas.svg b/source/images/model/alimentation . repas.svg new file mode 100644 index 0000000000..a199a69d82 --- /dev/null +++ b/source/images/model/alimentation . repas.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + diff --git a/source/images/model/transport . voiture . empreinte.svg b/source/images/model/transport . voiture . empreinte.svg new file mode 100644 index 0000000000..457c78f414 --- /dev/null +++ b/source/images/model/transport . voiture . empreinte.svg @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index 0784b4f607..766c54ad66 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -109,12 +109,17 @@ const GridItem = ({ title={`${element.title} (${element.topCategoryTitle})`} css={` background: ${element.topCategoryColor}; + img { + filter: invert(1); + width: 2.3rem; + height: auto; + } `} ref={ref} variants={itemVariants} custom={delayRef} > - + ) } From 750d55f9fae64dfd0ce7551f19b12c7e84d5144e Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 28 Jun 2022 16:53:42 +0200 Subject: [PATCH 02/35] =?UTF-8?q?It=C3=A9rations=20sur=20les=20ic=C3=B4nes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/model/alimentation . boisson.svg | 188 ++++++++++++-- .../model/alimentation . d\303\251chets.svg" | 241 ++++++++++++++++++ .../alimentation . gaspillage alimentaire.svg | 241 ++++++++++++++++++ source/images/model/alimentation . repas.svg | 26 +- source/images/model/divers . textile.svg | 21 ++ source/images/model/transport . avion.svg | 15 ++ source/images/model/transport . bus.svg | 28 ++ .../transport . deux roues thermique.svg | 29 +++ .../model/transport . voiture . empreinte.svg | 78 ++++-- source/sites/publicodes/chart/SquaresGrid.tsx | 4 +- 10 files changed, 809 insertions(+), 62 deletions(-) create mode 100644 "source/images/model/alimentation . d\303\251chets.svg" create mode 100644 source/images/model/alimentation . gaspillage alimentaire.svg create mode 100644 source/images/model/divers . textile.svg create mode 100644 source/images/model/transport . avion.svg create mode 100644 source/images/model/transport . bus.svg create mode 100644 source/images/model/transport . deux roues thermique.svg diff --git a/source/images/model/alimentation . boisson.svg b/source/images/model/alimentation . boisson.svg index 0be6d57a2e..ebefb7b113 100644 --- a/source/images/model/alimentation . boisson.svg +++ b/source/images/model/alimentation . boisson.svg @@ -1,24 +1,170 @@ - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git "a/source/images/model/alimentation . d\303\251chets.svg" "b/source/images/model/alimentation . d\303\251chets.svg" new file mode 100644 index 0000000000..fa10597759 --- /dev/null +++ "b/source/images/model/alimentation . d\303\251chets.svg" @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/alimentation . gaspillage alimentaire.svg b/source/images/model/alimentation . gaspillage alimentaire.svg new file mode 100644 index 0000000000..fa10597759 --- /dev/null +++ b/source/images/model/alimentation . gaspillage alimentaire.svg @@ -0,0 +1,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/alimentation . repas.svg b/source/images/model/alimentation . repas.svg index a199a69d82..4b42c8ae45 100644 --- a/source/images/model/alimentation . repas.svg +++ b/source/images/model/alimentation . repas.svg @@ -21,9 +21,9 @@ inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" showgrid="false" - inkscape:zoom="8.6511298" - inkscape:cx="37.39396" - inkscape:cy="30.227266" + inkscape:zoom="3.6640649" + inkscape:cx="22.515977" + inkscape:cy="32.886972" inkscape:window-width="950" inkscape:window-height="1163" inkscape:window-x="962" @@ -37,8 +37,8 @@ fill="none" stroke="#000000" stroke-miterlimit="10" - stroke-width="2" - d="M 31.78954,34.465477 C 31.78954,23.971994 26.9502,14.1351 26.9502,16 c 0,1.8649 0.9471,26.6324 0.9471,26.6324 l -0.9471,16.1963 c 0,1.1046 0.8954,2 2,2 1.1046,0 2,-0.8954 2,-2 L 30.4213,42.5394 c -10e-5,0 1.36824,-2.130823 1.36824,-8.073923 z" + stroke-width="2.47982" + d="m 31.174552,31.248939 c 0,-13.010977 -6.000347,-25.2078436 -6.000347,-22.8955349 0,2.3123089 1.174319,33.0217869 1.174319,33.0217869 L 25.174205,61.45715 c 0,1.369605 1.110215,2.479821 2.47982,2.479821 1.369605,0 2.479821,-1.110216 2.479821,-2.479821 L 29.478057,41.25988 c -1.24e-4,0 1.696495,-2.64203 1.696495,-10.010941 z" id="path214" style="fill:#000000;fill-opacity:1" sodipodi:nodetypes="ssccsccs" /> @@ -48,8 +48,8 @@ stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" - stroke-width="2" - d="m 45.9384,15.99936 c 0,0 0.563739,5.017208 0.563739,8.965008 0,2.9609 -1.351539,3.961092 -2.633139,4.705792 v 0 c 0,0 -3.164835,-0.02667 -3.1607,0.0058 v 0 c -1.287,-0.7408 -2.744062,-1.668938 -2.744062,-4.637538 0,-3.9478 0.664562,-9.039062 0.664562,-9.039062" + stroke-width="2.47982" + d="m 48.717869,8.3526105 c 0,0 0.698986,6.2208885 0.698986,11.1158065 0,3.67125 -1.675787,4.911398 -3.264856,5.834759 v 0 c 0,0 -3.924112,-0.03307 -3.918985,0.0072 v 0 c -1.595764,-0.918526 -3.40239,-2.069333 -3.40239,-5.750131 0,-4.894918 0.823997,-11.2076265 0.823997,-11.2076265" id="path216" style="fill:none;fill-opacity:1" sodipodi:nodetypes="cssccssc" /> @@ -59,18 +59,18 @@ stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" - stroke-width="2" - d="m 43.862346,30.540661 0.0285,28.4181 c 0,1.1046 -0.8954,2 -2,2 -1.1046,0 -2,-0.8954 -2,-2 l 0.8108,-28.4123 c 0,0 3.125473,0.102126 3.1607,-0.0058 z" + stroke-width="2.47982" + d="m 46.143748,26.38252 0.03534,35.235894 c 0,1.369605 -1.110216,2.479821 -2.479821,2.479821 -1.369605,0 -2.47982,-1.110216 -2.47982,-2.479821 l 1.005319,-35.228703 c 0,0 3.875306,0.126627 3.918984,-0.0072 z" id="path216-6" style="fill:#000000;fill-opacity:1" sodipodi:nodetypes="ccsccc" /> diff --git a/source/images/model/divers . textile.svg b/source/images/model/divers . textile.svg new file mode 100644 index 0000000000..a0e21b8b25 --- /dev/null +++ b/source/images/model/divers . textile.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . avion.svg b/source/images/model/transport . avion.svg new file mode 100644 index 0000000000..f51dcee095 --- /dev/null +++ b/source/images/model/transport . avion.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . bus.svg b/source/images/model/transport . bus.svg new file mode 100644 index 0000000000..ae21c1c2aa --- /dev/null +++ b/source/images/model/transport . bus.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . deux roues thermique.svg b/source/images/model/transport . deux roues thermique.svg new file mode 100644 index 0000000000..edbbbf8cfe --- /dev/null +++ b/source/images/model/transport . deux roues thermique.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . voiture . empreinte.svg b/source/images/model/transport . voiture . empreinte.svg index 457c78f414..bbe6f4864c 100644 --- a/source/images/model/transport . voiture . empreinte.svg +++ b/source/images/model/transport . voiture . empreinte.svg @@ -10,9 +10,9 @@ xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> + id="defs214" /> + inkscape:current-layer="emoji" /> + id="color" + transform="matrix(1.0427672,0,0,1.0427672,-1.406069,-2.4120688)"> + + + + + + + + + d="M 8.1,51.4" + id="path196" /> + id="line198" /> + d="M 8.1,51.4 C 7.2,51.2 6.4,50.9 6.3,50.4 6.2,49.4 6,46.6 6,45.3 6,44.8 6.1,44.2 6.4,43.8 7.5,41.8 11.2,37 21.3,37.4 L 31.6,30.5 C 32.1,30.2 32.7,30 33.2,30 l 19.6,-0.1 c 0.3,0 0.6,0 0.9,0.1 2.2,0.6 11.7,4 10.4,12.6 l 1.1,0.6 c 0.5,0.2 0.9,0.7 1,1.2 0.4,1.4 0.3,2.9 -0.2,4.3" + id="path200" /> + id="polyline202" /> + id="circle204" /> + id="circle206" /> + id="polyline208" /> diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index 766c54ad66..25fd41a87f 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -110,8 +110,8 @@ const GridItem = ({ css={` background: ${element.topCategoryColor}; img { - filter: invert(1); - width: 2.3rem; + filter: grayscale(1) invert(1) brightness(1.8); + width: 2rem; height: auto; } `} From cc98862e92d37cfeb27f0e40914980896dc02dc0 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 28 Jun 2022 17:46:41 +0200 Subject: [PATCH 03/35] =?UTF-8?q?It=C3=A9ration=20nouvelle=20sur=20les=20i?= =?UTF-8?q?c=C3=B4nes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/model/divers . autres produits.svg | 21 ++ source/images/model/divers . textile.svg | 157 ++++++++- ...divers . \303\251lectrom\303\251nager.svg" | 23 ++ source/images/model/logement . chauffage.svg | 115 ++++++ .../images/model/logement . construction.svg | 127 +++++++ .../logement . \303\251lectricit\303\251.svg" | 60 ++++ source/images/model/maison.svg | 19 + .../num\303\251rique . ordinateur fixe.svg" | 18 + ...um\303\251rique . ordinateur portable.svg" | 123 +++++++ source/images/model/services publics.svg | 179 ++++++++++ source/images/model/transport . avion.svg | 97 ++++- source/images/model/transport . bus.svg | 333 ++++++++++++++++-- .../transport . deux roues thermique.svg | 211 +++++++++-- .../model/transport . voiture . empreinte.svg | 71 ++-- source/sites/publicodes/chart/SquaresGrid.tsx | 6 + 15 files changed, 1455 insertions(+), 105 deletions(-) create mode 100644 source/images/model/divers . autres produits.svg create mode 100644 "source/images/model/divers . \303\251lectrom\303\251nager.svg" create mode 100644 source/images/model/logement . chauffage.svg create mode 100644 source/images/model/logement . construction.svg create mode 100644 "source/images/model/logement . \303\251lectricit\303\251.svg" create mode 100644 source/images/model/maison.svg create mode 100644 "source/images/model/num\303\251rique . ordinateur fixe.svg" create mode 100644 "source/images/model/num\303\251rique . ordinateur portable.svg" create mode 100644 source/images/model/services publics.svg diff --git a/source/images/model/divers . autres produits.svg b/source/images/model/divers . autres produits.svg new file mode 100644 index 0000000000..c4fdab7650 --- /dev/null +++ b/source/images/model/divers . autres produits.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/divers . textile.svg b/source/images/model/divers . textile.svg index a0e21b8b25..94090747d3 100644 --- a/source/images/model/divers . textile.svg +++ b/source/images/model/divers . textile.svg @@ -1,21 +1,142 @@ - - - - - - - + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + diff --git "a/source/images/model/divers . \303\251lectrom\303\251nager.svg" "b/source/images/model/divers . \303\251lectrom\303\251nager.svg" new file mode 100644 index 0000000000..714b358410 --- /dev/null +++ "b/source/images/model/divers . \303\251lectrom\303\251nager.svg" @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/logement . chauffage.svg b/source/images/model/logement . chauffage.svg new file mode 100644 index 0000000000..600ce52e94 --- /dev/null +++ b/source/images/model/logement . chauffage.svg @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/logement . construction.svg b/source/images/model/logement . construction.svg new file mode 100644 index 0000000000..7d19cb0b02 --- /dev/null +++ b/source/images/model/logement . construction.svg @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + diff --git "a/source/images/model/logement . \303\251lectricit\303\251.svg" "b/source/images/model/logement . \303\251lectricit\303\251.svg" new file mode 100644 index 0000000000..e72679985f --- /dev/null +++ "b/source/images/model/logement . \303\251lectricit\303\251.svg" @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + diff --git a/source/images/model/maison.svg b/source/images/model/maison.svg new file mode 100644 index 0000000000..fa2faf7798 --- /dev/null +++ b/source/images/model/maison.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git "a/source/images/model/num\303\251rique . ordinateur fixe.svg" "b/source/images/model/num\303\251rique . ordinateur fixe.svg" new file mode 100644 index 0000000000..73c39e050d --- /dev/null +++ "b/source/images/model/num\303\251rique . ordinateur fixe.svg" @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git "a/source/images/model/num\303\251rique . ordinateur portable.svg" "b/source/images/model/num\303\251rique . ordinateur portable.svg" new file mode 100644 index 0000000000..ad7984d71c --- /dev/null +++ "b/source/images/model/num\303\251rique . ordinateur portable.svg" @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/services publics.svg b/source/images/model/services publics.svg new file mode 100644 index 0000000000..7cef3a59d3 --- /dev/null +++ b/source/images/model/services publics.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . avion.svg b/source/images/model/transport . avion.svg index f51dcee095..d2bf209437 100644 --- a/source/images/model/transport . avion.svg +++ b/source/images/model/transport . avion.svg @@ -1,15 +1,88 @@ - - - - - + + + + + + + + - - - - - - - + + + + + + + diff --git a/source/images/model/transport . bus.svg b/source/images/model/transport . bus.svg index ae21c1c2aa..e76a6544ab 100644 --- a/source/images/model/transport . bus.svg +++ b/source/images/model/transport . bus.svg @@ -1,28 +1,311 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . deux roues thermique.svg b/source/images/model/transport . deux roues thermique.svg index edbbbf8cfe..848b0d1b58 100644 --- a/source/images/model/transport . deux roues thermique.svg +++ b/source/images/model/transport . deux roues thermique.svg @@ -1,29 +1,188 @@ - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . voiture . empreinte.svg b/source/images/model/transport . voiture . empreinte.svg index bbe6f4864c..ae09a11362 100644 --- a/source/images/model/transport . voiture . empreinte.svg +++ b/source/images/model/transport . voiture . empreinte.svg @@ -10,7 +10,32 @@ xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> + id="defs214"> + + + + + + + inkscape:current-layer="line" /> - + sodipodi:nodetypes="ccccccccccccccccccccccc" + clip-path="url(#clipPath12474)" + inkscape:path-effect="#path-effect12478" + inkscape:original-d="m 64.8,44 -1.1,-0.6 c -0.4,-0.2 -0.6,-0.6 -0.5,-1 0.3,-1.9 0.5,-8.5 -9.7,-11.5 -0.2,-0.1 -0.4,-0.1 -0.6,-0.1 l -19.6,0.1 c -0.4,0 -0.8,0.1 -1.1,0.3 l -10.3,6.9 c -0.2,0.1 -0.4,0.2 -0.6,0.2 -1.9,-0.1 -3.7,0.1 -5.6,0.4 -5.4,1.1 -7.6,4 -8.4,5.5 -0.2,0.3 -0.2,0.7 -0.2,1 0.1,2.4 -1.5,5.1 0.9,7.3 l 4.355681,0.06118 1.391374,-4.965418 8.785879,-1.781745 C 23.809732,48.980834 24.261552,51.264184 27.4,52.4 l 20.4,-0.5 c 5.412641,0.679933 3.378852,-3.560474 5.930011,-5.813346 l 6.386686,0.101159 2.732357,5.955338 C 63.749054,52.043054 66.3,50.3 66.7,49.4999 68.4,46.8 65,44.1 64.8,44 Z" /> + stroke-width="2.40992" + id="circle204-3" /> Date: Tue, 28 Jun 2022 14:36:39 +0200 Subject: [PATCH 04/35] =?UTF-8?q?Nouvel=20ic=C3=B4ne=20pour=20la=20page=20?= =?UTF-8?q?profil=20au=20style=20des=202=20autres?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SessionBar.tsx | 2 +- source/images/silhouette.svg | 65 ++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 source/images/silhouette.svg diff --git a/source/components/SessionBar.tsx b/source/components/SessionBar.tsx index 50235cde03..89c3c1f076 100644 --- a/source/components/SessionBar.tsx +++ b/source/components/SessionBar.tsx @@ -36,7 +36,7 @@ const openmojis = { action: 'E10C', conference: '1F3DF', sondage: '1F4CA', - profile: '1F464', + profile: 'silhouette', personas: '1F465', github: 'E045', } diff --git a/source/images/silhouette.svg b/source/images/silhouette.svg new file mode 100644 index 0000000000..f4f29c72f5 --- /dev/null +++ b/source/images/silhouette.svg @@ -0,0 +1,65 @@ + + + + + + + + + + From 7a29a83aca808abd611cfee52efacea3b197657f Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 28 Jun 2022 18:16:01 +0200 Subject: [PATCH 05/35] =?UTF-8?q?Ic=C3=B4nes=20manquants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ion . d\303\251jeuner et d\303\256ner.svg" | 0 ...tation . petit d\303\251jeuner annuel.svg" | 124 ++++++++++++++++ ...divers . \303\251lectrom\303\251nager.svg" | 136 +++++++++++++++--- 3 files changed, 240 insertions(+), 20 deletions(-) rename source/images/model/alimentation . repas.svg => "source/images/model/alimentation . d\303\251jeuner et d\303\256ner.svg" (100%) create mode 100644 "source/images/model/alimentation . petit d\303\251jeuner annuel.svg" diff --git a/source/images/model/alimentation . repas.svg "b/source/images/model/alimentation . d\303\251jeuner et d\303\256ner.svg" similarity index 100% rename from source/images/model/alimentation . repas.svg rename to "source/images/model/alimentation . d\303\251jeuner et d\303\256ner.svg" diff --git "a/source/images/model/alimentation . petit d\303\251jeuner annuel.svg" "b/source/images/model/alimentation . petit d\303\251jeuner annuel.svg" new file mode 100644 index 0000000000..ab97b6737f --- /dev/null +++ "b/source/images/model/alimentation . petit d\303\251jeuner annuel.svg" @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + diff --git "a/source/images/model/divers . \303\251lectrom\303\251nager.svg" "b/source/images/model/divers . \303\251lectrom\303\251nager.svg" index 714b358410..4a5b9af3ef 100644 --- "a/source/images/model/divers . \303\251lectrom\303\251nager.svg" +++ "b/source/images/model/divers . \303\251lectrom\303\251nager.svg" @@ -1,23 +1,119 @@ - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + From 2c7c5a721474fc198393af710864887798445a89 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 28 Jun 2022 18:36:21 +0200 Subject: [PATCH 06/35] =?UTF-8?q?Derniers=20ic=C3=B4nes=20retouch=C3=A9s?= =?UTF-8?q?=20pour=20une=20v1=20pour=20persona=20moyen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/model/divers . autres produits.svg | 148 +++++++++++++++--- .../num\303\251rique . ordinateur fixe.svg" | 136 ++++++++++++++-- ...um\303\251rique . ordinateur portable.svg" | 11 +- 3 files changed, 257 insertions(+), 38 deletions(-) diff --git a/source/images/model/divers . autres produits.svg b/source/images/model/divers . autres produits.svg index c4fdab7650..fe55cac1c5 100644 --- a/source/images/model/divers . autres produits.svg +++ b/source/images/model/divers . autres produits.svg @@ -1,21 +1,133 @@ - - - - - - - - + + + + + + + + + + - - - - - - - - - - + + + + + + + + + diff --git "a/source/images/model/num\303\251rique . ordinateur fixe.svg" "b/source/images/model/num\303\251rique . ordinateur fixe.svg" index 73c39e050d..133a291d6b 100644 --- "a/source/images/model/num\303\251rique . ordinateur fixe.svg" +++ "b/source/images/model/num\303\251rique . ordinateur fixe.svg" @@ -1,18 +1,124 @@ - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + diff --git "a/source/images/model/num\303\251rique . ordinateur portable.svg" "b/source/images/model/num\303\251rique . ordinateur portable.svg" index ad7984d71c..133a291d6b 100644 --- "a/source/images/model/num\303\251rique . ordinateur portable.svg" +++ "b/source/images/model/num\303\251rique . ordinateur portable.svg" @@ -3,7 +3,7 @@ id="emoji" viewBox="0 0 72 72" version="1.1" - sodipodi:docname="numérique . ordinateur portable.svg" + sodipodi:docname="numérique . ordinateur fixe.svg" inkscape:version="1.2 (56b05e47e7, 2022-06-09, custom)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" @@ -22,8 +22,8 @@ inkscape:deskcolor="#d1d1d1" showgrid="false" inkscape:zoom="4.5900169" - inkscape:cx="30.827773" - inkscape:cy="32.570686" + inkscape:cx="31.045637" + inkscape:cy="32.78855" inkscape:window-width="950" inkscape:window-height="1163" inkscape:window-x="962" @@ -45,14 +45,15 @@ stroke-miterlimit="10" stroke-width="2" d="M63.1941,56H9.2323c-2.8026,0-5.0746-2.272-5.0746-5.0746V16.033c0-2.8026,2.272-5.0746,5.0746-5.0746h53.9618 c2.8026,0,5.0746,2.272,5.0746,5.0746v34.8924C68.2687,53.728,65.9967,56,63.1941,56z" - id="path27439" /> + id="path27439" + style="fill:#1a1a1a;fill-opacity:1" /> + style="fill:#9c9393;fill-opacity:1" /> Date: Wed, 24 Aug 2022 13:37:36 +0200 Subject: [PATCH 07/35] =?UTF-8?q?Plus=20besoin=20d'inverser=20la=20couleur?= =?UTF-8?q?=20de=20l'ic=C3=B4ne=20profil=20sur=20l'accueil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/publicodes/Landing.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sites/publicodes/Landing.js b/source/sites/publicodes/Landing.js index c67823c9f9..8191f087b9 100644 --- a/source/sites/publicodes/Landing.js +++ b/source/sites/publicodes/Landing.js @@ -165,7 +165,7 @@ const ProfileLink = () => { From 1021d310ee2dcccdf9a9247ad19c372e50479c74 Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 24 Aug 2022 13:42:11 +0200 Subject: [PATCH 08/35] =?UTF-8?q?Inversion=20des=20couleurs=20de=20relief?= =?UTF-8?q?=20du=20thermom=C3=A8tre?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/images/model/logement . chauffage.svg | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/images/model/logement . chauffage.svg b/source/images/model/logement . chauffage.svg index 600ce52e94..0c701392d5 100644 --- a/source/images/model/logement . chauffage.svg +++ b/source/images/model/logement . chauffage.svg @@ -4,7 +4,7 @@ viewBox="0 0 72 72" version="1.1" sodipodi:docname="logement . chauffage.svg" - inkscape:version="1.2 (56b05e47e7, 2022-06-09, custom)" + inkscape:version="1.2.1 (ef4d3fba62, 2022-07-19, custom)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" @@ -23,11 +23,11 @@ showgrid="false" inkscape:zoom="5.6359993" inkscape:cx="36.55075" - inkscape:cy="43.914129" - inkscape:window-width="632" - inkscape:window-height="1163" - inkscape:window-x="642" - inkscape:window-y="4" + inkscape:cy="44.09156" + inkscape:window-width="1920" + inkscape:window-height="1175" + inkscape:window-x="0" + inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="color" /> + style="fill:#d22f27;fill-opacity:1" /> + id="path10761" + style="fill:#fa8a7c;fill-opacity:1" /> From f57223718f1619c71797f2e54f6cc09439fd6fac Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 24 Aug 2022 13:58:57 +0200 Subject: [PATCH 09/35] =?UTF-8?q?M=C3=A9moire=20de=20la=20viz=20en=20s?= =?UTF-8?q?=C3=A9lectionn=C3=A9e=20des=20persona=20dans=20l'URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/publicodes/Personas.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/sites/publicodes/Personas.tsx b/source/sites/publicodes/Personas.tsx index deff4e273c..f53dcf9f6a 100644 --- a/source/sites/publicodes/Personas.tsx +++ b/source/sites/publicodes/Personas.tsx @@ -2,6 +2,7 @@ import { resetSimulation } from 'Actions/actions' import { useEffect, useState } from 'react' import emoji from 'react-easy-emoji' import { useDispatch, useSelector } from 'react-redux' +import { useSearchParams } from 'react-router-dom' import { setDifferentSituation } from '../../actions/actions' import IllustratedMessage from '../../components/ui/IllustratedMessage' import useBranchData from '../../components/useBranchData' @@ -27,9 +28,11 @@ const visualisationChoices = { export default ({}) => { const persona = useSelector((state) => state.simulation?.persona) - const [selectedVisualisation, selectVisualisation] = useState('aucun') + const [searchParams, setSearchParams] = useSearchParams({ + visualisation: 'aucun', + }) - const Visualisation = visualisationChoices[selectedVisualisation] + const Visualisation = visualisationChoices[searchParams.get('visualisation')] const engine = useEngine() const slideProps = { @@ -50,10 +53,10 @@ export default ({}) => { {Object.keys(visualisationChoices).map((name) => ( From c296b684f32b60420d4b433f9cd6fa2129df8441 Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 24 Aug 2022 14:19:05 +0200 Subject: [PATCH 10/35] Repas et TV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Repas est une sous-catégorie qui mériterait d'être explorée. Pas fier de la TV --- source/images/model/alimentation . repas.svg | 77 +++++++++++ .../images/model/num\303\251rique . TV.svg" | 122 ++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 source/images/model/alimentation . repas.svg create mode 100644 "source/images/model/num\303\251rique . TV.svg" diff --git a/source/images/model/alimentation . repas.svg b/source/images/model/alimentation . repas.svg new file mode 100644 index 0000000000..4b42c8ae45 --- /dev/null +++ b/source/images/model/alimentation . repas.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + diff --git "a/source/images/model/num\303\251rique . TV.svg" "b/source/images/model/num\303\251rique . TV.svg" new file mode 100644 index 0000000000..2b8a5a14ec --- /dev/null +++ "b/source/images/model/num\303\251rique . TV.svg" @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + From 08a466aa69c5bf2fd72463445cb27fec50136e2d Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 25 Aug 2022 14:45:15 +0200 Subject: [PATCH 11/35] =?UTF-8?q?Exp=C3=A9rimentation=20graphique=20pour?= =?UTF-8?q?=20l'=C3=A9cran=20sous-cat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/publicodes/chart/SquaresGrid.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index 716517a147..17cff54811 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -109,6 +109,8 @@ const GridItem = ({ title={`${element.title} (${element.topCategoryTitle})`} css={` background: ${element.topCategoryColor}; + border-radius: 0.7rem; + margin: 0.15rem; img { filter: grayscale(1) invert(1) brightness(1.8); width: 2rem; From 9fc880061a785581ee9a5a8605fca5d5926acb6c Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 25 Aug 2022 15:55:10 +0200 Subject: [PATCH 12/35] =?UTF-8?q?Internet=20t=C3=A9l=C3=A9phone=20et=20tra?= =?UTF-8?q?in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/num\303\251rique . internet.svg" | 103 +++++++++++ .../num\303\251rique . ordinateur fixe.svg" | 46 ++--- ...um\303\251rique . ordinateur portable.svg" | 54 +++--- ...03\251rique . t\303\251l\303\251phone.svg" | 109 +++++++++++ source/images/model/transport . train.svg | 171 ++++++++++++++++++ 5 files changed, 435 insertions(+), 48 deletions(-) create mode 100644 "source/images/model/num\303\251rique . internet.svg" create mode 100644 "source/images/model/num\303\251rique . t\303\251l\303\251phone.svg" create mode 100644 source/images/model/transport . train.svg diff --git "a/source/images/model/num\303\251rique . internet.svg" "b/source/images/model/num\303\251rique . internet.svg" new file mode 100644 index 0000000000..45663f18f1 --- /dev/null +++ "b/source/images/model/num\303\251rique . internet.svg" @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + diff --git "a/source/images/model/num\303\251rique . ordinateur fixe.svg" "b/source/images/model/num\303\251rique . ordinateur fixe.svg" index 133a291d6b..e403451d69 100644 --- "a/source/images/model/num\303\251rique . ordinateur fixe.svg" +++ "b/source/images/model/num\303\251rique . ordinateur fixe.svg" @@ -4,7 +4,7 @@ viewBox="0 0 72 72" version="1.1" sodipodi:docname="numérique . ordinateur fixe.svg" - inkscape:version="1.2 (56b05e47e7, 2022-06-09, custom)" + inkscape:version="1.2.1 (ef4d3fba62, 2022-07-19, custom)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" @@ -22,46 +22,47 @@ inkscape:deskcolor="#d1d1d1" showgrid="false" inkscape:zoom="4.5900169" - inkscape:cx="31.045637" - inkscape:cy="32.78855" + inkscape:cx="31.372434" + inkscape:cy="33.006414" inkscape:window-width="950" inkscape:window-height="1163" - inkscape:window-x="962" + inkscape:window-x="4" inkscape:window-y="4" inkscape:window-maximized="1" inkscape:current-layer="color" /> + d="m 44.907263,56.994336 c 0,4.627538 7.317097,6.571958 7.317097,6.571958 H 37.645883 37.291699 22.713222 c 0,0 7.317097,-1.944326 7.317097,-6.571958 V 52.38985 h 14.725937 z" + id="path27437" + style="stroke-width:0.933291" /> + style="fill:#9c9393;fill-opacity:1;stroke-width:0.933291" /> + id="line" + transform="matrix(0.9332913,0,0,0.9332913,3.6713732,0.10248466)"> diff --git "a/source/images/model/num\303\251rique . ordinateur portable.svg" "b/source/images/model/num\303\251rique . ordinateur portable.svg" index 133a291d6b..e060e7aeb8 100644 --- "a/source/images/model/num\303\251rique . ordinateur portable.svg" +++ "b/source/images/model/num\303\251rique . ordinateur portable.svg" @@ -3,8 +3,8 @@ id="emoji" viewBox="0 0 72 72" version="1.1" - sodipodi:docname="numérique . ordinateur fixe.svg" - inkscape:version="1.2 (56b05e47e7, 2022-06-09, custom)" + sodipodi:docname="numérique . ordinateur portable.svg" + inkscape:version="1.2.1 (ef4d3fba62, 2022-07-19, custom)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" @@ -22,46 +22,47 @@ inkscape:deskcolor="#d1d1d1" showgrid="false" inkscape:zoom="4.5900169" - inkscape:cx="31.045637" - inkscape:cy="32.78855" - inkscape:window-width="950" - inkscape:window-height="1163" - inkscape:window-x="962" - inkscape:window-y="4" + inkscape:cx="31.154569" + inkscape:cy="33.006414" + inkscape:window-width="1920" + inkscape:window-height="1175" + inkscape:window-x="0" + inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="color" /> + d="m 43.950344,56.825907 c 0,4.63091 7.32243,6.576746 7.32243,6.576746 H 36.683672 36.32923 21.740129 c 0,0 7.32243,-1.945742 7.32243,-6.576746 v -4.607842 h 14.736668 z" + id="path27437" + style="stroke-width:0.933971" /> + style="fill:#9c9393;fill-opacity:1;stroke-width:0.933971" /> + id="line" + transform="matrix(0.93397147,0,0,0.93397147,2.6844022,-0.10740604)"> diff --git "a/source/images/model/num\303\251rique . t\303\251l\303\251phone.svg" "b/source/images/model/num\303\251rique . t\303\251l\303\251phone.svg" new file mode 100644 index 0000000000..7691b64dd1 --- /dev/null +++ "b/source/images/model/num\303\251rique . t\303\251l\303\251phone.svg" @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/transport . train.svg b/source/images/model/transport . train.svg new file mode 100644 index 0000000000..89d0168286 --- /dev/null +++ b/source/images/model/transport . train.svg @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + From d78e40b10f0a3914382975f22c250db57c83d780 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 25 Aug 2022 15:57:11 +0200 Subject: [PATCH 13/35] Tablette --- .../model/num\303\251rique . tablette.svg" | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 "source/images/model/num\303\251rique . tablette.svg" diff --git "a/source/images/model/num\303\251rique . tablette.svg" "b/source/images/model/num\303\251rique . tablette.svg" new file mode 100644 index 0000000000..66b4cac976 --- /dev/null +++ "b/source/images/model/num\303\251rique . tablette.svg" @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + From 26bbec536928ad1a7fba1ad8670e5798e6b57395 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 25 Aug 2022 16:02:10 +0200 Subject: [PATCH 14/35] Essai d'une box-shadow moins visible et terne --- source/sites/publicodes/chart/SquaresGrid.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index 17cff54811..a317566fd8 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -173,7 +173,7 @@ const Grid = styled.ul` list-style-type: none; width: ${(props) => props.pixelRemSize}rem; height: ${(props) => props.pixelRemSize}rem; - box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 8px 0px; + box-shadow: #5758bb63 0px 0px 6px 0px; display: inline-flex; justify-content: center; align-items: center; From ba5227ec216d00d29e1482302d8f98666325e015 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 25 Aug 2022 16:59:03 +0200 Subject: [PATCH 15/35] =?UTF-8?q?Mosa=C3=AFque=20moins=20espac=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/publicodes/chart/SquaresGrid.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index a317566fd8..3829c45d91 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -109,8 +109,8 @@ const GridItem = ({ title={`${element.title} (${element.topCategoryTitle})`} css={` background: ${element.topCategoryColor}; - border-radius: 0.7rem; - margin: 0.15rem; + border-radius: 0.6rem; + margin: 0.12rem; img { filter: grayscale(1) invert(1) brightness(1.8); width: 2rem; From e8970ec6b81d22a8b4829184608508e5c14dc73b Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 29 Aug 2022 12:59:23 +0200 Subject: [PATCH 16/35] =?UTF-8?q?Image=20par=20d=C3=A9faut=20quand=20image?= =?UTF-8?q?=20de=20sous-cat=C3=A9gorie=20non=20trouv=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SafeCategoryImage.tsx | 9 +++ source/images/three-dots.svg | 61 +++++++++++++++++++ source/sites/publicodes/chart/SquaresGrid.tsx | 3 +- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 source/components/SafeCategoryImage.tsx create mode 100644 source/images/three-dots.svg diff --git a/source/components/SafeCategoryImage.tsx b/source/components/SafeCategoryImage.tsx new file mode 100644 index 0000000000..26e91165e9 --- /dev/null +++ b/source/components/SafeCategoryImage.tsx @@ -0,0 +1,9 @@ +export default ({ element }) => ( + { + currentTarget.onerror = null + currentTarget.src = '/images/three-dots.svg' + }} + /> +) diff --git a/source/images/three-dots.svg b/source/images/three-dots.svg new file mode 100644 index 0000000000..1e06a09ce4 --- /dev/null +++ b/source/images/three-dots.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index 3829c45d91..55bec86029 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -3,6 +3,7 @@ import { range } from 'ramda' import CircledEmojis from '../../../components/CircledEmojis' import { motion } from 'framer-motion' import { useEffect, useLayoutEffect, useRef, useState } from 'react' +import SafeCategoryImage from '../../../components/SafeCategoryImage' const delayPerPixel = 0.0025 export default ({ pixelRemSize, elements, pixel, gridLength }) => { @@ -127,7 +128,7 @@ const GridItem = ({ variants={itemVariants} custom={delayRef} > - + ) } From 4bd3f38e11e93a80d9ee536199d3838c1f53df66 Mon Sep 17 00:00:00 2001 From: Mael Date: Mon, 29 Aug 2022 13:18:20 +0200 Subject: [PATCH 17/35] =?UTF-8?q?WIP=20ajout=20d'images=20personnalis?= =?UTF-8?q?=C3=A9es=20pour=20les=20cat=C3=A9gories=20aussi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SafeCategoryImage.tsx | 5 + source/images/model/alimentation.svg | 77 ++++++++++ ...g => divers . autres produits (copie).svg} | 0 source/images/model/divers.svg | 133 ++++++++++++++++++ source/images/model/logement.svg | 116 +++++++++++++++ source/images/model/maison.svg | 129 ++++++++++++++--- "source/images/model/num\303\251rique.svg" | 109 ++++++++++++++ source/images/model/transport.svg | 17 +++ source/sites/publicodes/chart/SquaresGrid.tsx | 6 +- .../publicodes/fin/ClimateTargetChart.tsx | 9 +- 10 files changed, 577 insertions(+), 24 deletions(-) create mode 100644 source/images/model/alimentation.svg rename source/images/model/{divers . autres produits.svg => divers . autres produits (copie).svg} (100%) create mode 100644 source/images/model/divers.svg create mode 100644 source/images/model/logement.svg create mode 100644 "source/images/model/num\303\251rique.svg" create mode 100644 source/images/model/transport.svg diff --git a/source/components/SafeCategoryImage.tsx b/source/components/SafeCategoryImage.tsx index 26e91165e9..88610db09d 100644 --- a/source/components/SafeCategoryImage.tsx +++ b/source/components/SafeCategoryImage.tsx @@ -1,5 +1,10 @@ export default ({ element }) => ( { currentTarget.onerror = null diff --git a/source/images/model/alimentation.svg b/source/images/model/alimentation.svg new file mode 100644 index 0000000000..4b42c8ae45 --- /dev/null +++ b/source/images/model/alimentation.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + diff --git a/source/images/model/divers . autres produits.svg b/source/images/model/divers . autres produits (copie).svg similarity index 100% rename from source/images/model/divers . autres produits.svg rename to source/images/model/divers . autres produits (copie).svg diff --git a/source/images/model/divers.svg b/source/images/model/divers.svg new file mode 100644 index 0000000000..fe55cac1c5 --- /dev/null +++ b/source/images/model/divers.svg @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/logement.svg b/source/images/model/logement.svg new file mode 100644 index 0000000000..15601b02ce --- /dev/null +++ b/source/images/model/logement.svg @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/maison.svg b/source/images/model/maison.svg index fa2faf7798..4505853340 100644 --- a/source/images/model/maison.svg +++ b/source/images/model/maison.svg @@ -1,19 +1,116 @@ - - - - - - - + + + + + + + + + + + + - - - - - - - - - + + + + diff --git "a/source/images/model/num\303\251rique.svg" "b/source/images/model/num\303\251rique.svg" new file mode 100644 index 0000000000..7691b64dd1 --- /dev/null +++ "b/source/images/model/num\303\251rique.svg" @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + diff --git a/source/images/model/transport.svg b/source/images/model/transport.svg new file mode 100644 index 0000000000..06ec5adff0 --- /dev/null +++ b/source/images/model/transport.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index 55bec86029..ac44fd667e 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -112,11 +112,7 @@ const GridItem = ({ background: ${element.topCategoryColor}; border-radius: 0.6rem; margin: 0.12rem; - img { - filter: grayscale(1) invert(1) brightness(1.8); - width: 2rem; - height: auto; - } + :hover { background: white; img { diff --git a/source/sites/publicodes/fin/ClimateTargetChart.tsx b/source/sites/publicodes/fin/ClimateTargetChart.tsx index 001b263b61..3e8e23e7bd 100644 --- a/source/sites/publicodes/fin/ClimateTargetChart.tsx +++ b/source/sites/publicodes/fin/ClimateTargetChart.tsx @@ -9,6 +9,7 @@ const { encodeRuleName } = utils import { relegate } from 'Components/publicodesUtils' import { useLayoutEffect, useRef, useState } from 'react' +import SafeCategoryImage from '../../../components/SafeCategoryImage' export const sustainableLifeGoal = 2000 // kgCO2e const sustainableBackground = '#78e08f' @@ -322,9 +323,11 @@ const CategoriesBar = ({ `} `} > - {category.nodeValue / empreinteTotale > 0.1 - ? emoji(category.icons) - : ''} + {category.nodeValue / empreinteTotale > 0.1 ? ( + + ) : ( + '' + )} ))} From 4954467e2a6e3b63098dd20cdb32fcf13a8104bb Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 30 Aug 2022 18:07:54 +0200 Subject: [PATCH 18/35] =?UTF-8?q?Am=C3=A9lioration=20de=20la=20maison=20du?= =?UTF-8?q?=20logement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/images/model/logement.svg | 81 +++++++------------------------- 1 file changed, 16 insertions(+), 65 deletions(-) diff --git a/source/images/model/logement.svg b/source/images/model/logement.svg index 15601b02ce..c55b27e3db 100644 --- a/source/images/model/logement.svg +++ b/source/images/model/logement.svg @@ -22,46 +22,28 @@ inkscape:deskcolor="#d1d1d1" showgrid="false" inkscape:zoom="10.564584" - inkscape:cx="49.315711" - inkscape:cy="34.502067" + inkscape:cx="26.408991" + inkscape:cy="34.596724" inkscape:window-width="1920" - inkscape:window-height="1175" + inkscape:window-height="1055" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" - inkscape:current-layer="line" /> + inkscape:current-layer="emoji" /> + - - + id="g9726" + transform="matrix(1.1903818,0,0,1.1903818,-7.1197158,-5.6756313)"> - - - - - + points="29,21 24,26 24,17 29,17 " + id="polygon2808" + transform="translate(-0.03443866,-0.20574828)" /> From 1e8bbc4de49a6ab198a33a7a2ef5d4b25036caaa Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 30 Aug 2022 18:38:14 +0200 Subject: [PATCH 19/35] =?UTF-8?q?Ic=C3=B4nes=20nouvelle=20gen=20sur=20page?= =?UTF-8?q?=20profil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SafeCategoryImage.tsx | 40 +++-- source/components/conversation/AnswerList.tsx | 3 +- source/images/model/transport.svg | 154 ++++++++++++++++-- 3 files changed, 168 insertions(+), 29 deletions(-) diff --git a/source/components/SafeCategoryImage.tsx b/source/components/SafeCategoryImage.tsx index 88610db09d..b44d347c7d 100644 --- a/source/components/SafeCategoryImage.tsx +++ b/source/components/SafeCategoryImage.tsx @@ -1,14 +1,26 @@ -export default ({ element }) => ( - { - currentTarget.onerror = null - currentTarget.src = '/images/three-dots.svg' - }} - /> -) +import { useState } from 'react' +import emoji from './emoji' + +export default ({ element, whiteBackground = false }) => { + const [fail, setFail] = useState(false) + return !fail ? ( + { + currentTarget.onerror = null + setFail(true) + }} + /> + ) : ( + emoji(element.rawNode?.icônes || element.icons || '') + ) +} diff --git a/source/components/conversation/AnswerList.tsx b/source/components/conversation/AnswerList.tsx index c35c1b3569..9280b85c77 100644 --- a/source/components/conversation/AnswerList.tsx +++ b/source/components/conversation/AnswerList.tsx @@ -16,6 +16,7 @@ import { useNavigate } from 'react-router-dom' import { situationSelector } from 'Selectors/simulationSelectors' import { answeredQuestionsSelector } from '../../selectors/simulationSelectors' import { safeGetRule, splitName } from '../publicodesUtils' +import SafeCategoryImage from '../SafeCategoryImage' import './AnswerList.css' import AnswerTrajetsTable from './estimate/AnswerTrajetsTable' @@ -199,7 +200,7 @@ const SubCategory = ({ rule, rules, engine, level }) => { `} `} > - {emoji(rule.rawNode.icônes || '')} + 1} /> {level === 1 ?

{rule.title}

:

{rule.title}

}
diff --git a/source/images/model/transport.svg b/source/images/model/transport.svg index 06ec5adff0..e421671e3f 100644 --- a/source/images/model/transport.svg +++ b/source/images/model/transport.svg @@ -1,17 +1,143 @@ - - - - - - + + + + + + - - - - - - - - + + + + + + + + + + + + + From 8eb60e74d17af8a3a37133ec74242257976c58af Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 30 Aug 2022 18:45:00 +0200 Subject: [PATCH 20/35] =?UTF-8?q?Ic=C3=B4nes=20nouvelle=20gen=20sur=20le?= =?UTF-8?q?=20slide=20de=20tuto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/images/model/transport.svg | 81 ++++++++++++++-------------- source/sites/publicodes/chart/Bar.js | 12 ++++- 2 files changed, 52 insertions(+), 41 deletions(-) diff --git a/source/images/model/transport.svg b/source/images/model/transport.svg index e421671e3f..e12a019b3a 100644 --- a/source/images/model/transport.svg +++ b/source/images/model/transport.svg @@ -21,9 +21,9 @@ inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" showgrid="false" - inkscape:zoom="11.270644" - inkscape:cx="35.135527" - inkscape:cy="35.17989" + inkscape:zoom="3.7627802" + inkscape:cx="85.309261" + inkscape:cy="65.510071" inkscape:window-width="1920" inkscape:window-height="1055" inkscape:window-x="0" @@ -31,10 +31,11 @@ inkscape:window-maximized="1" inkscape:current-layer="line" /> + id="color" + transform="translate(0.79728282,1.0630438)"> { return ( <> @@ -33,9 +35,17 @@ export default ({ font-size: 140%; width: 2.3rem; margin-left: -2.3rem; + background: ${color}; + border-radius: 3rem; + height: 2.3rem; + padding: 0.2rem; + margin-right: 0.6rem; + img { + width: 1.8rem; + } `} > - {emoji(icons)} + {title} Date: Tue, 30 Aug 2022 18:50:54 +0200 Subject: [PATCH 21/35] =?UTF-8?q?Ic=C3=B4nes=20nouvelle=20gen=20dans=20le?= =?UTF-8?q?=20graphe=20de=20simulation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sites/publicodes/chart/SubCategoryBar.tsx | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/source/sites/publicodes/chart/SubCategoryBar.tsx b/source/sites/publicodes/chart/SubCategoryBar.tsx index e443c6c6a3..ffbd8b4855 100644 --- a/source/sites/publicodes/chart/SubCategoryBar.tsx +++ b/source/sites/publicodes/chart/SubCategoryBar.tsx @@ -3,6 +3,7 @@ import { findContrastedTextColor } from 'Components/utils/colors' import { motion } from 'framer-motion' import { useLocation } from 'react-router' import { useNavigate } from 'react-router-dom' +import SafeCategoryImage from '../../../components/SafeCategoryImage' import TriangleShape from './TriangleShape' export default ({ @@ -57,23 +58,33 @@ export default ({
)} - {clicked ? ( - - -
{title}
-
{Math.round((nodeValue / total) * 100)} %
-
- ) : ( - - )} + + {clicked ? ( + + +
{title}
+
{Math.round((nodeValue / total) * 100)} %
+
+ ) : ( + + )} +
) } From bec987f5e607db70d08c37a23769ed9e5ed0d840 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 30 Aug 2022 18:52:24 +0200 Subject: [PATCH 22/35] =?UTF-8?q?Ic=C3=B4nes=20nouvelle=20gen=20dans=20les?= =?UTF-8?q?=20respirations=20de=20cat=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/conversation/CategoryRespiration.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/components/conversation/CategoryRespiration.js b/source/components/conversation/CategoryRespiration.js index d190ef3ad4..037fb1be90 100644 --- a/source/components/conversation/CategoryRespiration.js +++ b/source/components/conversation/CategoryRespiration.js @@ -1,6 +1,6 @@ import { motion } from 'framer-motion' -import React, { useEffect, useRef } from 'react' -import emoji from 'react-easy-emoji' +import { useEffect, useRef } from 'react' +import SafeCategoryImage from '../SafeCategoryImage' import useKeypress from '../utils/useKeyPress' // Naive implementation - in reality would want to attach @@ -60,7 +60,7 @@ export default ({ dismiss, questionCategory }) => { font-weight: 300; } img { - font-size: 350%; + width: 5rem; margin: 0.4rem; } button { @@ -95,7 +95,7 @@ export default ({ dismiss, questionCategory }) => { }} >

{questionCategory.title}

- {emoji(questionCategory.icons)} + From 11018bde45872622af47c556cd88d32fcc3e3961 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 30 Aug 2022 18:56:05 +0200 Subject: [PATCH 23/35] =?UTF-8?q?Optimisation=20de=20la=20plan=C3=A8te=20:?= =?UTF-8?q?=20moins=20de=20poids=20et=20couleur=20pas=20noire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/images/climate-change-small.svg | 264 +------------- .../climate-change-small.variations.svg | 335 ++++++++++++++++++ 2 files changed, 353 insertions(+), 246 deletions(-) create mode 100644 source/images/climate-change-small.variations.svg diff --git a/source/images/climate-change-small.svg b/source/images/climate-change-small.svg index 9022fde655..8d4871ad69 100644 --- a/source/images/climate-change-small.svg +++ b/source/images/climate-change-small.svg @@ -7,7 +7,7 @@ viewBox="0 0 210 210" version="1.1" id="svg1052" - inkscape:version="1.1.1 (1:1.1+202109281954+c3084ef5ed)" + inkscape:version="1.2.1 (2ed6d7ae0b, 2022-08-22, custom)" sodipodi:docname="climate-change-small.svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" @@ -23,15 +23,17 @@ inkscape:pagecheckerboard="0" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="0.26863816" - inkscape:cx="152.62165" - inkscape:cy="160.06661" - inkscape:window-width="950" - inkscape:window-height="1044" - inkscape:window-x="4" - inkscape:window-y="4" + inkscape:zoom="0.42589916" + inkscape:cx="216.01358" + inkscape:cy="426.15722" + inkscape:window-width="1920" + inkscape:window-height="1055" + inkscape:window-x="0" + inkscape:window-y="0" inkscape:window-maximized="1" - inkscape:current-layer="g991" /> + inkscape:current-layer="g991" + inkscape:showpageshadow="2" + inkscape:deskcolor="#d1d1d1" /> + transform="matrix(1.8925445,0,0,1.8925445,-32.784068,-51.251895)"> + style="fill:#d22f27;fill-opacity:1;stroke:#151533;stroke-opacity:1"> + style="fill:#d22f27;fill-opacity:1;stroke:#151533;stroke-opacity:1"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/source/images/climate-change-small.variations.svg b/source/images/climate-change-small.variations.svg new file mode 100644 index 0000000000..cad531f588 --- /dev/null +++ b/source/images/climate-change-small.variations.svg @@ -0,0 +1,335 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 15f0d4e4e5caef571b6c6afcc86322b340fc1f2f Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 1 Sep 2022 09:31:06 +0200 Subject: [PATCH 24/35] Images trop grosses dans le sous-cat --- source/sites/publicodes/chart/SquaresGrid.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index ac44fd667e..c0ec35f388 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -141,15 +141,6 @@ const itemVariants = { }), } -const Box = styled(motion.div)` - margin: 10px; - display: inline-block; - height: 65px; - width: 65px; - background-color: white; - border-radius: 10px; -` - const Grid = styled.ul` padding: 0; display: flex; @@ -181,4 +172,7 @@ const Grid = styled.ul` margin: 0.2rem; */ } + li img { + width: 2rem; + } ` From ef8e0e291754a750372cc27642abced15450cb8a Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 1 Sep 2022 09:35:26 +0200 Subject: [PATCH 25/35] =?UTF-8?q?Style=20de=20l'image=20de=20s=C3=A9curit?= =?UTF-8?q?=C3=A9=20pour=20les=20sous-ca?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SafeCategoryImage.tsx | 37 ++++++++++++++++--------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/source/components/SafeCategoryImage.tsx b/source/components/SafeCategoryImage.tsx index b44d347c7d..e1f243885b 100644 --- a/source/components/SafeCategoryImage.tsx +++ b/source/components/SafeCategoryImage.tsx @@ -3,24 +3,35 @@ import emoji from './emoji' export default ({ element, whiteBackground = false }) => { const [fail, setFail] = useState(false) - return !fail ? ( - { - currentTarget.onerror = null - setFail(true) - }} - /> - ) : ( - emoji(element.rawNode?.icônes || element.icons || '') + > + {!fail ? ( + { + currentTarget.onerror = null + setFail(true) + }} + /> + ) : ( + emoji(element.rawNode?.icônes || element.icons || '') + )} + ) } From 99c58d41cb3cdd82847be3839b66bf05cc17222a Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 1 Sep 2022 09:38:00 +0200 Subject: [PATCH 26/35] Centrage des images de sous-cat --- source/components/SafeCategoryImage.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/components/SafeCategoryImage.tsx b/source/components/SafeCategoryImage.tsx index e1f243885b..7453eeb9bb 100644 --- a/source/components/SafeCategoryImage.tsx +++ b/source/components/SafeCategoryImage.tsx @@ -14,6 +14,9 @@ export default ({ element, whiteBackground = false }) => { `} + display: flex; + align-items: center; + justify-content: center; img { width: 2.5rem; height: auto; From 413228a8fb30741b60f66cfbb34c0e1c42cd16e3 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 1 Sep 2022 09:52:46 +0200 Subject: [PATCH 27/35] =?UTF-8?q?On=20revient=20=C3=A0=20un=20style=20carr?= =?UTF-8?q?=C3=A9=20pour=20l'=C3=A9cran=20sous-cat=20mais=20espac=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit + moins de tuiles sur mobile étroit --- source/components/SafeCategoryImage.tsx | 3 +-- source/sites/publicodes/chart/RavijenChart.tsx | 4 +++- source/sites/publicodes/chart/SquaresGrid.tsx | 5 +---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/source/components/SafeCategoryImage.tsx b/source/components/SafeCategoryImage.tsx index 7453eeb9bb..3df0044525 100644 --- a/source/components/SafeCategoryImage.tsx +++ b/source/components/SafeCategoryImage.tsx @@ -9,7 +9,7 @@ export default ({ element, whiteBackground = false }) => { ${!whiteBackground && ` img { - filter: grayscale(1) invert(1) brightness(1.8); + filter: grayscale(1) invert(1) brightness(${fail ? '7' : '1.8'}); } `} @@ -25,7 +25,6 @@ export default ({ element, whiteBackground = false }) => { > {!fail ? ( { currentTarget.onerror = null diff --git a/source/sites/publicodes/chart/RavijenChart.tsx b/source/sites/publicodes/chart/RavijenChart.tsx index c3d5c21b02..838988fb42 100644 --- a/source/sites/publicodes/chart/RavijenChart.tsx +++ b/source/sites/publicodes/chart/RavijenChart.tsx @@ -24,7 +24,9 @@ export default ({ details }) => { const rules = useSelector((state) => state.rules) const engine = useEngine(objectifs) const tall = useMediaQuery('(min-height: 900px)'), - medium = useMediaQuery('(min-height: 700px)') + medium = + useMediaQuery('(min-height: 700px)') && + useMediaQuery('(min-width: 410px)') const total = engine.evaluate('bilan').nodeValue, gridLength = tall ? 100 : medium ? 70 : 50, diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index c0ec35f388..ffaa009e76 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -167,10 +167,7 @@ const Grid = styled.ul` align-items: center; line-height: 1.4rem; font-size: 90%; - /* Interesting too, more spaced, but more room and less graph-like - border-radius: 0.6rem; - margin: 0.2rem; - */ + border-radius: 0; } li img { width: 2rem; From 3d3c6a9ed0ac71587e51882d2bc92c5413041bbc Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 1 Sep 2022 09:54:01 +0200 Subject: [PATCH 28/35] Style plus doux et en relief, sans bord pour la zone des 2 tonnes --- source/sites/publicodes/chart/RavijenChart.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/sites/publicodes/chart/RavijenChart.tsx b/source/sites/publicodes/chart/RavijenChart.tsx index 838988fb42..a4e6c4d813 100644 --- a/source/sites/publicodes/chart/RavijenChart.tsx +++ b/source/sites/publicodes/chart/RavijenChart.tsx @@ -87,8 +87,9 @@ export default ({ details }) => { height: ${((2000 / pixel) * pixelRemSize) / 10 + 0.5}rem; min-height: 5.5rem; /*We focus on orders of magnitude, not perfect pixels*/ width: 95%; - border: 6px dashed black; background: linear-gradient(#78e08f 50%, #78e08fcf 100%); + border-radius: 0.4rem; + box-shadow: #5758bb 0px 0px 6px 0px; display: flex; flex-direction: column; align-items: center; From c24432406af1ac186a9d1b49758effccca31fefa Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 1 Sep 2022 09:56:04 +0200 Subject: [PATCH 29/35] =?UTF-8?q?Titre=20secondaire=20sur=20mobile=20?= =?UTF-8?q?=C3=A9cran=20sous-cat,=20ne=20doit=20pas=20prendre=202=20lignes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "source/sites/publicodes/fin/Cat\303\251gories.tsx" | 5 +++++ 1 file changed, 5 insertions(+) diff --git "a/source/sites/publicodes/fin/Cat\303\251gories.tsx" "b/source/sites/publicodes/fin/Cat\303\251gories.tsx" index d23c7fe108..dc0a1aedae 100644 --- "a/source/sites/publicodes/fin/Cat\303\251gories.tsx" +++ "b/source/sites/publicodes/fin/Cat\303\251gories.tsx" @@ -79,6 +79,11 @@ export default ({ score, details, headlessMode }) => { font-size: 130%; margin: 0.6rem; } + @media (max-width: 800px) { + h1 { + font-size: 110%; + } + } `} >

De quoi est faite mon empreinte ?

From 94e78b3800ae2cc8e0240b6b896ede00af702782 Mon Sep 17 00:00:00 2001 From: Mael Date: Thu, 1 Sep 2022 10:16:20 +0200 Subject: [PATCH 30/35] =?UTF-8?q?Tentative=20vaine=20pour=20pas=20avoir=20?= =?UTF-8?q?de=20pixels=20qui=20d=C3=A9passent=20=C3=A9cran=20sous-cat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/publicodes/chart/RavijenChart.tsx | 4 +++- source/sites/publicodes/chart/SquaresGrid.tsx | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/sites/publicodes/chart/RavijenChart.tsx b/source/sites/publicodes/chart/RavijenChart.tsx index a4e6c4d813..b606d67f01 100644 --- a/source/sites/publicodes/chart/RavijenChart.tsx +++ b/source/sites/publicodes/chart/RavijenChart.tsx @@ -30,7 +30,8 @@ export default ({ details }) => { const total = engine.evaluate('bilan').nodeValue, gridLength = tall ? 100 : medium ? 70 : 50, - pixelRemSize = 3, + pixelMargin = 0.12, + pixelRemSize = 3 - 2 * pixelMargin, pixel = total / gridLength /* If total = 15 t, pixel = 150 kg @@ -70,6 +71,7 @@ export default ({ details }) => { > { +export default ({ pixelRemSize, elements, pixel, gridLength, pixelMargin }) => { const originOffset = useRef({ top: 0, left: 0 }) const [isVisible, setVisibility] = useState(false) @@ -58,6 +58,7 @@ export default ({ pixelRemSize, elements, pixel, gridLength }) => { delayPerPixel={delayPerPixel} originOffset={originOffset} {...{ element, pixel }} + pixelMargin={pixelMargin} /> ))} @@ -72,6 +73,7 @@ const GridItem = ({ originOffset, element, pixel, + pixelMargin, }) => { /* This math.round creates the override of the grid by a few items, * making it not 10x10 but e.g. 10x10 + 3 */ @@ -111,7 +113,7 @@ const GridItem = ({ css={` background: ${element.topCategoryColor}; border-radius: 0.6rem; - margin: 0.12rem; + margin: ${pixelMargin}rem; :hover { background: white; @@ -150,7 +152,7 @@ const Grid = styled.ul` @media (min-width: 800px) { width: 95%; } - max-width: ${(props) => 10 * props.pixelRemSize}rem; + width: ${(props) => 10 * (props.pixelRemSize + props.pixelMargin * 2)}rem; margin: 0 auto; /* The grid will not be centered horizontally. This may be achieved via CSS grids, but it took me more than 15 minutes to not figure out how to do it * Another interesting layout would be a snake layout, but it's not simple either : From 572be76cf006394fa621b1533e33b6282bbbb3e7 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 6 Sep 2022 10:39:05 +0200 Subject: [PATCH 31/35] =?UTF-8?q?:bug:=20=C3=89norme=20bug=20d'affichage?= =?UTF-8?q?=20des=20sous-cat=C3=A9gories?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Je comprends pas qu'on l'aie pas vu :o Ma faute --- .../publicodes/CategoryVisualisation.tsx | 60 +++++++------------ 1 file changed, 21 insertions(+), 39 deletions(-) diff --git a/source/sites/publicodes/CategoryVisualisation.tsx b/source/sites/publicodes/CategoryVisualisation.tsx index bb30c47222..245414cf67 100644 --- a/source/sites/publicodes/CategoryVisualisation.tsx +++ b/source/sites/publicodes/CategoryVisualisation.tsx @@ -3,37 +3,22 @@ import SubCategoriesChart from './chart/SubCategoriesChart' import { CategoryLabel } from 'Components/conversation/UI' import { extractCategories, + getSubcategories, ruleFormula, } from '../../components/publicodesUtils' import { useEngine } from '../../components/utils/EngineContext' import { useSelector } from 'react-redux' import AnimatedTargetValue from '../../components/ui/AnimatedTargetValue' -export default ({ questionCategory, hideMeta = false }) => { +export default ({ questionCategory: category, hideMeta = false }) => { const rules = useSelector((state) => state.rules) const engine = useEngine() - const category = questionCategory.name - // The aim of this component is to visualize sums. Sometimes, relevant sums are hidden behind a division // it should be visualized elsewhere - const sumToDisplay = - category === 'services publics' - ? null - : 'logement' - ? 'logement . impact' - : category - - if (!sumToDisplay) return null + const subCategories = getSubcategories(rules, category, engine) - const subCategories = extractCategories( - rules, - engine, - null, - sumToDisplay, - false - ) - const categoryValue = Math.round(engine.evaluate(category).nodeValue) + const categoryValue = Math.round(engine.evaluate(category.name).nodeValue) return (
{ `} > - {emoji(questionCategory.icons || '🌍')} - {questionCategory.title} + {emoji(category.icons || '🌍')} + {category.title}
)} - {sumToDisplay && ( -
- -
- )} +
+ +
) } From 010d2965c838665b83f18faa3ca31a50fb2a7db8 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 6 Sep 2022 10:47:28 +0200 Subject: [PATCH 32/35] =?UTF-8?q?On=20repasse=20aux=20trois=20petits=20poi?= =?UTF-8?q?nts=20quand=20emoji=20personnalis=C3=A9=20introuv=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/SafeCategoryImage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/components/SafeCategoryImage.tsx b/source/components/SafeCategoryImage.tsx index 3df0044525..092edec652 100644 --- a/source/components/SafeCategoryImage.tsx +++ b/source/components/SafeCategoryImage.tsx @@ -32,7 +32,7 @@ export default ({ element, whiteBackground = false }) => { }} /> ) : ( - emoji(element.rawNode?.icônes || element.icons || '') + )} ) From 45449ec3d73e84d6625cdc98b18125f40afefaf9 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 6 Sep 2022 11:21:07 +0200 Subject: [PATCH 33/35] =?UTF-8?q?Grille=20des=20sous-cat=20parfaite,=20pas?= =?UTF-8?q?=20un=20pixel=20ne=20d=C3=A9passe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/publicodes/chart/RavijenChart.tsx | 6 +++--- source/sites/publicodes/chart/SquaresGrid.tsx | 15 +++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/source/sites/publicodes/chart/RavijenChart.tsx b/source/sites/publicodes/chart/RavijenChart.tsx index b606d67f01..8e8aae25ab 100644 --- a/source/sites/publicodes/chart/RavijenChart.tsx +++ b/source/sites/publicodes/chart/RavijenChart.tsx @@ -24,9 +24,9 @@ export default ({ details }) => { const rules = useSelector((state) => state.rules) const engine = useEngine(objectifs) const tall = useMediaQuery('(min-height: 900px)'), - medium = - useMediaQuery('(min-height: 700px)') && - useMediaQuery('(min-width: 410px)') + mediumTall = useMediaQuery('(min-height: 700px)'), + mediumLarge = useMediaQuery('(min-width: 410px)'), + medium = mediumTall && mediumLarge const total = engine.evaluate('bilan').nodeValue, gridLength = tall ? 100 : medium ? 70 : 50, diff --git a/source/sites/publicodes/chart/SquaresGrid.tsx b/source/sites/publicodes/chart/SquaresGrid.tsx index d03a8519bc..a5a3c457f3 100644 --- a/source/sites/publicodes/chart/SquaresGrid.tsx +++ b/source/sites/publicodes/chart/SquaresGrid.tsx @@ -48,7 +48,11 @@ export default ({ pixelRemSize, elements, pixel, gridLength, pixelMargin }) => { */ return ( - + {ponderedElements.map((element, i) => ( 10 * (props.pixelRemSize + props.pixelMargin * 2)}rem; + /* Black magic. This width needs .1 to accomodate for I don't know what*/ + width: ${(props) => + (props.gridLength / 10) * (props.pixelRemSize + props.pixelMargin * 2) + + 0.1}rem; margin: 0 auto; /* The grid will not be centered horizontally. This may be achieved via CSS grids, but it took me more than 15 minutes to not figure out how to do it * Another interesting layout would be a snake layout, but it's not simple either : From 560919fa91ddf8c7c27529d31fd138c16525bc42 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 6 Sep 2022 11:37:11 +0200 Subject: [PATCH 34/35] =?UTF-8?q?Correction=20aux=20cons=C3=A9quences=20l?= =?UTF-8?q?=C3=A9g=C3=A8res=20de=20la=20hauteur=20de=20la=20barre=20verte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/publicodes/chart/RavijenChart.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/sites/publicodes/chart/RavijenChart.tsx b/source/sites/publicodes/chart/RavijenChart.tsx index 8e8aae25ab..131fa9139c 100644 --- a/source/sites/publicodes/chart/RavijenChart.tsx +++ b/source/sites/publicodes/chart/RavijenChart.tsx @@ -86,7 +86,8 @@ export default ({ details }) => { whileDrag={{ scale: 1.05, opacity: 0.7 }} // does not work with the animation :/ css={` cursor: grab; - height: ${((2000 / pixel) * pixelRemSize) / 10 + 0.5}rem; + height: ${((2000 / pixel) * pixelRemSize) / (gridLength / 10) + + 1}rem; min-height: 5.5rem; /*We focus on orders of magnitude, not perfect pixels*/ width: 95%; background: linear-gradient(#78e08f 50%, #78e08fcf 100%); From 7938c9b4a9db844ff0bccde52ae5e0e99f91dc61 Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 6 Sep 2022 14:05:29 +0200 Subject: [PATCH 35/35] Contrainte de hauteur barre 2 tonnes moins forte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplifiée si empreinte énorme --- source/sites/publicodes/chart/RavijenChart.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/sites/publicodes/chart/RavijenChart.tsx b/source/sites/publicodes/chart/RavijenChart.tsx index 131fa9139c..d8ecc2dc36 100644 --- a/source/sites/publicodes/chart/RavijenChart.tsx +++ b/source/sites/publicodes/chart/RavijenChart.tsx @@ -88,7 +88,7 @@ export default ({ details }) => { cursor: grab; height: ${((2000 / pixel) * pixelRemSize) / (gridLength / 10) + 1}rem; - min-height: 5.5rem; /*We focus on orders of magnitude, not perfect pixels*/ + min-height: 2rem; /*We focus on orders of magnitude, not perfect pixels*/ width: 95%; background: linear-gradient(#78e08f 50%, #78e08fcf 100%); border-radius: 0.4rem; @@ -109,9 +109,11 @@ export default ({ details }) => {

{emoji('🎯')} 2 tonnes

-

- Une case {emoji('🔲')} = {Math.round(pixel)} kg de CO₂e. -

+ {total < 16000 && ( +

+ Une case {emoji('🔲')} = {Math.round(pixel)} kg de CO₂e. +

+ )}
)} {hiddenTarget && (