[FIX] theme_*: fix s_big_number wrong implementation

*: anelusia, artists, avantgarde, aviato, beauty, bewise, bistro,
bookstore, buzzy, clean, cobalt, enark, graphene, kea, kiddo, loftspace,
monglia, nano, notes, odoo_experts, orchid, paptic, real_estate,
treehouse, vehicle, yes, zap

This commit aims to fix a wrong implementation of gradients on the
`s_big_number` snippet within the context of the web editor.

Prior to this commit, the `s_big_number` snippet was using a gradient
composed of the right color, but being declared as `RGB` values.

While this is working as expected and looking like it uses the right
`--o-color-*`, it's indeed working with the specific color applied in
first place. If a user changes the color palette of the website, the
snippet will look terrible as it doesn't adapt to the new palette.

This commit fixes the issue by using the right implementation with CSS
variables.

It also reviews a wrong structure using `<div>` while it should use the
right html tag.

task-4202371

closes odoo/design-themes#930

Related: odoo/odoo#180983
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
This commit is contained in:
Chrysanthe (chgo)
2024-09-22 17:38:16 +02:00
parent b93e7407e5
commit 3cc5d6b655
27 changed files with 71 additions and 80 deletions
@@ -13,12 +13,12 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(29, 32, 48) 25%, rgb(222, 222, 222) 80%);"> <font class="text-gradient" style="background-image: linear-gradient(15deg, var(--o-color-1) 25%, var(--o-color-5) 100%);">
100+ 100+
</font> </font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
happy customers happy customers
</xpath> </xpath>
</template> </template>
@@ -13,15 +13,15 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(165, 78, 223) 8%, rgb(222, 222, 222) 80%);"> <font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 25%, var(--o-color-4) 90%);">
250+ 250+
</font> </font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
songs released songs released
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -603,12 +603,12 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(56, 60, 214) 0%, rgb(255, 255, 255) 65%);"> <font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 90%);">
50+ 50+
</font> </font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
projects shipped projects shipped
</xpath> </xpath>
</template> </template>
+4 -4
View File
@@ -14,13 +14,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(244, 168, 26) 0%, rgb(222, 222, 222) 58%);">100+</font> <font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 90%);">100+</font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
destinations available destinations available
</xpath> </xpath>
</template> </template>
+4 -4
View File
@@ -14,13 +14,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font style="color: rgb(165, 35, 91);">200+</font> <font style="color: var(--o-color-1)">200+</font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
happy customers happy customers
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -907,10 +907,10 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(29, 32, 48) 0%, rgb(222, 222, 222) 56%);">60+</font> <font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 90%);">60+</font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
academic programs available academic programs available
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -13,14 +13,14 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
350+ 350+
</xpath> </xpath>
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" remove="font-size: 10.75rem;" add="font-size: 7.75rem;" separator=";"/> <attribute name="style" remove="font-size: 10.75rem;" add="font-size: 7.75rem;" separator=";"/>
350+ 350+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
happy guests served happy guests served
</xpath> </xpath>
</template> </template>
@@ -13,7 +13,7 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
90% 90%
</xpath> </xpath>
</template> </template>
+1 -4
View File
@@ -14,12 +14,9 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
90% 90%
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 2.25rem;" separator=";"/>
</xpath>
</template> </template>
</odoo> </odoo>
+1 -4
View File
@@ -14,12 +14,9 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
90% 90%
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 2.25rem;" separator=";"/>
</xpath>
</template> </template>
</odoo> </odoo>
+1 -1
View File
@@ -575,7 +575,7 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
90% 90%
</xpath> </xpath>
</template> </template>
+4 -4
View File
@@ -4,20 +4,20 @@
<template id="s_big_number" inherit_id="website.s_big_number"> <template id="s_big_number" inherit_id="website.s_big_number">
<!-- Section --> <!-- Section -->
<xpath expr="//section" position="attributes"> <xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Bold/03"}</attribute> <attribute name="data-oe-shape-data">"shape":"web_editor/Rainy/09_001"</attribute>
<attribute name="class" add="o_cc1" remove="o_cc5" separator=" "/> <attribute name="class" add="o_cc1" remove="o_cc5" separator=" "/>
</xpath> </xpath>
<!-- Shape --> <!-- Shape -->
<xpath expr="//div[hasclass('o_we_shape')]" position="replace"> <xpath expr="//div[hasclass('o_we_shape')]" position="replace">
<div class="o_we_shape o_web_editor_Bold_03" style="background-image: url('/web_editor/shape/web_editor/Bold/03.svg?c1=o-color-3&amp;c3=o-color-3&amp;c5=o-color-3&amp;');"/> <div class="o_we_shape o_web_editor_Rainy_09_001"/>
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
80+ 80+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
projects shipped projects shipped
</xpath> </xpath>
</template> </template>
+1 -4
View File
@@ -587,12 +587,9 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
90% 90%
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 2.25rem;" separator=";"/>
</xpath>
</template> </template>
<!-- ===== WAVY GRID ======== --> <!-- ===== WAVY GRID ======== -->
+2 -2
View File
@@ -14,10 +14,10 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
80+ 80+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
satisfied clients satisfied clients
</xpath> </xpath>
</template> </template>
+2 -2
View File
@@ -14,10 +14,10 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
80+ 80+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
families trusted us families trusted us
</xpath> </xpath>
</template> </template>
@@ -14,13 +14,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
250+ 250+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
satisfied clients satisfied clients
</xpath> </xpath>
</template> </template>
+4 -4
View File
@@ -729,15 +729,15 @@
<xpath expr="//div[hasclass('o_we_shape')]" position="replace"/> <xpath expr="//div[hasclass('o_we_shape')]" position="replace"/>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(237, 7, 104) 0%, rgb(222, 222, 222) 59%);"> <font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 75%);">
250+ 250+
</font> </font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
events organized events organized
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -14,13 +14,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
250+ 250+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
satisfied clients satisfied clients
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -14,13 +14,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
20M 20M
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
Monthly listeners on streaming platforms Monthly listeners on streaming platforms
</xpath> </xpath>
</template> </template>
@@ -12,10 +12,10 @@
<xpath expr="//div[hasclass('o_we_shape')]" position="replace"/> <xpath expr="//div[hasclass('o_we_shape')]" position="replace"/>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
90% 90%
</xpath> </xpath>
</template> </template>
+2 -2
View File
@@ -13,10 +13,10 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
50+ 50+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
varieties of flowers to choose from varieties of flowers to choose from
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -675,13 +675,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 9.375rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 9.375rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
85% 85%
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
customers satisfaction customers satisfaction
</xpath> </xpath>
</template> </template>
@@ -14,13 +14,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 9.375rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 9.375rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
85% 85%
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
customers satisfaction customers satisfaction
</xpath> </xpath>
</template> </template>
@@ -13,13 +13,13 @@
<xpath expr="//div[hasclass('o_we_shape')]" position="replace"/> <xpath expr="//div[hasclass('o_we_shape')]" position="replace"/>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
1,250 1,250
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
trees planted since last year trees planted since last year
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -717,12 +717,12 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(29, 32, 48) 0%, rgb(222, 222, 222) 49%);"> <font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-5) 0%, var(--o-color-4) 90%);">
87% 87%
</font> </font>
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
customer satisfaction customer satisfaction
</xpath> </xpath>
</template> </template>
+3 -3
View File
@@ -14,13 +14,13 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 6.25rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 6.25rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
1,500+ 1,500+
</xpath> </xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner"> <xpath expr="//p/span" position="replace" mode="inner">
personalized invitations created personalized invitations created
</xpath> </xpath>
</template> </template>
+2 -2
View File
@@ -13,10 +13,10 @@
</xpath> </xpath>
<!-- Text --> <!-- Text -->
<xpath expr="//h2/div" position="attributes"> <xpath expr="//h2/span" position="attributes">
<attribute name="style" add="font-size: 9.375rem;" remove="font-size: 10.75rem;" separator=";"/> <attribute name="style" add="font-size: 9.375rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath> </xpath>
<xpath expr="//h2/div" position="replace" mode="inner"> <xpath expr="//h2/span" position="replace" mode="inner">
90% 90%
</xpath> </xpath>
</template> </template>