[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,6 +5,12 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt120 pb120" remove="pt48 pb48" separator=" "/>
</xpath>
</template>
<template id="configurator_s_company_team" inherit_id="website.configurator_s_company_team">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/02_001","flip":["x"]}</attribute>
</xpath>
<!-- Shape -->
@@ -2,14 +2,6 @@
<odoo>
<template id="s_comparisons" inherit_id="website.s_comparisons">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/04","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_04"/>
</xpath>
<!-- Box #01 -->
<xpath expr="//div[hasclass('row')]//div" position="attributes">
<attribute name="class" add="pt80" remove="pt32" separator=" "/>
@@ -33,4 +25,15 @@
</xpath>
</template>
<template id="configurator_s_comparisons" inherit_id="website.configurator_s_comparisons">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/04","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_04"/>
</xpath>
</template>
</odoo>
+11 -5
View File
@@ -5,16 +5,11 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_full_screen_height" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/02_001","flip":[]}</attribute>
</xpath>
<!-- Filter -->
<xpath expr="//div[hasclass('o_we_bg_filter')]" position="replace">
<div class="o_we_bg_filter bg-black-50"/>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_02_001"/>
</xpath>
<!-- Container -->
<xpath expr="//div[hasclass('container')]" position="attributes">
<attribute name="class" add="o_container_small" remove="container" separator=" "/>
@@ -34,4 +29,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/Origins/02_001","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_02_001"/>
</xpath>
</template>
</odoo>
@@ -2,14 +2,6 @@
<odoo>
<template id="s_image_text" inherit_id="website.s_image_text">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Bold/01","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Bold_01"/>
</xpath>
<!-- Column #1 -->
<xpath expr="//div[hasclass('col-lg-6')]" position="attributes">
<attribute name="class" add="col-lg-5" remove="col-lg-6" separator=" "/>
@@ -40,4 +32,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/Bold/01","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Bold_01"/>
</xpath>
</template>
</odoo>
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt120 pb120 o_cc4 o_colored_level" remove="pt32 pb32 o_cc2" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/09_001","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_09_001"/>
</xpath>
<!-- Row #1 -->
@@ -62,4 +57,14 @@
<xpath expr="(//div[hasclass('s_media_list_body')])[3]//a" position="replace"/>
</template>
<template id="configurator_s_media_list" inherit_id="website.configurator_s_media_list">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/09_001","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_09_001"/>
</xpath>
</template>
</odoo>
@@ -5,13 +5,8 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt200 pb200 oe_img_bg o_bg_img_center o_cc4" remove="pt24 pb24 o_cc2" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/16","flip":[]}</attribute>
<attribute name="style">background-image:url('/web_editor/shape/theme_odoo_experts/s_numbers.svg?c1=o-color-1');</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_16"/>
</xpath>
<!-- Numbers -->
<xpath expr="//span[hasclass('s_number')]" position="replace" mode="inner">
<b>12</b>
@@ -27,4 +22,15 @@
</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/Origins/16","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_16"/>
</xpath>
</template>
</odoo>
@@ -5,13 +5,11 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" remove="o_cc2" add="o_cc1 oe_img_bg" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/08","flip":["y"]}</attribute>
<attribute name="style">background-image: url('/web/image/website.s_picture_default_image_bg'); background-position: center;</attribute>
</xpath>
<!-- Shape & filter -->
<!-- Filter -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_bg_filter bg-white-75"/>
<div class="o_we_shape o_web_editor_Wavy_08" style="background-image: url('/web_editor/shape/web_editor/Wavy/08.svg?c2=o-color-3&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
<!-- Title -->
<xpath expr="//h2" position="replace">
@@ -46,4 +44,15 @@
<xpath expr="//figcaption" position="replace"/>
</template>
<template id="configurator_s_picture" inherit_id="website.configurator_s_picture">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/08","flip":["y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_08" style="background-image: url('/web_editor/shape/web_editor/Wavy/08.svg?c2=o-color-3&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
</template>
</odoo>
@@ -5,11 +5,20 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc o_cc5 pt96 pb96" remove="pt48 pb32" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Airy/03_001","flip":[]}</attribute>
</xpath>
<!-- Filter & shape -->
<!-- Filter -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_bg_filter bg-black-50"/>
</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/Airy/03_001","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Airy_03_001"/>
</xpath>
</template>
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt64 pb64" remove="pt32 pb32" 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-5&amp;c3=o-color-4&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
<!-- Column #1 -->
<xpath expr="//div[hasclass('col-lg-6')]" position="attributes">
@@ -45,4 +40,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/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-5&amp;c3=o-color-4&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
</template>
</odoo>
@@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt72 pb72 o_colored_level" remove="pt32 pb32" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Floats/04","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Floats_04"/>
</xpath>
<!-- Card #1 -->
<xpath expr="//div[hasclass('card')]" position="attributes">
@@ -25,4 +20,15 @@
</xpath>
</template>
<template id="configurator_s_three_columns" inherit_id="website.configurator_s_three_columns">
<!-- Shape option -->
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Floats/04","flip":[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Floats_04"/>
</xpath>
</template>
</odoo>