From 106df69b056060001a7c9f04bb9c1afe67cad00e Mon Sep 17 00:00:00 2001 From: Fabien Le Frapper Date: Fri, 13 Dec 2024 12:39:39 +0100 Subject: [PATCH] Assistant V2 - Responsive - Nouvelle vague (#1136) --- static/to_compile/entrypoints/qfdmd.css | 51 +++++++++++++++++++---- templates/components/produit/_detail.html | 5 +-- templates/qfdmd/synonyme_detail.html | 2 +- 3 files changed, 47 insertions(+), 11 deletions(-) diff --git a/static/to_compile/entrypoints/qfdmd.css b/static/to_compile/entrypoints/qfdmd.css index 40d0811f9..1ec03045d 100644 --- a/static/to_compile/entrypoints/qfdmd.css +++ b/static/to_compile/entrypoints/qfdmd.css @@ -26,10 +26,12 @@ "left middle right"; .top { + --col-size: 7.5rem; + --row-size: 7rem; @apply qf-grid; grid-area: top; - grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); - grid-auto-rows: 7rem; + grid-template-columns: repeat(auto-fit, minmax(var(--col-size), 1fr)); + grid-auto-rows: var(--row-size); } .middle { @@ -40,9 +42,6 @@ .right, .left { @apply qf-flex qf-flex-wrap qf-items-center qf-justify-center qf-flex-row-reverse; - /* grid-area: right; - grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); - grid: auto-flow dense / 40px 40px 1fr; */ > .icon { flex: 0 1 calc(50% - 16px); } @@ -51,7 +50,7 @@ .icon { --scale: 1; --rotate-factor: 1; - @apply qf-p-2w; + @apply md:qf-p-2w; a { &:hover { @@ -74,6 +73,20 @@ } } } + @media (max-width: 768px) { + .patchwork .top { + --col-size: 5rem; + --row-size: 5rem; + /* @apply qf-pb-6w; */ + } + .icon a { + --scale: 0.75; + + &:hover { + --scale: 0.75; + } + } + } @media (max-width: 1247px) { .patchwork .top .icon:nth-last-child(-n + 1) { @apply qf-hidden; @@ -91,8 +104,32 @@ @apply qf-hidden; } } + @media (min-width: 768px) and (max-width: 860px) { + .patchwork .top .icon:nth-last-child(-n + 5) { + @apply qf-hidden; + } + } + @media (max-width: 591px) { + .patchwork .top .icon:nth-last-child(-n + 4) { + @apply qf-hidden; + } + } + @media (max-width: 512px) { + .patchwork .top .icon:nth-last-child(-n + 5) { + @apply qf-hidden; + } + } + @media (max-width: 480px) { + .patchwork .top .icon:nth-last-child(-n + 6) { + @apply qf-hidden; + } + } + @media (max-width: 360px) { + .patchwork .top .icon:nth-last-child(-n + 7) { + @apply qf-hidden; + } + } @media (max-width: 860px) { - .patchwork .top .icon:nth-last-child(-n + 4), .patchwork .right, .patchwork .left { @apply qf-hidden; diff --git a/templates/components/produit/_detail.html b/templates/components/produit/_detail.html index 32539b944..e08153679 100644 --- a/templates/components/produit/_detail.html +++ b/templates/components/produit/_detail.html @@ -11,9 +11,8 @@

Où l'apporter

{% endif %} diff --git a/templates/qfdmd/synonyme_detail.html b/templates/qfdmd/synonyme_detail.html index e90860284..27224f096 100644 --- a/templates/qfdmd/synonyme_detail.html +++ b/templates/qfdmd/synonyme_detail.html @@ -10,7 +10,7 @@ {% with object.produit as produit %}