Files
design-themes/theme_bookstore/views/snippets/s_call_to_action.xml
T
Benjamin Vray 44b3badbca [FIX] theme_*: remove flip classes from theme snippets
Initially, the background shapes were flipped using only CSS. This was
done by adding the classes 'o_we_flip_x' or 'o_we_flip_y' to a shape to
flip it. However, this system caused issues as it sometimes left a gap
between two connected shapes. As a result, the system was changed with
this commit [1], and the classes 'o_we_flip_x' and 'o_we_flip_y' were no
longer used from this point on.

Despite this change, in our themes, we continued to use these obsolete
classes to define whether a shape should be flipped or not. This commit
addresses this by removing all instances of 'o_we_flip_x' and
'o_we_flip_y' classes that were still being used in theme snippets and
replacing them with the new system, where flipping is defined as a
parameter in the background image URL.

Note that in stable versions where we cannot modify theme snippets, we
have added code to automatically adapt the shapes to the new system
(in this commit [2]).

[1]: https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
[2]: https://github.com/odoo/odoo/commit/256ff539afe331544ccb58848f1ecd0eecbe4daa

task-2824607

closes odoo/design-themes#639

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-04-07 19:43:08 +02:00

33 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_call_to_action" inherit_id="website.s_call_to_action">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc1 pt128 pb32" remove="o_cc3 pt48 pb24" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/20","flip":["x","y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Wavy_20" style="background-image: url('/web_editor/shape/web_editor/Wavy/20.svg?c2=o-color-5&amp;flip=xy'); background-position: 50% 0%;"/>
</xpath>
<!-- Paragraph #1 -->
<xpath expr="//div[hasclass('col-lg-9')]" position="replace">
<div class="pb16 col-lg-12 text-center">
<h2>Browse through <br/>our complete library</h2>
</div>
</xpath>
<!-- Paragraph #2 -->
<xpath expr="//div[hasclass('col-lg-3')]" position="attributes">
<attribute name="class" add="col-lg-12" remove="col-lg-3" separator=" "/>
</xpath>
<xpath expr="//div[hasclass('col-lg-12')][2]/p" position="attributes">
<attribute name="style">text-align: center;</attribute>
</xpath>
<xpath expr="//a[hasclass('btn')]/t" position="replace" mode="inner">
Browse collection
</xpath>
</template>
</odoo>