Skip to content

Commit 816ce83

Browse files
committed
[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 #843 Related: odoo/odoo#163839 Signed-off-by: Robin Lejeune (role) <[email protected]>
1 parent 1304512 commit 816ce83

File tree

13 files changed

+157
-53
lines changed

13 files changed

+157
-53
lines changed

theme_artists/views/snippets/s_image_gallery.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
</xpath>
1515
<!-- Images -->
1616
<xpath expr="//img" position="attributes">
17-
<attribute name="class" add="rounded shadow" separator=" "/>
17+
<attribute name="class" add="shadow" separator=" "/>
1818
</xpath>
1919
<xpath expr="(//img)[2]" position="attributes">
20-
<attribute name="class" add="rounded shadow" separator=" "/>
20+
<attribute name="class" add="shadow" separator=" "/>
2121
</xpath>
2222
<xpath expr="(//img)[4]" position="attributes">
23-
<attribute name="class" add="rounded shadow" separator=" "/>
23+
<attribute name="class" add="shadow" separator=" "/>
2424
</xpath>
2525
<xpath expr="(//img)[5]" position="attributes">
26-
<attribute name="class" add="rounded shadow" separator=" "/>
26+
<attribute name="class" add="shadow" separator=" "/>
2727
</xpath>
2828
<xpath expr="(//img)[6]" position="attributes">
29-
<attribute name="class" add="rounded shadow" separator=" "/>
29+
<attribute name="class" add="shadow" separator=" "/>
3030
</xpath>
3131
</template>
3232

theme_bookstore/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
'views/snippets/s_media_list.xml',
2626
'views/snippets/s_comparisons.xml',
2727
'views/snippets/s_features_grid.xml',
28+
'views/snippets/s_image_gallery.xml',
2829
'views/snippets/s_product_catalog.xml',
2930
'views/snippets/s_quotes_carousel.xml',
3031
'views/new_page_template.xml',
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
4+
<template id="s_images_wall" inherit_id="website.s_images_wall">
5+
<xpath expr="//img" position="attributes">
6+
<attribute name="class" remove="rounded" separator=" "/>
7+
</xpath>
8+
<xpath expr="(//img)[2]" position="attributes">
9+
<attribute name="class" remove="rounded" separator=" "/>
10+
</xpath>
11+
<xpath expr="(//img)[3]" position="attributes">
12+
<attribute name="class" remove="rounded" separator=" "/>
13+
</xpath>
14+
<xpath expr="(//img)[4]" position="attributes">
15+
<attribute name="class" remove="rounded" separator=" "/>
16+
</xpath>
17+
<xpath expr="(//img)[5]" position="attributes">
18+
<attribute name="class" remove="rounded" separator=" "/>
19+
</xpath>
20+
<xpath expr="(//img)[6]" position="attributes">
21+
<attribute name="class" remove="rounded" separator=" "/>
22+
</xpath>
23+
</template>
24+
25+
</odoo>

theme_cobalt/views/customizations.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,25 @@
200200
<xpath expr="//div[hasclass('col-lg-6')][2]/img" position="after">
201201
<img class="img img-fluid d-block" src="/web/image/website.library_image_16" data-index="1" data-name="Image"/>
202202
</xpath>
203+
<!-- Remove image roundness -->
204+
<xpath expr="//img" position="attributes">
205+
<attribute name="class" remove="rounded" separator=" "/>
206+
</xpath>
207+
<xpath expr="(//img)[2]" position="attributes">
208+
<attribute name="class" remove="rounded" separator=" "/>
209+
</xpath>
210+
<xpath expr="(//img)[3]" position="attributes">
211+
<attribute name="class" remove="rounded" separator=" "/>
212+
</xpath>
213+
<xpath expr="(//img)[4]" position="attributes">
214+
<attribute name="class" remove="rounded" separator=" "/>
215+
</xpath>
216+
<xpath expr="(//img)[5]" position="attributes">
217+
<attribute name="class" remove="rounded" separator=" "/>
218+
</xpath>
219+
<xpath expr="(//img)[6]" position="attributes">
220+
<attribute name="class" remove="rounded" separator=" "/>
221+
</xpath>
203222
</template>
204223

205224
<!-- ======== BIG BOXES ======== -->

theme_enark/views/snippets/s_image_gallery.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@
2020
<xpath expr="//div[hasclass('container')]" position="attributes">
2121
<attribute name="class" add="container-fluid" remove="container" separator=" "/>
2222
</xpath>
23+
<xpath expr="//img" position="attributes">
24+
<attribute name="class" remove="rounded" separator=" "/>
25+
</xpath>
26+
<xpath expr="(//img)[2]" position="attributes">
27+
<attribute name="class" remove="rounded" separator=" "/>
28+
</xpath>
29+
<xpath expr="(//img)[3]" position="attributes">
30+
<attribute name="class" remove="rounded" separator=" "/>
31+
</xpath>
32+
<xpath expr="(//img)[4]" position="attributes">
33+
<attribute name="class" remove="rounded" separator=" "/>
34+
</xpath>
35+
<xpath expr="(//img)[5]" position="attributes">
36+
<attribute name="class" remove="rounded" separator=" "/>
37+
</xpath>
38+
<xpath expr="(//img)[6]" position="attributes">
39+
<attribute name="class" remove="rounded" separator=" "/>
40+
</xpath>
2341
</template>
2442

2543
</odoo>

theme_graphene/views/customizations.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,26 @@
283283
</xpath>
284284
</template>
285285

286+
<!-- ======== IMAGE WALL ======== -->
287+
<template id="s_images_wall" inherit_id="website.s_images_wall">
288+
<xpath expr="//img" position="attributes">
289+
<attribute name="class" remove="rounded" separator=" "/>
290+
</xpath>
291+
<xpath expr="(//img)[2]" position="attributes">
292+
<attribute name="class" remove="rounded" separator=" "/>
293+
</xpath>
294+
<xpath expr="(//img)[3]" position="attributes">
295+
<attribute name="class" remove="rounded" separator=" "/>
296+
</xpath>
297+
<xpath expr="(//img)[4]" position="attributes">
298+
<attribute name="class" remove="rounded" separator=" "/>
299+
</xpath>
300+
<xpath expr="(//img)[5]" position="attributes">
301+
<attribute name="class" remove="rounded" separator=" "/>
302+
</xpath>
303+
<xpath expr="(//img)[6]" position="attributes">
304+
<attribute name="class" remove="rounded" separator=" "/>
305+
</xpath>
306+
</template>
307+
286308
</odoo>

theme_monglia/views/customizations.xml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -222,25 +222,6 @@
222222
<xpath expr="//section" position="attributes">
223223
<attribute name="class" add="o_cc2 o_spc-medium" remove="o_cc5 o_spc-small" separator=" "/>
224224
</xpath>
225-
<!-- Image -->
226-
<xpath expr="//img" position="attributes">
227-
<attribute name="class" add="rounded" separator=" "/>
228-
</xpath>
229-
<xpath expr="(//img)[2]" position="attributes">
230-
<attribute name="class" add="rounded" separator=" "/>
231-
</xpath>
232-
<xpath expr="(//img)[3]" position="attributes">
233-
<attribute name="class" add="rounded" separator=" "/>
234-
</xpath>
235-
<xpath expr="(//img)[4]" position="attributes">
236-
<attribute name="class" add="rounded" separator=" "/>
237-
</xpath>
238-
<xpath expr="(//img)[5]" position="attributes">
239-
<attribute name="class" add="rounded" separator=" "/>
240-
</xpath>
241-
<xpath expr="(//img)[6]" position="attributes">
242-
<attribute name="class" add="rounded" separator=" "/>
243-
</xpath>
244225
</template>
245226

246227
</odoo>

theme_real_estate/views/snippets/s_image_gallery.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,25 @@
99
<xpath expr="//div[hasclass('o_masonry_col')][2]//img" position="replace">
1010
<img class="img img-fluid d-block" src="/web/image/website.library_image_21" data-index="4" data-name="Image"/>
1111
</xpath>
12+
<!-- Remove images roundness -->
13+
<xpath expr="//img" position="attributes">
14+
<attribute name="class" remove="rounded" separator=" "/>
15+
</xpath>
16+
<xpath expr="(//img)[2]" position="attributes">
17+
<attribute name="class" remove="rounded" separator=" "/>
18+
</xpath>
19+
<xpath expr="(//img)[3]" position="attributes">
20+
<attribute name="class" remove="rounded" separator=" "/>
21+
</xpath>
22+
<xpath expr="(//img)[4]" position="attributes">
23+
<attribute name="class" remove="rounded" separator=" "/>
24+
</xpath>
25+
<xpath expr="(//img)[5]" position="attributes">
26+
<attribute name="class" remove="rounded" separator=" "/>
27+
</xpath>
28+
<xpath expr="(//img)[6]" position="attributes">
29+
<attribute name="class" remove="rounded" separator=" "/>
30+
</xpath>
1231
</template>
1332

1433
</odoo>

theme_vehicle/views/customizations.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,4 +321,26 @@
321321
</xpath>
322322
</template>
323323

324+
<!-- ======== IMAGE WALL ======== -->
325+
<template id="s_images_wall" inherit_id="website.s_images_wall">
326+
<xpath expr="//img" position="attributes">
327+
<attribute name="class" remove="rounded" separator=" "/>
328+
</xpath>
329+
<xpath expr="(//img)[2]" position="attributes">
330+
<attribute name="class" remove="rounded" separator=" "/>
331+
</xpath>
332+
<xpath expr="(//img)[3]" position="attributes">
333+
<attribute name="class" remove="rounded" separator=" "/>
334+
</xpath>
335+
<xpath expr="(//img)[4]" position="attributes">
336+
<attribute name="class" remove="rounded" separator=" "/>
337+
</xpath>
338+
<xpath expr="(//img)[5]" position="attributes">
339+
<attribute name="class" remove="rounded" separator=" "/>
340+
</xpath>
341+
<xpath expr="(//img)[6]" position="attributes">
342+
<attribute name="class" remove="rounded" separator=" "/>
343+
</xpath>
344+
</template>
345+
324346
</odoo>

theme_yes/views/snippets/s_image_gallery.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@
1515
<xpath expr="//*[hasclass('container')]" position="attributes">
1616
<attribute name="class" add="o_container_small" remove="container" separator=" "/>
1717
</xpath>
18-
<!-- Images -->
19-
<xpath expr="//*[hasclass('carousel-item')]//img" position="attributes">
20-
<attribute name="class" add="rounded" separator=" "/>
21-
</xpath>
22-
<xpath expr="//*[hasclass('carousel-item')][2]//img" position="attributes">
23-
<attribute name="class" add="rounded" separator=" "/>
24-
</xpath>
25-
<xpath expr="//*[hasclass('carousel-item')][3]//img" position="attributes">
26-
<attribute name="class" add="rounded" separator=" "/>
27-
</xpath>
2818
</template>
2919

3020
</odoo>

0 commit comments

Comments
 (0)