[IMP] theme_*: explode masonry snippet

See community commit for details

Note: this also fixes avantgarde svg/screenshot at the same time: we
remove the s_masonry_block but add the missing carousel.

(image contribution by MANO)

closes odoo/design-themes#1020

Related: odoo/odoo#183755
Related: odoo/upgrade#6642
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: mano-odoo <mano@odoo.com>
This commit is contained in:
qsm-odoo
2024-12-03 17:41:43 +01:00
parent 2b56d0cf91
commit f3d88b9516
23 changed files with 97 additions and 190 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
'website.library_image_16': '/theme_avantgarde/static/src/img/pictures/library_image_16.jpg',
},
'configurator_snippets': {
'homepage': ['s_sidegrid', 's_features_wall', 's_masonry_block', 's_carousel', 's_timeline', 's_quadrant'],
'homepage': ['s_sidegrid', 's_features_wall', 's_carousel', 's_timeline', 's_quadrant'],
},
'depends': ['theme_common'],
'license': 'LGPL-3',
Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 102 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 106 KiB

+1 -10
View File
@@ -12,11 +12,6 @@ const snippets = [
name: 'Features Wall',
groupName: "Columns",
},
{
id: 's_masonry_block',
name: 'Masonry',
groupName: "Images",
},
{
id: 's_carousel',
name: 'Carousel',
@@ -40,11 +35,7 @@ wTourUtils.registerThemeHomepageTour("avantgarde_tour", () => [
...wTourUtils.clickOnText(snippets[0], 'h1', 'left'),
wTourUtils.goBackToBlocks(),
...wTourUtils.insertSnippet(snippets[1], 'left'),
...wTourUtils.insertSnippet(snippets[2], 'bottom'),
...wTourUtils.clickOnSnippet(snippets[2], 'top'),
wTourUtils.changePaddingSize('top'),
wTourUtils.goBackToBlocks(),
...wTourUtils.insertSnippet(snippets[2], 'top'),
...wTourUtils.insertSnippet(snippets[3], 'top'),
...wTourUtils.insertSnippet(snippets[4], 'top'),
...wTourUtils.insertSnippet(snippets[5], 'top'),
]);
-41
View File
@@ -755,47 +755,6 @@
</xpath>
</template>
<!-- ======== MASONRY ======== -->
<template id="s_masonry_block" inherit_id="website.s_masonry_block">
<xpath expr="//section" position="attributes">
<attribute name="class" remove="pt48 pb48" separator=" "/>
<attribute name="data-masonry-template">alternate_text_image_text</attribute>
</xpath>
<xpath expr="//section/div" position="replace" mode="inner">
<t t-call="website.s_masonry_block_alternation_text_image_text_template"/>
</xpath>
<xpath expr="//section/div" position="attributes">
<attribute name="class" remove="container" add="container-fluid" separator=" "/>
</xpath>
</template>
<template id="s_masonry_block_alternation_text_image_text_template" inherit_id="website.s_masonry_block_alternation_text_image_text_template">
<!-- Block #1 -->
<!-- Main div -->
<xpath expr="(//div[hasclass('o_grid_item')])[1]" position="attributes">
<attribute name="style" remove="background-image: linear-gradient(135deg, var(--o-color-4) -400%, var(--o-color-2) 100%);" add="--grid-item-padding-x: 40px;" separator=";"/>
</xpath>
<!-- Title -->
<xpath expr="(//div[hasclass('o_grid_item')])[1]/h3" position="replace" mode="inner">
<br/>Coming up in March<br/>
</xpath>
<!-- Paragraph -->
<xpath expr="(//div[hasclass('o_grid_item')])[1]/p" position="replace"/>
<!-- Block #2 -->
<!-- Main div -->
<xpath expr="(//div[hasclass('o_grid_item')])[3]" position="attributes">
<attribute name="class" remove="o_cc2" add="o_cc4" separator=" "/>
<attribute name="style" remove="background-image: linear-gradient(135deg, var(--o-color-4) -400%, var(--o-color-1) 100%);" add="--grid-item-padding-x: 40px;" separator=";"/>
</xpath>
<!-- Title -->
<xpath expr="(//div[hasclass('o_grid_item')])[3]/h3" position="replace" mode="inner">
<br/>Our very new collection<br/>
</xpath>
<!-- Paragraph -->
<xpath expr="(//div[hasclass('o_grid_item')])[3]/p" position="replace"/>
</template>
<!-- ======== TIMELINE ======== -->
<template id="s_timeline" inherit_id="website.s_timeline">
<!-- Title -->