diff --git a/addons/website/__manifest__.py b/addons/website/__manifest__.py index 74b05bca54f..cb8289e185d 100644 --- a/addons/website/__manifest__.py +++ b/addons/website/__manifest__.py @@ -60,6 +60,7 @@ 'views/snippets/s_numbers.xml', 'views/snippets/s_masonry_block.xml', 'views/snippets/s_media_list.xml', + 'views/snippets/s_showcase.xml', 'views/snippets/s_mega_menu_multi_menus.xml', 'views/snippets/s_mega_menu_menu_image_menu.xml', 'views/website_views.xml', diff --git a/addons/website/static/src/img/snippets_thumbs/s_showcase.jpg b/addons/website/static/src/img/snippets_thumbs/s_showcase.jpg new file mode 100644 index 00000000000..da8ea09c695 Binary files /dev/null and b/addons/website/static/src/img/snippets_thumbs/s_showcase.jpg differ diff --git a/addons/website/static/src/snippets/s_showcase/000.scss b/addons/website/static/src/snippets/s_showcase/000.scss new file mode 100644 index 00000000000..8970e7e262b --- /dev/null +++ b/addons/website/static/src/snippets/s_showcase/000.scss @@ -0,0 +1,77 @@ + +#wrapwrap .s_showcase:not([data-vcss]) { + @include media-breakpoint-up(lg) { + .container, .container-fluid { + position: relative; + + &:before { + content: " "; + display: block; + @include o-position-absolute($left: 50%); + height: 100%; + border-right: 1px solid gray('200'); + } + } + } + + .fa { + opacity: 0.5; + } + + .text-right{ + .fa { + float: right; + margin-left: .5em; + } + p { + float: right; + display: block; + } + } + .text-left{ + .fa { + float: left; + margin-right: .5em; + } + p { + float: left; + } + } + .row { + margin-top: 1em; + } + .feature p { + max-width: 300px; + margin-top: 0.6em; + clear: both; + } +} + +@include media-breakpoint-down(md) { + #wrapwrap .s_showcase:not([data-vcss]) { + .text-right, .text-left { + text-align: center; + + .fa { + font-size: 2em; + opacity: 0.5; + float: none; + display: block; + position: relative; + margin-left: auto; + margin-right: auto; + } + } + .feature { + margin-bottom: 3em; + + p { + float: none; + display: block; + position: relative; + margin-left: auto; + margin-right: auto; + } + } + } +} diff --git a/addons/website/static/src/snippets/s_showcase/001.scss b/addons/website/static/src/snippets/s_showcase/001.scss new file mode 100644 index 00000000000..4ef99f5eb1c --- /dev/null +++ b/addons/website/static/src/snippets/s_showcase/001.scss @@ -0,0 +1,47 @@ +.s_showcase[data-vcss='001'] { + @include media-breakpoint-up(lg) { + // Left-right separator + .container, .container-fluid { + position: relative; + + &:before { + content: " "; + display: block; + @include o-position-absolute($left: 50%); + height: 100%; + border-right: 1px solid gray('200'); + } + } + // Features + .row > div { + // Items on left + &:nth-child(odd) { + text-align: right; + + .s_showcase_icon, p { + float: right; + } + + .s_showcase_icon { + margin-right: 0; + margin-left: 15px; + } + } + // Items on right + &:nth-child(even) { + text-align: left; + + .s_showcase_icon, p { + float: left; + } + } + } + } + + .s_showcase_icon { + // Make the default margin the one for the left aligned icon, as it's what we want on mobile + margin-right: 15px; + opacity: .5; + font-size: 36px; + } +} diff --git a/addons/website/views/snippets/s_showcase.xml b/addons/website/views/snippets/s_showcase.xml new file mode 100644 index 00000000000..553f25c2722 --- /dev/null +++ b/addons/website/views/snippets/s_showcase.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + diff --git a/addons/website/views/snippets/snippets.xml b/addons/website/views/snippets/snippets.xml index 825940effcc..86d84f41710 100644 --- a/addons/website/views/snippets/snippets.xml +++ b/addons/website/views/snippets/snippets.xml @@ -35,7 +35,7 @@ - +