[IMP] theme_*: extract shapes to configurator-dedicated templates

This commit extracts the pre-defined section shapes from blocks into
templates that are dedicated to being used by the configurator.

For blocks that are not used in configurator pages, the configurator
templates have not been created.

task-3381714

Part-of: odoo/design-themes#692
This commit is contained in:
Benoit Socias
2023-08-28 14:42:05 +02:00
parent f4030e3815
commit d206c11972
119 changed files with 1405 additions and 596 deletions
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pb208 pt64 o_cc4" remove="pb24 pt48 o_cc3" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/12_001","flip":["y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Airy_12_001" style="background-image: url('/web_editor/shape/web_editor/Airy/12_001.svg?c1=o-color-1&amp;c3=o-color-5&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
<!-- Title & Paragraph -->
<xpath expr="//h3" position="replace" mode="inner">
@@ -20,4 +15,15 @@
</xpath>
</template>
<template id="configurator_s_call_to_action" inherit_id="website.configurator_s_call_to_action">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/12_001","flip":["y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Airy_12_001" style="background-image: url('/web_editor/shape/web_editor/Airy/12_001.svg?c1=o-color-1&amp;c3=o-color-5&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
</template>
</odoo>
+29 -6
View File
@@ -4,13 +4,11 @@
<template id="s_carousel" inherit_id="website.s_carousel">
<!-- Carousel-item #01 -->
<xpath expr="//div[hasclass('carousel-item')]" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/16","flip":[]}</attribute>
<attribute name="class" add="o_cc o_cc5" separator=" "/>
</xpath>
<!-- Shape & filter -->
<xpath expr="//div[hasclass('carousel-item')]//div[hasclass('container')]" position="before">
<div class="o_we_bg_filter bg-black-25"/>
<div class="o_we_shape o_web_editor_Origins_16"/>
</xpath>
<!-- Content -->
<xpath expr="//div[hasclass('carousel-item')]//div[hasclass('carousel-content')]" position="replace">
@@ -25,13 +23,11 @@
<!-- Carousel-item #02 -->
<xpath expr="//div[hasclass('carousel-item')][2]" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/16","flip":["y"]}</attribute>
<attribute name="class" add="o_cc o_cc5 pt152 pb152" remove="pt96 pb96" separator=" "/>
</xpath>
<!-- Shape & filter -->
<xpath expr="//div[hasclass('carousel-item')][2]//div[hasclass('container')]" position="before">
<div class="o_we_bg_filter bg-black-25"/>
<div class="o_we_shape o_web_editor_Origins_16" style="background-image: url('/web_editor/shape/web_editor/Origins/16.svg?c3=o-color-5&amp;flip=y'); background-position: 50% 50%;"/>
</xpath>
<!-- Content -->
<xpath expr="//div[hasclass('carousel-item')][2]//div[hasclass('carousel-content')]" position="replace">
@@ -46,13 +42,11 @@
<!-- Carousel-item #03 -->
<xpath expr="//div[hasclass('carousel-item')][3]" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/16","flip":[]}</attribute>
<attribute name="class" add="o_cc o_cc5 pt152 pb152" remove="pb112 pt112" separator=" "/>
</xpath>
<!-- Shape & filter -->
<xpath expr="//div[hasclass('carousel-item')][3]//div[hasclass('container')]" position="before">
<div class="o_we_bg_filter bg-black-25"/>
<div class="o_we_shape o_web_editor_Origins_16"/>
</xpath>
<!-- Title -->
<xpath expr="//div[hasclass('carousel-item')][3]//div[hasclass('carousel-content')]" position="replace">
@@ -66,4 +60,33 @@
</xpath>
</template>
<template id="configurator_s_carousel" inherit_id="website.configurator_s_carousel">
<!-- Carousel-item #01 -->
<xpath expr="//div[hasclass('carousel-item')]" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/16","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('carousel-item')]//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_16"/>
</xpath>
<!-- Carousel-item #02 -->
<xpath expr="//div[hasclass('carousel-item')][2]" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/16","flip":["y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('carousel-item')][2]//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_16" style="background-image: url('/web_editor/shape/web_editor/Origins/16.svg?c3=o-color-5&amp;flip=y'); background-position: 50% 50%;"/>
</xpath>
<!-- Carousel-item #03 -->
<xpath expr="//div[hasclass('carousel-item')][3]" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/16","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('carousel-item')][3]//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_16"/>
</xpath>
</template>
</odoo>
+11 -5
View File
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt200 pb200 o_cc o_cc4" remove="pb96 pt96 s_parallax_bg parallax s_parallax_is_fixed bg-black-50" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Floats/02","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Floats_02"/>
</xpath>
<!-- Remove filter & parallax -->
<xpath expr="//div[hasclass('o_we_bg_filter')]" position="replace"/>
@@ -23,4 +18,15 @@
</xpath>
</template>
<template id="configurator_s_cover" inherit_id="website.configurator_s_cover">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Floats/02","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Floats_02"/>
</xpath>
</template>
</odoo>
+11 -5
View File
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc o_cc4" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/14","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Airy_14"/>
</xpath>
<!-- Feature #01 - Icon -->
<xpath expr="//i" position="attributes">
@@ -21,4 +16,15 @@
</xpath>
</template>
<template id="configurator_s_features" inherit_id="website.configurator_s_features">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/14","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Airy_14"/>
</xpath>
</template>
</odoo>
@@ -5,14 +5,12 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="parallax s_parallax_is_fixed" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/04","flip":[]}</attribute>
<attribute name="data-scroll-background-ratio">1</attribute>
</xpath>
<!-- Shape, parallax background & filter -->
<!-- Parallax background & filter -->
<xpath expr="//div[hasclass('container')]" position="before">
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/web/image/website.s_cover_default_image');"/>
<div class="o_we_bg_filter" style="background-color: rgba(17, 13, 22, 0.85) !important;"/>
<div class="o_we_shape o_web_editor_Wavy_04"/>
</xpath>
<!-- Images -->
<xpath expr="//img" position="attributes">
@@ -32,6 +30,17 @@
</xpath>
</template>
<template id="configurator_s_images_wall" inherit_id="website.configurator_s_images_wall">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/04","flip":[]}</attribute>
</xpath>
<!-- Shape, parallax background & filter -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_04"/>
</xpath>
</template>
<template id="s_image_gallery" inherit_id="website.s_image_gallery">
<!-- Section -->
<xpath expr="//section" position="attributes">
+11 -5
View File
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc o_cc5 pt128" remove="pt32" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/05","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_05"/>
</xpath>
<!-- Text wrapper -->
<xpath expr="//div[hasclass('col-lg-6')][2]" position="attributes">
@@ -32,4 +27,15 @@
</xpath>
</template>
<template id="configurator_s_image_text" inherit_id="website.configurator_s_image_text">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/05","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_05"/>
</xpath>
</template>
</odoo>
@@ -5,6 +5,12 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pb120 pt120 o_cc5" remove="pb24 pt24 o_cc2" separator=" "/>
</xpath>
</template>
<template id="configurator_s_numbers" inherit_id="website.configurator_s_numbers">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/12_001","flip":["x"]}</attribute>
</xpath>
<!-- Shape -->
+7 -4
View File
@@ -2,14 +2,17 @@
<odoo>
<template id="s_parallax" inherit_id="website.s_parallax">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/12_001","flip":["y"]}</attribute>
</xpath>
<!-- Bg Image -->
<xpath expr="//span[hasclass('s_parallax_bg')]" position="replace">
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/web/image/website.s_cover_default_image'); background-position: 50% 75%;"/>
</xpath>
</template>
<template id="configurator_s_parallax" inherit_id="website.configurator_s_parallax">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/12_001","flip":["y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//section/*[last()]" position="before">
<div class="o_we_shape o_web_editor_Airy_12_001" style="background-image: url('/web_editor/shape/web_editor/Airy/12_001.svg?c1=o-color-1&amp;c3=o-color-5&amp;flip=y'); background-position: 50% 100%;"/>
@@ -5,9 +5,15 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc o_cc5 pt200 pb200" remove="pb32 pt48" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/08","flip":[]}</attribute>
<attribute name="style"/>
</xpath>
</template>
<template id="configurator_s_product_catalog" inherit_id="website.configurator_s_product_catalog">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/08","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_08"/>
@@ -5,11 +5,6 @@
<!-- Carousel -->
<xpath expr="//div[hasclass('s_quotes_carousel')]" position="attributes">
<attribute name="class" add="s_carousel_rounded o_cc4" remove="s_carousel_default o_cc2" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/09","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//ol[hasclass('carousel-indicators')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_09"/>
</xpath>
<!-- Icons -->
<xpath expr="//i" position="attributes">
@@ -33,4 +28,15 @@
</xpath>
</template>
<template id="configurator_s_quotes_carousel" inherit_id="website.configurator_s_quotes_carousel">
<!-- Shape option -->
<xpath expr="//div[hasclass('s_quotes_carousel')]" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/09","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//ol[hasclass('carousel-indicators')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_09"/>
</xpath>
</template>
</odoo>
+11 -5
View File
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc o_cc5 pb128" remove="pb32" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/04"}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_04" />
</xpath>
<!-- Title -->
<xpath expr="//h2" position="replace" mode="inner">
@@ -35,4 +30,15 @@
</xpath>
</template>
<template id="configurator_s_text_image" inherit_id="website.configurator_s_text_image">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/04"}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_04" />
</xpath>
</template>
</odoo>
+12 -3
View File
@@ -5,14 +5,12 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt256 parallax s_parallax_is_fixed o_cc o_cc5" remove="pt40" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/12_001","flip":[]}</attribute>
<attribute name="data-scroll-background-ratio">1</attribute>
</xpath>
<!-- Shape, parallax background & filter -->
<!-- Parallax background & filter -->
<xpath expr="//div[hasclass('container')]" position="before">
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/web/image/website.s_cover_default_image');"/>
<div class="o_we_bg_filter" style="background-color: rgba(17, 13, 22, 0.85) !important;"/>
<div class="o_we_shape o_web_editor_Airy_12_001 o_second_extra_shape_mapping"/>
</xpath>
<!-- Title -->
<xpath expr="//h1" position="replace" mode="inner">
@@ -20,4 +18,15 @@
</xpath>
</template>
<template id="configurator_s_title" inherit_id="website.configurator_s_title">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/12_001","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Airy_12_001 o_second_extra_shape_mapping"/>
</xpath>
</template>
</odoo>