Files
design-themes/theme_odoo_experts/views/snippets/s_picture.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

50 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_picture" inherit_id="website.s_picture">
<!-- 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 -->
<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">
<h1 style="text-align: center;">
<font style="background-image: linear-gradient(135deg, var(--o-color-5) 0%, var(--o-color-1) 100%);" class="text-gradient">
Unleash your</font><br/>
<font style="background-image: linear-gradient(135deg, var(--o-color-5) 0%, var(--o-color-1) 100%);" class="text-gradient">growth potential</font>
</h1>
</xpath>
<!-- First paragraph -->
<xpath expr="//p[1]" position="replace" mode="inner">
<br/>
Ask your questions and discuss your projects with our partners.<br/>
They are here to help you grow your business!
</xpath>
<!-- Add a button -->
<xpath expr="//p[2]" position="after">
<p style="text-align: center;">
<a t-att-href="cta_btn_href" class="btn btn-primary mb-2 rounded-circle btn-lg"><t t-esc="cta_btn_text">Contact Us</t></a>
</p>
</xpath>
<!-- Image -->
<xpath expr="//div[hasclass('col-lg-10')]//img" position="attributes">
<attribute name="src">/web_editor/image_shape/website.s_picture_default_image/web_editor/devices/macbook_front.svg?c3=o-color-3</attribute>
<attribute name="data-shape">web_editor/devices/macbook_front</attribute>
<attribute name="data-original-mimetype">image/jpg</attribute>
<attribute name="data-file-name">s_picture.svg</attribute>
<attribute name="data-shape-colors">;;o-color-3;;</attribute>
<attribute name="class">img-fluid</attribute>
</xpath>
<!-- Remove figcaption -->
<xpath expr="//figcaption" position="replace"/>
</template>
</odoo>