[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
+10 -4
View File
@@ -5,10 +5,6 @@
<!-- Section -->
<xpath expr="section" position="attributes">
<attribute name="class" add="o_cc o_cc5" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/09_001","flip":["x"]}</attribute>
</xpath>
<xpath expr="//*[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_09_001" style="background-image: url('/web_editor/shape/web_editor/Origins/09_001.svg?c3=o-color-2&amp;flip=x'); background-position: 50% 0%;"/>
</xpath>
<!-- Title -->
<xpath expr="//h1" position="replace" mode="inner">
@@ -16,4 +12,14 @@
</xpath>
</template>
<template id="configurator_s_banner" inherit_id="website.configurator_s_banner">
<!-- Shape option -->
<xpath expr="section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/09_001","flip":["x"]}</attribute>
</xpath>
<xpath expr="//*[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_09_001" style="background-image: url('/web_editor/shape/web_editor/Origins/09_001.svg?c3=o-color-2&amp;flip=x'); background-position: 50% 0%;"/>
</xpath>
</template>
</odoo>
+12 -7
View File
@@ -2,16 +2,10 @@
<odoo>
<template id="s_cover" inherit_id="website.s_cover">
<!-- Section -->
<xpath expr="section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Zigs/06"}</attribute>
</xpath>
<!-- Parallax -->
<xpath expr="//*[hasclass('s_parallax_bg')]" position="attributes">
<attribute name="style" add="background-position: 50% 100%;" remove="background-position: 50% 0;" separator=" "/>
</xpath>
<xpath expr="//*[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Zigs_06"/>
</xpath>
<!-- Title -->
<xpath expr="//h1//font" position="replace" mode="inner">
Seasonal<br/> Flavors
@@ -32,4 +26,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/Zigs/06"}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//*[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Zigs_06"/>
</xpath>
</template>
</odoo>
+11 -4
View File
@@ -5,10 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc3 pt64" remove="o_cc2 pt48 pb24" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/04_001"}</attribute>
</xpath>
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_04_001"/>
</xpath>
<!-- Size -->
<xpath expr="//div[hasclass('col-lg-10')]" position="attributes">
@@ -28,4 +24,15 @@
</xpath>
</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/Origins/04_001"}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_04_001"/>
</xpath>
</template>
</odoo>
@@ -7,12 +7,10 @@
<attribute name="style"/>
<attribute name="class" add="s_parallax parallax s_parallax_is_fixed o_cc o_cc5 pt120 pb104" remove="pt48 pb32" separator=" "/>
<attribute name="data-scroll-background-ratio">1</attribute>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Zigs/06"}</attribute>
</xpath>
<xpath expr="//*[hasclass('container')]" position="before">
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/web/image/website.s_product_catalog_default_image'); background-position: 50% 0%;"/>
<div class="o_we_bg_filter bg-black-50"/>
<div class="o_we_shape o_web_editor_Zigs_06"/>
</xpath>
<!-- Title -->
<xpath expr="//h2" position="replace"/>
@@ -20,6 +18,17 @@
<xpath expr="//p" position="replace"/>
</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/Zigs/06"}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//*[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Zigs_06"/>
</xpath>
</template>
<template id="s_product_catalog_dish" inherit_id="website.s_product_catalog_dish">
<xpath expr="//li" position="inside">
<p class="s_product_catalog_dish_description border-top text-muted pt-1 o_default_snippet_text">