Files
design-themes/theme_artists/views/snippets/s_three_columns.xml
T
Benoit Socias 76e9cbcdb6 [FIX] theme_*: remove duplicate and conflicting classes
When default snippets have been updated to rely on color presets ([1]),
some themes were not adapted accordingly.
This also happened whenever paddings of base blocks were modified.
Because of this there are elements in themes for which some classes are
applied several times, and some where classes are not removed before
adding a contradicting one.

This commit adjusts the classes so that themes neither:
- produce snippets with duplicated classes
- produce snippets with contradicting classes (e.g. two different
bottom paddings on the same element)

This commit also fixes a typo from [2] which was the source of
duplicate classes.

[1]: https://github.com/odoo/odoo/commit/5953c4df6b9c08519f64a65c1cf5d5558d59f7d4
[2]: https://github.com/odoo/design-themes/commit/299d504df31bf179775eec1d37e71605c3637460#diff-86c142838104de06e89f629c51cf791464538dc8899e6a3f00c24f69638db409R34

task-3562147

X-original-commit: f3da06dc68
Part-of: odoo/design-themes#744
2023-11-05 04:52:43 +00:00

63 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_three_columns" inherit_id="website.s_three_columns">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc4" remove="o_cc2" separator=" "/>
</xpath>
<!-- Column #1 -->
<xpath expr="//div[hasclass('card')]" position="attributes">
<attribute name="class" add="shadow" separator=" "/>
<attribute name="style" add="border-width: 0px !important;" separator=";"/>
</xpath>
<!-- Column #1 - Title -->
<xpath expr="//div[hasclass('card-body')]//h3" position="replace" mode="inner">
My artistic process
</xpath>
<!-- Column #1 - Paragraph -->
<xpath expr="//div[hasclass('card-body')]//p" position="replace" mode="inner">
The choice of materials, colours are not insignificant, discover more about my artistic process.
</xpath>
<!-- Column #1 - Add a button -->
<xpath expr="//div[hasclass('card-body')]//p" position="after">
<p><a href="#" class="btn btn-primary">More details</a></p>
</xpath>
<!-- Column #2 -->
<xpath expr="(//div[hasclass('card')])[2]" position="attributes">
<attribute name="class" add="shadow" separator=" "/>
<attribute name="style" add="border-width: 0px !important;" separator=";"/>
</xpath>
<!-- Column #2 - Title -->
<xpath expr="(//div[hasclass('card-body')])[2]//h3" position="replace" mode="inner">
My work
</xpath>
<!-- Column #2 - Paragraph -->
<xpath expr="(//div[hasclass('card-body')])[2]//p" position="replace" mode="inner">
Here is a selection of my works, exhibited in my studio.
</xpath>
<!-- Column #2 - Add a button -->
<xpath expr="(//div[hasclass('card-body')])[2]//p" position="after">
<p><a href="#" class="btn btn-primary">Discover</a></p>
</xpath>
<!-- Column #3 -->
<xpath expr="(//div[hasclass('card')])[3]" position="attributes">
<attribute name="class" add="shadow" separator=" "/>
<attribute name="style" add="border-width: 0px !important;" separator=";"/>
</xpath>
<!-- Column #3 - Title -->
<xpath expr="(//div[hasclass('card-body')])[3]//h3" position="replace" mode="inner">
About me
</xpath>
<!-- Column #3 - Paragraph -->
<xpath expr="(//div[hasclass('card-body')])[3]//p" position="replace" mode="inner">
Formerly a corporate accountant, I started a professional transition 10 years ago.
</xpath>
<!-- Column #3 - Add a button -->
<xpath expr="(//div[hasclass('card-body')])[3]//p" position="after">
<p><a href="/contactus" class="btn btn-primary">Contact me</a></p>
</xpath>
</template>
</odoo>