From c842f9536b9c43229273b403218881f72fd79487 Mon Sep 17 00:00:00 2001 From: Drina_Rincon Date: Wed, 20 Apr 2022 16:09:24 -0300 Subject: [PATCH] Modificar detalles en dual section, onesection y text --- src/components/DualSection/DualSection.js | 19 ++++++----- src/components/DualSection/DualSection.scss | 27 +++++---------- src/components/DualSection/OneSection.js | 16 ++++----- src/components/Text/Text.js | 38 +++++++++++---------- src/components/Text/Text.scss | 26 +++++++------- src/styles/global.scss | 2 +- 6 files changed, 59 insertions(+), 69 deletions(-) diff --git a/src/components/DualSection/DualSection.js b/src/components/DualSection/DualSection.js index cde57e64..4bcf8989 100644 --- a/src/components/DualSection/DualSection.js +++ b/src/components/DualSection/DualSection.js @@ -5,7 +5,7 @@ export default function DualSection({ data }) { const dualSectionParts = data?.dualSectionPart const listSectionParts = dualSectionParts.map((section) => -
+

{section.title}

{section.description}

- - - + {section.button && ( + + + + )}
-
); return ( -
-
- {listSectionParts} -
+
+
+ {listSectionParts} +
diff --git a/src/components/DualSection/DualSection.scss b/src/components/DualSection/DualSection.scss index 375536f2..66206052 100644 --- a/src/components/DualSection/DualSection.scss +++ b/src/components/DualSection/DualSection.scss @@ -1,32 +1,21 @@ @import "../../styles/global.scss"; .dualSection { - p { - text-align: justify; - font-weight: 700; - max-height: 300px; - display: -webkit-box; - -webkit-line-clamp: 3; - -webkit-box-orient: vertical; - overflow: hidden; - } + color: $primary; h4 { + margin-top: 1rem; font-weight: 700; } &__image { - width: 300px; + width: 100%; } button { - background: $light-grey; - color: white; - font-weight: 500; - border-radius: 3px; - border: none; - padding: 0.3em; + @include primaryBtn; } } + .one_sec { color: $primary; &-background{ @@ -39,7 +28,8 @@ justify-content: space-around; align-items: center; gap: 3em; - padding: 3em 0; + padding-top: 3em; + padding-bottom: 3em; button { @include primaryBtn; a { @@ -71,13 +61,12 @@ } } - @media screen and (max-width: $breakpoint-xl) { + @media screen and (max-width: $breakpoint-sm) { flex-direction: column-reverse; &-img { flex-basis: 100%; } &-title { - padding: 0 10vw; flex-basis: 100%; } } diff --git a/src/components/DualSection/OneSection.js b/src/components/DualSection/OneSection.js index 91ebfbbb..a0421b20 100644 --- a/src/components/DualSection/OneSection.js +++ b/src/components/DualSection/OneSection.js @@ -20,19 +20,17 @@ const OneSection = ({ data: { id, strapi_component, dualSectionPart } }) => { theme === "dark" && backgroundImageDark?.url ? backgroundImageDark?.url : backgroundImage?.url - })`, + })`, }} > -
+
-

{title}

-

{description}

+

{title}

+

{description}

{button && ( - + + + )}
diff --git a/src/components/Text/Text.js b/src/components/Text/Text.js index 9fcdbd9a..28b01d9c 100644 --- a/src/components/Text/Text.js +++ b/src/components/Text/Text.js @@ -8,27 +8,29 @@ export default function Text({ data }) { const bgImage = data?.backgroundImage?.url return ( -
- {title !== "" && title !== undefined && title !== null ? ( -
-
-

{title}

+
+ {title !== "" && title !== undefined && title !== null ? ( +
+
+

{title}

+
+
- -
- ) : ( -
- -
- )} + ) : ( +
+ +
+ )} +
) } diff --git a/src/components/Text/Text.scss b/src/components/Text/Text.scss index 02c5b153..6abd1b42 100644 --- a/src/components/Text/Text.scss +++ b/src/components/Text/Text.scss @@ -4,21 +4,23 @@ .text { color: $primary; .title { - width: 100%; .titleText { - margin: 0; text-transform: uppercase; margin-top: 2rem; } } .description { - background-color: $primary-container; - padding-bottom: 3rem; + background-color: $grey-light-bg; + p:first-child { padding-top: 1rem; } + p:last-child { + margin-bottom: 0.5rem; + } p { - padding: 0rem 1rem; + color: $black; + padding: 0rem 0.5rem; } } } @@ -29,10 +31,10 @@ .notTitle { color: $primary; border-radius: 20px; - background-color: $primary-container; + background-color: $white; padding: 1rem; - margin: 1rem; - p:nth-last-child(2) { + margin: 1.5rem 0rem; + p:nth-last-child(-n+2) { margin-bottom: 0px; } } @@ -46,9 +48,8 @@ padding-top: 4rem; } .description { - p:first-child { - padding-top: 4rem; - } + margin-left: 2rem; + margin-top: 2rem; } } } @@ -58,8 +59,7 @@ .text { .description { p { - padding: 0rem 2.5rem; - padding-right: 7rem; + padding: 0rem 2rem; } } } diff --git a/src/styles/global.scss b/src/styles/global.scss index ae5e2e52..4fd1998e 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -55,7 +55,7 @@ $grey: #545468; $light-grey: #c4c4c4; $alt: #67f293; $blackBit: #242424; - +$grey-light-bg: #FAF8F8; /* Sizes */ $small: 15px; $medium: 20px;