From d256cce94520424df4f182c472c29332d6ca79ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Tue, 23 Mar 2021 10:18:36 +0100 Subject: [PATCH] home slider picture fix --- package.json | 2 +- .../js/components/fo/ActuSliderComponent.vue | 4 +- .../components/fo/ArticlesClubComponent.vue | 1 - .../fo/BreederSiteSliderComponent.vue | 13 +- .../components/fo/CartProductsComponent.vue | 1 - .../fo/FavoritesRecipesComponent.vue | 1 - .../js/components/fo/HomeSliderComponent.vue | 35 ++++- .../components/fo/NotificationsComponent.vue | 1 - .../components/fo/ProductsSliderComponent.vue | 11 +- resources/sass/front/_sub_header.scss | 146 ++++++++++++------ 10 files changed, 140 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index c2c51dba..6b741f49 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "animate.css": "^3.7.2", "detect-element-overflow": "^1.2.0", "fibers": "^5.0.0", - "hooper": "^0.3.4", + "hooper2": "^0.3.6", "jquery-devrama-slider-2": "^0.9.7", "jquery-mousewheel": "^3.1.13", "normalize.css": "^8.0.1", diff --git a/resources/js/components/fo/ActuSliderComponent.vue b/resources/js/components/fo/ActuSliderComponent.vue index 20d5470e..bc525968 100644 --- a/resources/js/components/fo/ActuSliderComponent.vue +++ b/resources/js/components/fo/ActuSliderComponent.vue @@ -17,8 +17,8 @@ diff --git a/resources/js/components/fo/NotificationsComponent.vue b/resources/js/components/fo/NotificationsComponent.vue index 06887244..42058929 100644 --- a/resources/js/components/fo/NotificationsComponent.vue +++ b/resources/js/components/fo/NotificationsComponent.vue @@ -75,7 +75,6 @@ diff --git a/resources/sass/front/_sub_header.scss b/resources/sass/front/_sub_header.scss index 28697dae..36d65555 100644 --- a/resources/sass/front/_sub_header.scss +++ b/resources/sass/front/_sub_header.scss @@ -18,7 +18,7 @@ right: 2%; } - @media screen and (max-width: $tablet) { + @include max-width($tablet) { right: 50%; transform: translateX(50%); top: 75%; @@ -111,7 +111,7 @@ & img { width: 100%; - @media screen and (max-width: $mobile) { + @include max-width($mobile) { height: 100%; width: auto; } @@ -275,57 +275,109 @@ .sub_header.home { & .content { - @media screen and (max-width: $tablet) { - & .text { - top: 10%; + & .text { + width: 90%; + text-align: center; + top: 55%; + transform: translateX(-50%); + left: 50%; - & .catch { - font-size: 2.8em; - } - - & .title { - width: 100%; - font-size: 3em; - } - - & .btn { - display: inline; - text-align: center; - font-size: 1.4em; - border-radius: 20px; - padding: 3px 20px 7px; - } + & .catch { + font-size: 2.8em; } - } - @media screen and (max-width: $mobile) { - & .text { - top: 50%; - left: 50%; - transform: translateX(-50%); + & .title { width: 100%; + font-size: 3em; + } + + & .btn { + display: inline; text-align: center; - - & .catch { - font-size: 3.5em; - text-align: center; - } - - & .title { - width: 100%; - text-align: center; - font-size: 3.5em; - } - - & .btn { - display: inline; - text-align: center; - font-size: 1.4em; - border-radius: 20px; - padding: 3px 20px 7px; - } + font-size: 1.4em; + border-radius: 20px; + padding: 3px 20px 7px; } } + & picture { + & img { + width: 100% !important; + } + } + @include min-width($mobile) { + min-height: 15rem; + .text { + width: 40%; + text-align: right; + top: 5%; + right: 1rem; + font-size: 0.8em; + transform: inherit; + left: inherit; + } + } + + @include min-width($mobile + 160px) { + .text { + top: 15%; + font-size: 0.85em; + } + } + @include min-width($tablet) { + .text { + top: 15%; + font-size: 0.85em; + } + } + @include min-width($desktop - 100px) { + .text { + right: 1.2rem; + font-size: 1.2em; + } + } + @include min-width($big_screen) { + .text { + top: 21%; + right: 2rem; + font-size: 1.4em; + } + } + @include min-width($large_screen) { + .text { + top: 21%; + right: 3rem; + font-size: 1.6em; + } + } + + // @include max-width($mobile) { + // & .text { + // top: 50%; + // left: 50%; + // transform: translateX(-50%); + // width: 100%; + // text-align: center; + + // & .catch { + // font-size: 3.5em; + // text-align: center; + // } + + // & .title { + // width: 100%; + // text-align: center; + // font-size: 3.5em; + // } + + // & .btn { + // display: inline; + // text-align: center; + // font-size: 1.4em; + // border-radius: 20px; + // padding: 3px 20px 7px; + // } + // } + // } } } @@ -395,7 +447,7 @@ position: relative; top: -13px; - @media screen and (max-width: $mobile) { + @include max-width($mobile) { max-width: 50%; } }