Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] theme_bewise: revamp theme #922

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions theme_bewise/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'category': 'Theme/Education',
'summary': 'University, Education, Schools, Young, Play, Kids',
'sequence': 240,
'version': '2.1.0',
'version': '3.0.0',
'depends': ['theme_common'],
'data': [
'data/generate_primary_template.xml',
Expand All @@ -18,15 +18,13 @@
'static/description/bewise_screenshot.jpg',
],
'images_preview_theme': {
'website.s_cover_default_image': '/theme_bewise/static/src/img/backgrounds/college_bg.jpg',
'website.s_text_image_default_image': '/theme_bewise/static/src/img/content/college_graduate.jpg',
'website.s_image_text_default_image': '/theme_bewise/static/src/img/content/college_students.jpg',
'website.s_picture_default_image': '/theme_bewise/static/src/img/content/college_library.jpg',
'website.s_media_list_default_image_1': '/theme_bewise/static/src/img/content/college_media_1.jpg',
'website.s_media_list_default_image_2': '/theme_bewise/static/src/img/content/college_media_2.jpg',
'website.s_quotes_carousel_demo_image_0': '/theme_bewise/static/src/img/backgrounds/college_bg_4.jpg',
'website.s_masonry_block_default_image_1': '/theme_bewise/static/src/img/content/content_img_25.jpg',
},
'configurator_snippets': {
'homepage': ['s_cover', 's_call_to_action', 's_text_image', 's_numbers', 's_image_text', 's_quotes_carousel', 's_color_blocks_2'],
'homepage': ['s_striped_center_top', 's_title', 's_color_blocks_2', 's_faq_collapse', 's_masonry_block', 's_company_team_shapes'],
},
'license': 'LGPL-3',
'live_test_url': 'https://theme-bewise.odoo.com',
Expand Down
Binary file modified theme_bewise/static/description/bewise_screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
430 changes: 166 additions & 264 deletions theme_bewise/static/description/theme_bewise.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified theme_bewise/static/src/img/content/college_library.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 16 additions & 27 deletions theme_bewise/static/src/js/tour.js
Original file line number Diff line number Diff line change
@@ -1,58 +1,47 @@
/** @odoo-module */
import * as wTourUtils from '@website/js/tours/tour_utils';
import { _t } from "@web/core/l10n/translation";

const snippets = [
{
id: 's_cover',
name: 'Cover',
id: 's_striped_center_top',
name: 'Striped Center Top',
groupName: "Intro",
},
{
id: 's_call_to_action',
name: 'Call to Action',
groupName: "Content",
id: 's_title',
name: 'Title',
groupName: "Text",
},
{
id: 's_text_image',
name: 'Text - Image',
id: 's_color_blocks_2',
name: 'Big Boxes',
groupName: "Content",
},
{
id: 's_numbers',
name: 'Numbers',
groupName: "Content",
id: 's_faq_collapse',
name: 'FAQ Block',
groupName: "Text",
},
{
id: 's_image_text',
name: 'Image - Text',
groupName: "Content",
id: 's_masonry_block',
name: 'Masonry',
groupName: "Images",
},
{
id: 's_quotes_carousel',
name: 'Quotes',
id: 's_company_team_shapes',
name: 'Team Shapes',
groupName: "People",
},
{
id: 's_color_blocks_2',
name: 'Big Boxes',
groupName: "Content",
},
];

wTourUtils.registerThemeHomepageTour("bewise_tour", () => [
wTourUtils.assertCssVariable('--color-palettes-name', '"bewise-1"'),
wTourUtils.assertCssVariable('--color-palettes-name', '"default-19"'),
...wTourUtils.dragNDrop(snippets[0], 'top'),
...wTourUtils.clickOnText(snippets[0], 'h1', 'top'),
wTourUtils.goBackToBlocks(),
...wTourUtils.dragNDrop(snippets[1], 'top'),
...wTourUtils.dragNDrop(snippets[2], 'top'),
...wTourUtils.dragNDrop(snippets[3], 'top'),
...wTourUtils.clickOnSnippet(snippets[3], 'top'),
wTourUtils.changeOption('BackgroundShape', 'we-toggler', _t('Background Shape')),
wTourUtils.selectNested('we-select-page', 'BackgroundShape', ':not(.o_we_pager_controls)', _t('Background Shape')),
wTourUtils.goBackToBlocks(),
...wTourUtils.dragNDrop(snippets[4], 'top'),
...wTourUtils.dragNDrop(snippets[5], 'top'),
...wTourUtils.dragNDrop(snippets[6], 'top'),
]);
35 changes: 7 additions & 28 deletions theme_bewise/static/src/scss/primary_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ $o-theme-color-palettes: map-merge($o-theme-color-palettes,
// Fonts
//------------------------------------------------------------------------------

$o-theme-h1-font-size-multiplier: (56 / 21);
$o-theme-h2-font-size-multiplier: (36 / 21);
$o-theme-h3-font-size-multiplier: (28 / 21);
$o-theme-h4-font-size-multiplier: (24 / 21);
$o-theme-h5-font-size-multiplier: 1;
$o-theme-h6-font-size-multiplier: (18 / 21);

$o-theme-font-configs: (
'Source Sans Pro': (
'family': ('Source Sans Pro', sans-serif),
'url': 'Source+Sans+Pro:300,300i,400,400i,700,700i',
),
'Lato': (
'family': ('Lato', sans-serif),
'url': 'Lato:300,300i,400,400i,700,700i',
Expand Down Expand Up @@ -101,24 +98,15 @@ $o-theme-font-configs: (

$o-website-values-palettes: (
(
'color-palettes-name': 'bewise-1',

'header-font-size': (20 / 16) * 1rem,
'font-size-base': 1.3125rem,
'color-palettes-name': 'default-19',

'font': 'Darker Grotesque',
'headings-font': 'Raleway',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think the Raleway should be removed here (since it's no longer used) or you prefer to keep it available ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it should remain available.
I people want to go back to this font it would be handy to find it directly in the list

'font': 'Source Sans Pro',
'headings-font': 'Darker Grotesque',

'footer-template': 'headline',

'btn-font-size-lg': 1.65rem,
'btn-padding-y-lg': .5rem,
'btn-ripple': true,
),
);

$o-selected-color-palettes-names: append($o-selected-color-palettes-names, 'bewise-1');

$o-color-palettes-compatibility-indexes: (
1: 'bewise-1',
2: 'bewise-2',
Expand Down Expand Up @@ -147,12 +135,3 @@ $o-theme-color-palettes-compatibility-indexes: (
3: 'bewise-3',
4: 'bewise-4',
);

//------------------------------------------------------------------------------
// Shapes
//------------------------------------------------------------------------------

$o-bg-shapes: change-shape-colors-mapping('web_editor', 'Origins/14_001', (3: 1, 4: 1));
$o-bg-shapes: change-shape-colors-mapping('web_editor', 'Rainy/08_001', (1: 1, 4: 1));
$o-bg-shapes: change-shape-colors-mapping('web_editor', 'Floats/06', (1: 3, 2: 5, 3: 5, 5: 3));
$o-bg-shapes: change-shape-colors-mapping('web_editor', 'Airy/04_001', (1: 3));
29 changes: 28 additions & 1 deletion theme_bewise/views/customizations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,19 @@
</xpath>
</template>

<!-- ======== TITLE ======== -->
<template id="s_title" inherit_id="website.s_title" name="Be Wise s_title">
<xpath expr="//section" position="attributes">
<attribute name="class" remove="pt40" separator=" "/>
</xpath>
<xpath expr="//h2" position="replace" mode="inner">
Empower young minds
</xpath>
<xpath expr="//h2" position="attributes">
<attribute name="class" remove="display-3-fs" separator=" "/>
</xpath>
</template>

<!-- ======== TEXT-IMAGE ======== -->
<template id="s_text_image" inherit_id="website.s_text_image" name="Be Wise s_text_image">
<xpath expr="//h2" position="replace" mode="inner">
Expand Down Expand Up @@ -752,6 +765,9 @@
<xpath expr="//h1" position="replace" mode="inner">
Shaping Tomorrow's <br/>Game Changers
</xpath>
<xpath expr="//h1" position="attributes">
<attribute name="class" add="display-3-fs" separator=" "/>
</xpath>
<!-- Paragraph -->
<xpath expr="//p[hasclass('lead')]" position="replace" mode="inner">
Empower young minds with quality education and engaging learning experiences that nurture creativity, play, and academic excellence.
Expand All @@ -762,7 +778,7 @@
</xpath>
<!-- Figcaption -->
<xpath expr="//figcaption" position="replace" mode="inner">
Where learning meets fun
Where tradition meets innovation – a legacy of excellence in education.
</xpath>
</template>

Expand Down Expand Up @@ -1111,4 +1127,15 @@
</xpath>
</template>

<!-- ======== COMPANY TEAM SHAPES ======== -->
<template id="configurator_s_company_team_shapes" inherit_id="website.configurator_s_company_team_shapes">
<xpath expr="//section" position="attributes">
<attribute name="data-oe-shape-data">{"shape":"web_editor/Origins/05",'colors':{'c3': 'o-color-4'}}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('o_container_small')]" position="before">
<div class="o_we_shape o_web_editor_Origins_05" style="background-image: url('/web_editor/shape/web_editor%2FOrigins%2F05.svg?c3=o-color-4');"/>
</xpath>
</template>

</odoo>
15 changes: 15 additions & 0 deletions theme_bewise/views/image_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,5 +387,20 @@
<field name="name">website.s_empowerment_default_image</field>
<field name="url">/theme_bewise/static/src/img/content/s_empowerment_default_image.jpg</field>
</record>
<record id="s_three_columns_default_image_1" model="theme.ir.attachment">
<field name="key">website.s_three_columns_default_image_1</field>
<field name="name">website.s_three_columns_default_image_1</field>
<field name="url">/theme_bewise/static/src/img/content/college_carousel_2.jpg</field>
</record>
<record id="s_three_columns_default_image_2" model="theme.ir.attachment">
<field name="key">website.s_three_columns_default_image_2</field>
<field name="name">website.s_three_columns_default_image_2</field>
<field name="url">/theme_bewise/static/src/img/content/college_graduate_2.jpg</field>
</record>
<record id="s_three_columns_default_image_3" model="theme.ir.attachment">
<field name="key">website.s_three_columns_default_image_3</field>
<field name="name">website.s_three_columns_default_image_3</field>
<field name="url">/theme_bewise/static/src/img/content/library_image_10.jpg</field>
</record>

</odoo>