diff --git a/addons/website/__manifest__.py b/addons/website/__manifest__.py index 2c06ccb0f18..d0162551820 100644 --- a/addons/website/__manifest__.py +++ b/addons/website/__manifest__.py @@ -62,6 +62,7 @@ 'views/snippets/s_media_list.xml', 'views/snippets/s_showcase.xml', 'views/snippets/s_timeline.xml', + 'views/snippets/s_process_steps.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_process_step.png b/addons/website/static/src/img/snippets_thumbs/s_process_step.png new file mode 100644 index 00000000000..d1b68f93877 Binary files /dev/null and b/addons/website/static/src/img/snippets_thumbs/s_process_step.png differ diff --git a/addons/website/static/src/snippets/s_process_steps/000.scss b/addons/website/static/src/snippets/s_process_steps/000.scss new file mode 100644 index 00000000000..a0b7f942b06 --- /dev/null +++ b/addons/website/static/src/snippets/s_process_steps/000.scss @@ -0,0 +1,75 @@ +.s_process_steps { + .s_process_step_icon { + margin: $grid-gutter-width 0; + span { + display: block; + overflow: hidden; + } + .fa { + display: block; + } + } + .s_process_step_content { + padding: 0 $grid-gutter-width/2; + } + @include media-breakpoint-up(lg) { + overflow-x: hidden; + .s_process_step { + .s_process_step_icon { + position: relative; + z-index: 1; + span:after { + content: ''; + z-index: -1; + border-top: 1px solid gray('500'); + @include o-position-absolute(50%, 0, 0, auto); + } + } + &:not(:first-child):not(:last-child) .s_process_step_icon { + span:after { + width: 100%; + } + } + &:first-child .s_process_step_icon, + &:last-child .s_process_step_icon { + span:after { + width: 1000%; + } + .fa { + &:after { + content: ''; + z-index: -1; + @include o-position-absolute(50%, auto, 0, auto); + width: 100%; + border-top: 1px solid gray('500'); + } + &.mx-auto:after { + width: 50%; + } + } + } + &:first-child .s_process_step_icon { + .fa:after { right: 0; } + .fa.float-right:after { width: 0; } + } + &:last-child .s_process_step_icon { + span:after { left: 0; } + .fa { + &:after { left: 0; } + &.float-left:after { width: 0; } + } + } + } + } + + $s_process_step_line_fw: true; + + @if $s_process_step_line_fw == true { + .s_process_step:first-child, + .s_process_step:last-child { + .s_process_step_icon > span:after { + display: none; + } + } + } +} diff --git a/addons/website/views/snippets/s_process_steps.xml b/addons/website/views/snippets/s_process_steps.xml new file mode 100644 index 00000000000..85b3a7e6977 --- /dev/null +++ b/addons/website/views/snippets/s_process_steps.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + Add to cart + Let your customers follow and understand your process. + + + + + + + + + + Sign in + Click on the icon to adapt it to your purpose. + + + + + + + + + + Pay + Duplicate blocks to add more steps. + + + + + + + + + + Get Delivered + Select and delete blocks to remove some steps. + + + + + + + + + + + + + + diff --git a/addons/website/views/snippets/snippets.xml b/addons/website/views/snippets/snippets.xml index 0201341d747..d97548de920 100644 --- a/addons/website/views/snippets/snippets.xml +++ b/addons/website/views/snippets/snippets.xml @@ -55,7 +55,7 @@ - +
Let your customers follow and understand your process.
Click on the icon to adapt it to your purpose.
Duplicate blocks to add more steps.
Select and delete blocks to remove some steps.