[IMP] theme_*: adapt themes with new s_image_wall design

*: (artists, bookstore, cobalt, enark, graphene, monglia, real_estate,
vehicle, yes, zap)

This commit adapts the design of `s_image_wall` for multiple themes,
based on the new Odoo 18 snippet redesign.

task-3654301

closes odoo/design-themes#843

Related: odoo/odoo#163839
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This commit is contained in:
Antoine (anso)
2024-07-25 13:30:01 +02:00
parent 1304512350
commit 816ce83846
13 changed files with 157 additions and 53 deletions
@@ -14,19 +14,19 @@
</xpath> </xpath>
<!-- Images --> <!-- Images -->
<xpath expr="//img" position="attributes"> <xpath expr="//img" position="attributes">
<attribute name="class" add="rounded shadow" separator=" "/> <attribute name="class" add="shadow" separator=" "/>
</xpath> </xpath>
<xpath expr="(//img)[2]" position="attributes"> <xpath expr="(//img)[2]" position="attributes">
<attribute name="class" add="rounded shadow" separator=" "/> <attribute name="class" add="shadow" separator=" "/>
</xpath> </xpath>
<xpath expr="(//img)[4]" position="attributes"> <xpath expr="(//img)[4]" position="attributes">
<attribute name="class" add="rounded shadow" separator=" "/> <attribute name="class" add="shadow" separator=" "/>
</xpath> </xpath>
<xpath expr="(//img)[5]" position="attributes"> <xpath expr="(//img)[5]" position="attributes">
<attribute name="class" add="rounded shadow" separator=" "/> <attribute name="class" add="shadow" separator=" "/>
</xpath> </xpath>
<xpath expr="(//img)[6]" position="attributes"> <xpath expr="(//img)[6]" position="attributes">
<attribute name="class" add="rounded shadow" separator=" "/> <attribute name="class" add="shadow" separator=" "/>
</xpath> </xpath>
</template> </template>
+1
View File
@@ -25,6 +25,7 @@
'views/snippets/s_media_list.xml', 'views/snippets/s_media_list.xml',
'views/snippets/s_comparisons.xml', 'views/snippets/s_comparisons.xml',
'views/snippets/s_features_grid.xml', 'views/snippets/s_features_grid.xml',
'views/snippets/s_image_gallery.xml',
'views/snippets/s_product_catalog.xml', 'views/snippets/s_product_catalog.xml',
'views/snippets/s_quotes_carousel.xml', 'views/snippets/s_quotes_carousel.xml',
'views/new_page_template.xml', 'views/new_page_template.xml',
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_images_wall" inherit_id="website.s_images_wall">
<xpath expr="//img" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
</template>
</odoo>
+19
View File
@@ -200,6 +200,25 @@
<xpath expr="//div[hasclass('col-lg-6')][2]/img" position="after"> <xpath expr="//div[hasclass('col-lg-6')][2]/img" position="after">
<img class="img img-fluid d-block" src="/web/image/website.library_image_16" data-index="1" data-name="Image"/> <img class="img img-fluid d-block" src="/web/image/website.library_image_16" data-index="1" data-name="Image"/>
</xpath> </xpath>
<!-- Remove image roundness -->
<xpath expr="//img" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
</template> </template>
<!-- ======== BIG BOXES ======== --> <!-- ======== BIG BOXES ======== -->
@@ -20,6 +20,24 @@
<xpath expr="//div[hasclass('container')]" position="attributes"> <xpath expr="//div[hasclass('container')]" position="attributes">
<attribute name="class" add="container-fluid" remove="container" separator=" "/> <attribute name="class" add="container-fluid" remove="container" separator=" "/>
</xpath> </xpath>
<xpath expr="//img" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
</template> </template>
</odoo> </odoo>
+22
View File
@@ -283,4 +283,26 @@
</xpath> </xpath>
</template> </template>
<!-- ======== IMAGE WALL ======== -->
<template id="s_images_wall" inherit_id="website.s_images_wall">
<xpath expr="//img" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
</template>
</odoo> </odoo>
-19
View File
@@ -222,25 +222,6 @@
<xpath expr="//section" position="attributes"> <xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc2 o_spc-medium" remove="o_cc5 o_spc-small" separator=" "/> <attribute name="class" add="o_cc2 o_spc-medium" remove="o_cc5 o_spc-small" separator=" "/>
</xpath> </xpath>
<!-- Image -->
<xpath expr="//img" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
</template> </template>
</odoo> </odoo>
@@ -9,6 +9,25 @@
<xpath expr="//div[hasclass('o_masonry_col')][2]//img" position="replace"> <xpath expr="//div[hasclass('o_masonry_col')][2]//img" position="replace">
<img class="img img-fluid d-block" src="/web/image/website.library_image_21" data-index="4" data-name="Image"/> <img class="img img-fluid d-block" src="/web/image/website.library_image_21" data-index="4" data-name="Image"/>
</xpath> </xpath>
<!-- Remove images roundness -->
<xpath expr="//img" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
</template> </template>
</odoo> </odoo>
+22
View File
@@ -321,4 +321,26 @@
</xpath> </xpath>
</template> </template>
<!-- ======== IMAGE WALL ======== -->
<template id="s_images_wall" inherit_id="website.s_images_wall">
<xpath expr="//img" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
</template>
</odoo> </odoo>
@@ -15,16 +15,6 @@
<xpath expr="//*[hasclass('container')]" position="attributes"> <xpath expr="//*[hasclass('container')]" position="attributes">
<attribute name="class" add="o_container_small" remove="container" separator=" "/> <attribute name="class" add="o_container_small" remove="container" separator=" "/>
</xpath> </xpath>
<!-- Images -->
<xpath expr="//*[hasclass('carousel-item')]//img" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="//*[hasclass('carousel-item')][2]//img" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="//*[hasclass('carousel-item')][3]//img" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
</template> </template>
</odoo> </odoo>
@@ -10,25 +10,6 @@
<xpath expr="//*[hasclass('container')]" position="before"> <xpath expr="//*[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Floats_12"/> <div class="o_we_shape o_web_editor_Floats_12"/>
</xpath> </xpath>
<!-- Images -->
<xpath expr="//img" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" add="rounded" separator=" "/>
</xpath>
</template> </template>
</odoo> </odoo>
+1
View File
@@ -22,6 +22,7 @@
'views/snippets/s_references.xml', 'views/snippets/s_references.xml',
'views/snippets/s_image_text.xml', 'views/snippets/s_image_text.xml',
'views/snippets/s_three_columns.xml', 'views/snippets/s_three_columns.xml',
'views/snippets/s_image_gallery.xml',
'views/new_page_template.xml', 'views/new_page_template.xml',
], ],
'images': [ 'images': [
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_images_wall" inherit_id="website.s_images_wall">
<xpath expr="//img" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[2]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[3]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[4]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[5]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
<xpath expr="(//img)[6]" position="attributes">
<attribute name="class" remove="rounded" separator=" "/>
</xpath>
</template>
</odoo>