Files
design-themes/theme_notes/views/snippets/s_media_list.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

100 lines
5.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_media_list" inherit_id="website.s_media_list">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc1 pb96 pt96" remove="o_cc2 pt32 pb32" separator=" "/>
<attribute name="data-oe-shape-data">{"shape":"web_editor/Blobs/01_001","flip":["y"]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Blobs_01_001" style="background-image: url('/web_editor/shape/web_editor/Blobs/01_001.svg?c2=o-color-3&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
<!-- Row #1 -->
<xpath expr="//div[hasclass('s_media_list_item')]" position="attributes">
<attribute name="class" add="pt0 pb0" remove="pt16 pb16" separator=" "/>
</xpath>
<xpath expr="//div[hasclass('s_media_list_item')]/div" position="attributes">
<attribute name="class" add="flex-row-reverse" remove="o_cc o_cc1" separator=" "/>
</xpath>
<!-- Row #1 - Img Wrapper -->
<xpath expr="//div[hasclass('s_media_list_img_wrapper')]" position="attributes">
<attribute name="class" add="col-lg-6" remove="col-lg-4" separator=" "/>
</xpath>
<!-- Row #1 - Body -->
<xpath expr="//div[hasclass('s_media_list_body')]" position="attributes">
<attribute name="class" add="col-lg-6" remove="col-lg-8" separator=" "/>
</xpath>
<!-- Row #1 - Title -->
<xpath expr="//div[hasclass('s_media_list_body')]//h3" position="replace" mode="inner">
Go to the <br/>Miraillet Festival
</xpath>
<!-- Row #1 - Paragraph -->
<xpath expr="//div[hasclass('s_media_list_body')]//p" position="replace" mode="inner">
<br/>
You will find here the different means of transport to get to the festival. The festival is accessible by bike. Be careful, you will be riding in the city centre where there are a lot of cars. Please make sure to park your bikes in the designated areas of the city.
</xpath>
<!-- Row #2 -->
<xpath expr="//div[hasclass('s_media_list_item')][2]" position="attributes">
<attribute name="class" add="pt0 pb0" remove="pt16 pb16" separator=" "/>
</xpath>
<xpath expr="//div[hasclass('s_media_list_item')][2]/div" position="attributes">
<attribute name="class" remove="o_cc o_cc1" separator=" "/>
</xpath>
<!-- Row #2 - Img Wrapper -->
<xpath expr="(//div[hasclass('s_media_list_img_wrapper')])[2]" position="attributes">
<attribute name="class" add="col-lg-6" remove="col-lg-4" separator=" "/>
</xpath>
<!-- Row #2 - Body -->
<xpath expr="(//div[hasclass('s_media_list_body')])[2]" position="attributes">
<attribute name="class" add="col-lg-6" remove="col-lg-8" separator=" "/>
</xpath>
<!-- Row #2 - Title -->
<xpath expr="(//div[hasclass('s_media_list_body')])[2]//h3" position="replace" mode="inner">
Ticketing <br/>&amp; timetables
</xpath>
<!-- Row #2 - Paragraph -->
<xpath expr="(//div[hasclass('s_media_list_body')])[2]//p" position="replace" mode="inner">
<br/>
Where and when to exchange your festival bracelets? Where to buy food and drink tickets? What is the price for children? The answer can be found here!
</xpath>
<!-- Row #2 - Add a button -->
<xpath expr="(//div[hasclass('s_media_list_body')])[2]//p" position="after">
<a href="#" class="btn btn-primary mb-2">More info</a>
</xpath>
<!-- Row #3 -->
<xpath expr="//div[hasclass('s_media_list_item')][3]" position="attributes">
<attribute name="class" add="pt0 pb0" remove="pt16 pb16" separator=" "/>
</xpath>
<xpath expr="//div[hasclass('s_media_list_item')][3]/div" position="attributes">
<attribute name="class" add="flex-row-reverse" remove="o_cc o_cc1" separator=" "/>
</xpath>
<!-- Row #3 - Img Wrapper -->
<xpath expr="(//div[hasclass('s_media_list_img_wrapper')])[3]" position="attributes">
<attribute name="class" add="col-lg-6" remove="col-lg-4" separator=" "/>
</xpath>
<!-- Row #3 - Body -->
<xpath expr="(//div[hasclass('s_media_list_body')])[3]" position="attributes">
<attribute name="class" add="col-lg-6" remove="col-lg-8" separator=" "/>
</xpath>
<!-- Row #3 - Title -->
<xpath expr="(//div[hasclass('s_media_list_body')])[3]//h3" position="replace" mode="inner">
Wheelchair <br/>accessibility
</xpath>
<!-- Row #3 - Paragraph -->
<xpath expr="(//div[hasclass('s_media_list_body')])[3]//p" position="replace" mode="inner">
<br/>
Once again this year, the festival, with the support of the non-profit organisations that implement the necessary means to facilitate access to the event for people with reduced mobility and people affected by or carrying a disability.
</xpath>
<!-- Row #3 - Add a button -->
<xpath expr="(//div[hasclass('s_media_list_body')])[3]//a" position="replace">
<a href="#" class="btn btn-primary mb-2">More info</a>
</xpath>
</template>
</odoo>