From 49417e1fe15919b3b4d63e2c0a6567995c6c2f46 Mon Sep 17 00:00:00 2001 From: Andrei Grigore Date: Wed, 25 Aug 2021 12:22:58 +0300 Subject: [PATCH 01/10] Stretch for narrow view with authentication conditionals --- src/Widgets/range.css | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Widgets/range.css b/src/Widgets/range.css index fb7c5e2..8e90c7b 100644 --- a/src/Widgets/range.css +++ b/src/Widgets/range.css @@ -5,11 +5,30 @@ } .stretch { - margin: 0 -1rem; + position: relative; + right: 50%; + left: 50%; + width: 100vw !important; + max-width: initial !important; + margin-right: -50vw !important; + margin-left: -50vw !important; } -@media (max-width: 1199px) { +/* detect if is authenticated or anon */ +body:not(.is-authenticated) .stretch { + padding: 0 2rem; +} + +body:not(.is-anonymous):not(.has-toolbar-collapsed) .stretch { + padding: 0 4.5rem; +} + +body:not(.is-anonymous):not(.has-toolbar) .stretch { + padding: 0 2.7rem; +} + +@media (max-width: 786px) { .stretch { - margin: 0 -0.65rem; + padding: 0 !important; } } From d4441bd99540b3b4ae53bb05a4be10d78793ac86 Mon Sep 17 00:00:00 2001 From: EEA Jenkins <@users.noreply.github.com> Date: Wed, 25 Aug 2021 13:04:59 +0000 Subject: [PATCH 02/10] Automated release 3.4.4 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b12b79..833f524 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [3.4.4](https://github.com/eea/volto-block-style/compare/3.4.3...3.4.4) + +- Stretch for narrow view with authentication conditionals [`49417e1`](https://github.com/eea/volto-block-style/commit/49417e1fe15919b3b4d63e2c0a6567995c6c2f46) + #### [3.4.3](https://github.com/eea/volto-block-style/compare/3.4.2...3.4.3) +> 24 August 2021 + +- Release [`#25`](https://github.com/eea/volto-block-style/pull/25) - Stretch styles [`eb1c548`](https://github.com/eea/volto-block-style/commit/eb1c5480106f4ac29d478a86b8491a4de3c289cf) - Stretch style schema fix [`5e9e761`](https://github.com/eea/volto-block-style/commit/5e9e7616349e9a9265eb943aea51b57ad09425e5) - Add Stretch style widget WIP [`a54f047`](https://github.com/eea/volto-block-style/commit/a54f0475184deb26f959135c6dd988bd5996fa2e) diff --git a/package.json b/package.json index e53dfc3..df096d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eeacms/volto-block-style", - "version": "3.4.3", + "version": "3.4.4", "description": "volto-block-style: Volto add-on", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", From 40efbc953423a646e703baa7d3b193078ba6bb3d Mon Sep 17 00:00:00 2001 From: Andrei Grigore Date: Wed, 25 Aug 2021 17:11:02 +0300 Subject: [PATCH 03/10] Wide screen stretch max-width --- src/Widgets/range.css | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Widgets/range.css b/src/Widgets/range.css index 8e90c7b..f2c44c6 100644 --- a/src/Widgets/range.css +++ b/src/Widgets/range.css @@ -9,7 +9,6 @@ right: 50%; left: 50%; width: 100vw !important; - max-width: initial !important; margin-right: -50vw !important; margin-left: -50vw !important; } @@ -24,7 +23,26 @@ body:not(.is-anonymous):not(.has-toolbar-collapsed) .stretch { } body:not(.is-anonymous):not(.has-toolbar) .stretch { - padding: 0 2.7rem; + padding: 0 2.6rem; +} + +@media (min-width: 1700px) { + .stretch { + transform: translate(-50%, 0%); + margin-right: 0 !important; + margin-left: 0 !important; + } + body:not(.is-anonymous):not(.has-toolbar) .stretch { + max-width: 1720px; + } + + body:not(.is-anonymous):not(.has-toolbar-collapsed) .stretch { + max-width: 1778px; + } + + body:not(.is-authenticated) .stretch { + max-width: 1700px; + } } @media (max-width: 786px) { From c7231100f7370532d2cb8b7e556d4aa3b9ec3a25 Mon Sep 17 00:00:00 2001 From: Andrei Grigore Date: Wed, 25 Aug 2021 22:10:39 +0300 Subject: [PATCH 04/10] Stretch mode fix overflow in edit mode --- src/Widgets/range.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Widgets/range.css b/src/Widgets/range.css index f2c44c6..2769157 100644 --- a/src/Widgets/range.css +++ b/src/Widgets/range.css @@ -18,6 +18,11 @@ body:not(.is-authenticated) .stretch { padding: 0 2rem; } +/* detect if its in edit mode */ +body:not(.view-viewview) .stretch { + padding: 0 5.1rem !important; +} + body:not(.is-anonymous):not(.has-toolbar-collapsed) .stretch { padding: 0 4.5rem; } @@ -25,13 +30,18 @@ body:not(.is-anonymous):not(.has-toolbar-collapsed) .stretch { body:not(.is-anonymous):not(.has-toolbar) .stretch { padding: 0 2.6rem; } - @media (min-width: 1700px) { .stretch { transform: translate(-50%, 0%); margin-right: 0 !important; margin-left: 0 !important; } + + body:not(.view-viewview) .stretch { + transform: translate(-57.5%, 0%); + max-width: 1790px !important; + } + body:not(.is-anonymous):not(.has-toolbar) .stretch { max-width: 1720px; } From bf6b9d7008f29c4527bd87a2226ddd10b2b72923 Mon Sep 17 00:00:00 2001 From: Andrei Grigore Date: Wed, 25 Aug 2021 22:15:17 +0300 Subject: [PATCH 05/10] Lint fix --- src/Widgets/range.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Widgets/range.css b/src/Widgets/range.css index 2769157..e9e49f4 100644 --- a/src/Widgets/range.css +++ b/src/Widgets/range.css @@ -32,14 +32,14 @@ body:not(.is-anonymous):not(.has-toolbar) .stretch { } @media (min-width: 1700px) { .stretch { - transform: translate(-50%, 0%); margin-right: 0 !important; margin-left: 0 !important; + transform: translate(-50%, 0%); } body:not(.view-viewview) .stretch { - transform: translate(-57.5%, 0%); max-width: 1790px !important; + transform: translate(-57.5%, 0%); } body:not(.is-anonymous):not(.has-toolbar) .stretch { From 3bc6a5d4e5e4e4b39b2d259fe351f1385d591049 Mon Sep 17 00:00:00 2001 From: EEA Jenkins <@users.noreply.github.com> Date: Wed, 25 Aug 2021 19:24:10 +0000 Subject: [PATCH 06/10] Automated release 3.4.4 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 833f524..f3c1929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). #### [3.4.4](https://github.com/eea/volto-block-style/compare/3.4.3...3.4.4) +- Lint fix [`bf6b9d7`](https://github.com/eea/volto-block-style/commit/bf6b9d7008f29c4527bd87a2226ddd10b2b72923) +- Stretch mode fix overflow in edit mode [`c723110`](https://github.com/eea/volto-block-style/commit/c7231100f7370532d2cb8b7e556d4aa3b9ec3a25) +- Wide screen stretch max-width [`40efbc9`](https://github.com/eea/volto-block-style/commit/40efbc953423a646e703baa7d3b193078ba6bb3d) - Stretch for narrow view with authentication conditionals [`49417e1`](https://github.com/eea/volto-block-style/commit/49417e1fe15919b3b4d63e2c0a6567995c6c2f46) #### [3.4.3](https://github.com/eea/volto-block-style/compare/3.4.2...3.4.3) From 8ced5793153a1cd896919ef32822c866f88112a1 Mon Sep 17 00:00:00 2001 From: Andrei Grigore Date: Thu, 26 Aug 2021 11:15:09 +0300 Subject: [PATCH 07/10] Stretch description titles --- src/Blocks/StretchBlock.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Blocks/StretchBlock.jsx b/src/Blocks/StretchBlock.jsx index 735fd61..784a173 100644 --- a/src/Blocks/StretchBlock.jsx +++ b/src/Blocks/StretchBlock.jsx @@ -36,6 +36,7 @@ const StretchBlock = ({ stretch, onChangeBlock, data, intl, block }) => {