[IMP] theme_*: remove hardcoded colors on shapes and snippets

Instead now use another custom mapping for the default colors of the
shapes which are used for the default homepage. This allows for the
built page to work with any color palette (especially useful for built
pages in the new configurator) and to handle footer/header connection.

Also change some shapes and default background colors to match what
the preview wanted directly (instead of relying on user asked change as
that would not be handled when generating the page automatically with
the configurator).

Part of https://github.com/odoo/design-themes/pull/2
task-2491890

closes odoo/design-themes#12

closes odoo/design-themes#14

Related: odoo/odoo#71665
Related: odoo/odoo#71768
X-original-commit: 845b969555
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
qsm-odoo
2021-05-12 10:29:54 +00:00
parent 5cbf95db80
commit 8e181539a5
42 changed files with 161 additions and 79 deletions
@@ -91,3 +91,11 @@ $o-color-palettes-compatibility-indexes: (
22: 'generic-16',
23: 'generic-17',
);
//------------------------------------------------------------------------------
// Shapes
//------------------------------------------------------------------------------
$o-bg-shapes: change-shape-colors-mapping('web_editor', 'Wavy/05', (1: 4, 5: 4));
$o-bg-shapes: change-shape-colors-mapping('web_editor', 'Wavy/07', (3: 4));
$o-bg-shapes: change-shape-colors-mapping('web_editor', 'Wavy/23', (3: 1));
+2 -2
View File
@@ -3,11 +3,11 @@
<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/Wavy/07","colors":{"c3":"o-color-1"},"flip":["y"]}</attribute>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/07","flip":["y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_07 o_we_flip_y" style="background-image: url('/web_editor/shape/web_editor/Wavy/07.svg?c3=%23A1A52F');"/>
<div class="o_we_shape o_web_editor_Wavy_07 o_we_flip_y"/>
</xpath>
<!-- Title -->
<xpath expr="//h2" position="replace">
+2 -2
View File
@@ -4,11 +4,11 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt64" remove="pt32" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/06","colors":{"c1":"o-color-1","c3":"o-color-1","c4":"o-color-1","c5":"o-color-4"},"flip":["x","y"]}</attribute>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/05","flip":["x"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_06 o_we_flip_x o_we_flip_y" style="background-image: url('/web_editor/shape/web_editor/Wavy/06.svg?c1=%23a1a52f&amp;c3=%23A1A52F&amp;c4=%23A1A52F&amp;c5=%23FFFFFF');"/>
<div class="o_we_shape o_web_editor_Wavy_05 o_we_flip_x"/>
</xpath>
<!-- Row -->
<xpath expr="//div[hasclass('row')]" position="attributes">
@@ -8,7 +8,7 @@
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_23" style="background-image: url('/web_editor/shape/web_editor/Wavy/23.svg?c3=%23FFFFFF');"/>
<div class="o_we_shape o_web_editor_Wavy_23"/>
</xpath>
<!-- Container -->
<xpath expr="//div[hasclass('container')]" position="attributes">