Skip to content

Commit c31b3c7

Browse files
committedSep 25, 2024
[IMP] theme_clean: improve theme
task-4178066 Part of task-4177975 closes #929 Signed-off-by: Serge Bayet (seba) <seba@odoo.com>
1 parent 0bb5f6c commit c31b3c7

18 files changed

+345
-370
lines changed
 

‎theme_clean/__manifest__.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@
1212
'views/image_content.xml',
1313

1414
'views/snippets/s_cta_box.xml',
15+
'views/snippets/s_cta_card.xml',
16+
'views/snippets/s_accordion_image.xml',
17+
'views/snippets/s_banner.xml',
1518
'views/snippets/s_cover.xml',
1619
'views/snippets/s_striped_top.xml',
1720
'views/snippets/s_card_offset.xml',
1821
'views/snippets/s_carousel.xml',
1922
'views/snippets/s_text_image.xml',
2023
'views/snippets/s_three_columns.xml',
2124
'views/snippets/s_call_to_action.xml',
25+
'views/snippets/s_company_team.xml',
2226
'views/snippets/s_title.xml',
2327
'views/snippets/s_features.xml',
2428
'views/snippets/s_numbers.xml',
@@ -30,6 +34,7 @@
3034
'views/snippets/s_product_catalog.xml',
3135
'views/snippets/s_quotes_carousel.xml',
3236
'views/snippets/s_unveil.xml',
37+
'views/snippets/s_numbers_showcase.xml',
3338
'views/snippets/s_key_benefits.xml',
3439
'views/snippets/s_pricelist_boxed.xml',
3540
'views/snippets/s_striped_center_top.xml',
@@ -46,17 +51,13 @@
4651
'static/description/clean_screenshot.jpg',
4752
],
4853
'images_preview_theme': {
49-
'website.s_cover_default_image': '/theme_clean/static/src/img/backgrounds/bg_snippet_09.jpg',
50-
'website.s_text_image_default_image': '/theme_clean/static/src/img/content/image_content_19.jpg',
54+
'website.s_image_text_default_image': '/theme_clean/static/src/img/content/image_content_20.jpg',
5155
'website.s_banner_default_image': '/theme_clean/static/src/img/backgrounds/bg_snippet_07.jpg',
52-
'website.s_carousel_default_image_1': '/theme_clean/static/src/img/content/image_content_25.jpg',
53-
'website.s_three_columns_default_image_1': '/theme_clean/static/src/img/content/image_content_22.jpg',
54-
'website.s_three_columns_default_image_2': '/theme_clean/static/src/img/content/image_content_23.jpg',
55-
'website.s_three_columns_default_image_3': '/theme_clean/static/src/img/content/image_content_24.jpg',
56+
'website.s_text_image_default_image': '/theme_clean/static/src/img/content/image_content_19.jpg',
57+
'website.s_picture_default_image': '/theme_clean/static/src/img/content/image_content_21.jpg',
5658
},
5759
'configurator_snippets': {
58-
'homepage': ['s_cover', 's_text_image', 's_title', 's_features', 's_carousel', 's_numbers',
59-
's_three_columns', 's_call_to_action'],
60+
'homepage': ['s_banner', 's_color_blocks_2', 's_title', 's_text_image', 's_image_text', 's_numbers_showcase', 's_company_team', 's_accordion_image', 's_cta_card'],
6061
},
6162
'license': 'LGPL-3',
6263
'live_test_url': 'https://theme-clean.odoo.com',

‎theme_clean/models/theme_clean.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@ class ThemeClean(models.AbstractModel):
55
_inherit = 'theme.utils'
66

77
def _theme_clean_post_copy(self, mod):
8-
self.enable_view('website.template_header_hamburger')
9-
self.enable_view('website.template_header_hamburger_align_right')
10-
self.enable_view('website.no_autohide_menu')
11-
8+
self.enable_view('website.template_header_default')
129
self.enable_view('website.template_footer_contact')
Loading
Loading

‎theme_clean/static/description/theme_clean.svg

+201-249
Loading

‎theme_clean/static/src/js/tour.js

+22-20
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
/** @odoo-module */
22

33
import * as wTourUtils from '@website/js/tours/tour_utils';
4-
import { _t } from "@web/core/l10n/translation";
54

65
const snippets = [
76
{
8-
id: 's_cover',
9-
name: 'Cover',
7+
id: 's_banner',
8+
name: 'Banner',
109
groupName: "Intro",
1110
},
1211
{
13-
id: 's_text_image',
14-
name: 'Text - Image',
12+
id: 's_color_blocks_2',
13+
name: 'Big Boxes',
1514
groupName: "Content",
1615
},
1716
{
@@ -20,28 +19,33 @@ const snippets = [
2019
groupName: "Text",
2120
},
2221
{
23-
id: 's_features',
24-
name: 'Features',
22+
id: 's_text_image',
23+
name: 'Text - Image',
2524
groupName: "Content",
2625
},
2726
{
28-
id: 's_carousel',
29-
name: 'Carousel',
30-
groupName: "Intro",
27+
id: 's_image_text',
28+
name: 'Image - Text',
29+
groupName: "Content",
3130
},
3231
{
33-
id: 's_numbers',
34-
name: 'Numbers',
32+
id: 's_numbers_showcase',
33+
name: 'Numbers Showcase',
3534
groupName: "Content",
3635
},
3736
{
38-
id: 's_three_columns',
39-
name: 'Columns',
40-
groupName: "Columns",
37+
id: 's_company_team',
38+
name: 'Team',
39+
groupName: "People",
4140
},
4241
{
43-
id: 's_call_to_action',
44-
name: 'Call to Action',
42+
id: 's_accordion_image',
43+
name: 'Accordion Image',
44+
groupName: "Content",
45+
},
46+
{
47+
id: 's_cta_card',
48+
name: 'Card Call to Action',
4549
groupName: "Content",
4650
},
4751
];
@@ -54,11 +58,9 @@ wTourUtils.registerThemeHomepageTour("clean_tour", () => [
5458
...wTourUtils.dragNDrop(snippets[1]),
5559
...wTourUtils.dragNDrop(snippets[2]),
5660
...wTourUtils.dragNDrop(snippets[3]),
57-
...wTourUtils.clickOnSnippet(snippets[3]),
58-
wTourUtils.changeOption('ContainerWidth', 'we-button-group.o_we_user_value_widget', _t('width')),
59-
wTourUtils.goBackToBlocks(),
6061
...wTourUtils.dragNDrop(snippets[4]),
6162
...wTourUtils.dragNDrop(snippets[5]),
6263
...wTourUtils.dragNDrop(snippets[6]),
6364
...wTourUtils.dragNDrop(snippets[7]),
65+
...wTourUtils.dragNDrop(snippets[8]),
6466
]);

‎theme_clean/static/src/scss/primary_variables.scss

+11-49
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,13 @@ $o-theme-font-configs: (
117117
'family': ('Ubuntu', sans-serif),
118118
'url': 'Ubuntu:300,300i,400,400i,700,700i',
119119
),
120-
'Bitter': (
121-
'family': ('Bitter', serif),
122-
'url': 'Bitter:300,300i,400,400i,700,700i',
120+
'IBM Plex Sans': (
121+
'family': ('IBM Plex Sans', sans-serif),
122+
'url': 'IBM+Plex+Sans:300,300i,400,400i,700,700i',
123+
),
124+
'Inter': (
125+
'family': ('Inter', sans-serif),
126+
'url': 'Inter:300,300i,400,400i,700,700i',
123127
),
124128
'Noto Serif': ( // font update - Droid Serif -> Noto+Serif
125129
'family': ('Noto Serif', serif),
@@ -145,46 +149,6 @@ $o-theme-font-configs: (
145149
'family': ('Josefin Slab', serif),
146150
'url': 'Josefin+Slab:300,300i,400,400i,700,700i',
147151
),
148-
'Abel': (
149-
'family': ('Abel', sans-serif),
150-
'url': 'Abel:300,300i,400,400i,700,700i',
151-
),
152-
'Mulish': (
153-
'family': ('Mulish', sans-serif),
154-
'url': 'Mulish:300,300i,400,400i,700,700i',
155-
),
156-
'Libre Baskerville': (
157-
'family': ('Libre Baskerville', serif),
158-
'url': 'Libre+Baskerville:300,300i,400,400i,700,700i',
159-
),
160-
'Medula One': (
161-
'family': ('Medula One', cursive),
162-
'url': 'Medula+One:300,300i,400,400i,700,700i',
163-
),
164-
'Montserrat Alternates': (
165-
'family': ('Montserrat Alternates', sans-serif),
166-
'url': 'Montserrat+Alternates:300,300i,400,400i,700,700i',
167-
),
168-
'Imprima': (
169-
'family': ('Imprima', sans-serif),
170-
'url': 'Imprima:300,300i,400,400i,700,700i',
171-
),
172-
'Oswald': (
173-
'family': ('Oswald', sans-serif),
174-
'url': 'Oswald:300,300i,400,400i,700,700i',
175-
),
176-
'Quattrocento': (
177-
'family': ('Quattrocento', serif),
178-
'url': 'Quattrocento:300,300i,400,400i,700,700i',
179-
),
180-
'Vollkorn': (
181-
'family': ('Vollkorn', serif),
182-
'url': 'Vollkorn:300,300i,400,400i,700,700i',
183-
),
184-
'Alice': (
185-
'family': ('Alice', serif),
186-
'url': 'Alice:300,300i,400,400i,700,700i',
187-
),
188152
);
189153

190154
//------------------------------------------------------------------------------
@@ -194,12 +158,10 @@ $o-theme-font-configs: (
194158
$o-website-values-palettes: (
195159
(
196160
'color-palettes-name': 'clean-1',
197-
'headings-font': 'Dosis',
198-
'navbar-font': 'Dosis',
199-
'buttons-font': 'Dosis',
200-
'header-template': 'hamburger',
201-
'hamburger-position': 'right',
202-
'footer-template': 'contact',
161+
'headings-font': 'IBM Plex Sans',
162+
'navbar-font': 'Inter',
163+
'buttons-font': 'Inter',
164+
'header-template': 'default',
203165
),
204166
);
205167

‎theme_clean/views/image_content.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<record id="s_banner_default_image_2" model="theme.ir.attachment">
1111
<field name="key">website.s_banner_default_image_2</field>
1212
<field name="name">website.s_banner_default_image_2</field>
13-
<field name="url">/theme_clean/static/src/img/backgrounds/bg_snippet_12.jpg</field>
13+
<field name="url">/theme_clean/static/src/img/content/image_content_27.jpg</field>
1414
</record>
1515
<record id="s_banner_default_image_3" model="theme.ir.attachment">
1616
<field name="key">website.s_banner_default_image_3</field>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
4+
<template id="s_accordion_image" inherit_id="website.s_accordion_image">
5+
<!-- Section -->
6+
<xpath expr="//section" position="attributes">
7+
<attribute name="class" add="o_cc1" remove="o_cc2" separator=" "/>
8+
</xpath>
9+
</template>
10+
11+
</odoo>
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
4+
<template id="s_banner" inherit_id="website.s_banner">
5+
<!-- Text -->
6+
<xpath expr="//h1" position="replace">
7+
<h1 class="display-3 o_default_snippet_text">Unleash your <strong class="o_default_snippet_text"><span class="o_text_highlight o_translate_inline o_text_highlight_circle_2 o_text_highlight_fill" style="--text-highlight-width: 6px;"><span class="o_text_highlight_item">potential<svg fill="none" class="o_text_highlight_svg o_content_no_merge position-absolute overflow-visible top-0 start-0 w-100 h-100 pe-none"><path stroke-width="var(--text-highlight-width)" stroke="var(--text-highlight-color)" stroke-linecap="round" fill="var(--text-highlight-color)" transform="scale(1.2835546875, 0.6916666666666667)" d="M112.58 21.164h18.516c-.478-.176-1.722-.64-2.967-1.105.101-.401.214-.803.315-1.192 12.255 2.912 24.561 5.573 36.716 8.823 5.896 1.582 11.628 3.967 17.171 6.527 10.433 4.832 14.418 14.22 16.479 24.739.377 1.92.566 3.878.83 5.823 2.212 15.94-5.858 23.986-21.595 33.813-.993.615-2.288.79-3.181 1.494-14.229 11.308-31.412 14.32-48.608 17.107-29.01 4.694-57.431 2.209-84.91-8.372-8.145-3.138-16.164-6.853-23.706-11.22C6.176 90.986 1.16 80.053.193 67.25c-1.798-23.809 9.025-42.485 30.356-53.304C44.678 6.793 59.8 3.367 75.45 2.375 90.583 1.42 105.793.379 120.927.78c16.089.427 32.041 3.05 46.911 9.84 2.074.941 3.67 2.912 4.915 5.083-9.73-1.443-19.433-2.987-29.175-4.305-4.89-.665-9.842-1.067-14.77-1.33-23.82-1.28-47.376.514-70.391 7.003a133.771 133.771 0 0 0-22.639 8.648c-17.9 8.786-27.616 26.935-25.567 46.364.666 6.263 3.507 11.133 9.05 14.308 26.862 15.401 55.748 21.965 86.645 19.819 15.561-1.08 31.01-2.787 45.767-8.284 11.099-4.142 21.658-9.25 30.595-17.195 9.779-8.698 11.715-18.55 5.669-30.249-1.131-2.196-3.256-4.079-5.33-5.56-7.981-5.736-17.773-7.48-26.459-11.534-13.249-6.175-27.541-6.916-41.343-10.167-.817-.188-1.571-.64-2.35-.966.037-.364.088-.728.125-1.092Z" class="o_text_highlight_path_circle_2"></path></svg></span></span>.</strong></h1>
8+
</xpath>
9+
<!-- Remove panels -->
10+
<xpath expr="(//div[hasclass('o_grid_item_image')])[2]" position="replace"/>
11+
<xpath expr="//div[hasclass('col-lg-5')]" position="replace"/>
12+
<!-- Image Layout -->
13+
<xpath expr="//div[hasclass('o_grid_item_image')]" position="attributes">
14+
<attribute name="class" add="g-col-lg-6 col-lg-6" remove="o_grid_item g-col-lg-4 col-lg-4" separator=" "/>
15+
<attribute name="style" add="grid-area: 1 / 7 / 11 / 13;" remove="grid-area: 1 / 8 / 11 / 12;" separator=" "/>
16+
</xpath>
17+
<!-- Img -->
18+
<xpath expr="//img" position="attributes">
19+
<attribute name="src">/web_editor/image_shape/website.s_banner_default_image_2/web_editor/composition/composition_oval_line.svg?c2=o-color-2</attribute>
20+
<attribute name="data-shape">web_editor/composition/composition_oval_line</attribute>
21+
<attribute name="data-original-mimetype">image/jpeg</attribute>
22+
<attribute name="data-file-name">s_banner_2.svg</attribute>
23+
<attribute name="data-shape-colors">;#34495E;;;</attribute>
24+
</xpath>
25+
</template>
26+
27+
</odoo>

‎theme_clean/views/snippets/s_call_to_action.xml

-11
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,4 @@
1818
</xpath>
1919
</template>
2020

21-
<template id="configurator_s_call_to_action" inherit_id="website.configurator_s_call_to_action">
22-
<!-- Shape option -->
23-
<xpath expr="//section" position="attributes">
24-
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/14_001", "flip":["y"]}</attribute>
25-
</xpath>
26-
<!-- Shape -->
27-
<xpath expr="//div[hasclass('container')]" position="before">
28-
<div class="o_we_shape o_web_editor_Origins_14_001" style="background-image: url('/web_editor/shape/web_editor/Origins/14_001.svg?c3=o-color-4&amp;c4=o-color-3&amp;flip=y'); background-position: 50% 0%;"/>
29-
</xpath>
30-
</template>
31-
3221
</odoo>

‎theme_clean/views/snippets/s_color_blocks_2.xml

+9-8
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@
33

44
<template id="s_color_blocks_2" inherit_id="website.s_color_blocks_2">
55
<!-- Column #1 -->
6-
<xpath expr="//div[hasclass('col-lg-6')]" position="attributes">
7-
<attribute name="class" add="oe_img_bg" separator=" "/>
8-
<attribute name="style">background-image: url('/web/image/website.s_color_blocks_2_default_image_1');</attribute>
9-
</xpath>
10-
<xpath expr="//h2" position="before">
11-
<div class="o_we_bg_filter bg-black-50"/>
6+
<xpath expr="//div[hasclass('col-lg-6')]" position="replace">
7+
<div class="col-lg-6 o_cc o_cc4">
8+
<h2>We are committed to helping you achieve success with unparalleled support and expert guidance, every step of the way.</h2>
9+
</div>
1210
</xpath>
1311
<!-- Column #2 -->
1412
<xpath expr="//div[hasclass('col-lg-6')][2]" position="attributes">
15-
<attribute name="class" add="oe_img_bg" separator=" "/>
13+
<attribute name="class" add="oe_img_bg pt152 pb152" separator=" "/>
1614
<attribute name="style">background-image: url('/web/image/website.s_color_blocks_2_default_image_2');</attribute>
1715
</xpath>
18-
<xpath expr="(//h2)[2]" position="before">
16+
<xpath expr="//div[hasclass('col-lg-6')][2]" position="inside">
1917
<div class="o_we_bg_filter bg-black-50"/>
2018
</xpath>
19+
<xpath expr="//div[hasclass('col-lg-6')][2]/h2" position="replace"/>
20+
<xpath expr="//div[hasclass('col-lg-6')][2]/p" position="replace"/>
21+
<xpath expr="//div[hasclass('col-lg-6')][2]/a" position="replace"/>
2122
</template>
2223

2324
</odoo>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
4+
<template id="configurator_s_company_team" inherit_id="website.configurator_s_company_team">
5+
<xpath expr="//section" position="attributes">
6+
<attribute name="class" add="pt0 pb16" remove="pt48 pb48" separator=" "/>
7+
</xpath>
8+
</template>
9+
10+
</odoo>
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
4+
<template id="s_cta_card" inherit_id="website.s_cta_card">
5+
<!-- Section -->
6+
<xpath expr="//section" position="attributes">
7+
<attribute name="class" add="pt48 pb56 o_cc3" remove="pt64 pb64 o_cc2" separator=" "/>
8+
</xpath>
9+
10+
</template>
11+
12+
</odoo>

‎theme_clean/views/snippets/s_image_text.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<template id="s_image_text" inherit_id="website.s_image_text">
55
<!-- Section -->
66
<xpath expr="//section" position="attributes">
7-
<attribute name="class" add="o_cc o_cc4 pt72 pb72" remove="pt80 pb80" separator=" "/>
7+
<attribute name="class" add="o_cc o_cc1 pt48 pb72" remove="pt80 pb80" separator=" "/>
88
</xpath>
99
<!-- Add space after title -->
1010
<xpath expr="//h2" position="after">
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_numbers_showcase" inherit_id="website.s_numbers_showcase">
5+
<!-- Section -->
6+
<xpath expr="//section" position="attributes">
7+
<attribute name="class" add="o_cc o_cc4 pt88" remove="pt80" separator=" "/>
8+
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/04_001","colors":{"c3": "#FFFFFF"},"flip":["y"]}</attribute>
9+
</xpath>
10+
<xpath expr="//div[hasclass('container')]" position="before">
11+
<div class="o_we_shape o_web_editor_Origins_04_001" style="background-image: url('/web_editor/shape/web_editor/Origins/04_001.svg?c3=o-color-4&amp;flip=y');"/>
12+
</xpath>
13+
<!-- Grid items -->
14+
<xpath expr="(//div[hasclass('o_grid_item')])[2]" position="attributes">
15+
<attribute name="class" add="o_cc1 rounded" remove="o_cc3" separator=" "/>
16+
</xpath>
17+
<xpath expr="(//div[hasclass('o_grid_item')])[3]" position="attributes">
18+
<attribute name="class" add="rounded" separator=" "/>
19+
</xpath>
20+
<xpath expr="(//div[hasclass('o_grid_item')])[4]" position="attributes">
21+
<attribute name="class" add="o_cc3 rounded" remove="o_cc4" separator=" "/>
22+
</xpath>
23+
</template>
24+
25+
</odoo>

‎theme_clean/views/snippets/s_text_image.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<template id="s_text_image" inherit_id="website.s_text_image">
55
<!-- Section -->
66
<xpath expr="//section" position="attributes">
7-
<attribute name="class" add="o_cc o_cc2 pt72 pb72" remove="pt80 pb80" separator=" "/>
7+
<attribute name="class" add="o_cc o_cc1 pt16 pb16" remove="pt80 pb80" separator=" "/>
88
</xpath>
99
<!-- Title & Paragraphs -->
1010
<xpath expr="//h2" position="replace" mode="inner">

‎theme_clean/views/snippets/s_title.xml

+4-18
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,14 @@
44
<template id="s_title" inherit_id="website.s_title">
55
<!-- Section -->
66
<xpath expr="//section" position="attributes">
7-
<attribute name="class" add="o_cc o_cc5 o_full_screen_height parallax s_parallax_is_fixed" separator=" "/>
8-
<attribute name="data-scroll-background-ratio">1</attribute>
9-
</xpath>
10-
<!-- Filter & background image -->
11-
<xpath expr="//div[hasclass('container')]" position="before">
12-
<span class="s_parallax_bg oe_img_bg" style="background-image: url('/web/image/website.s_banner_default_image');"/>
13-
<div class="o_we_bg_filter bg-black-50"/>
7+
<attribute name="class" remove="pt40" add="pt80" separator=" "/>
148
</xpath>
159
<!-- Title -->
1610
<xpath expr="//h2" position="replace" mode="inner">
17-
<b>We create the perfect <br/>tailored solution for you</b>
18-
</xpath>
19-
</template>
20-
21-
<template id="configurator_s_title" inherit_id="website.configurator_s_title">
22-
<!-- Shape option -->
23-
<xpath expr="//section" position="attributes">
24-
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/07_002","flip":[]}</attribute>
11+
We create the perfect <br/>tailored solution for you
2512
</xpath>
26-
<!-- Shape -->
27-
<xpath expr="//div[hasclass('container')]" position="before">
28-
<div class="o_we_shape o_web_editor_Origins_07_002"/>
13+
<xpath expr="//h2" position="attributes">
14+
<attribute name="class" remove="display-3-fs" separator=" "/>
2915
</xpath>
3016
</template>
3117

0 commit comments

Comments
 (0)
Please sign in to comment.