Skip to content

Commit

Permalink
[IMP] to_backend_theme: change background image
Browse files Browse the repository at this point in the history
  • Loading branch information
duyquyen96 committed Aug 13, 2024
1 parent 11c585f commit ea91fd1
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 8 deletions.
27 changes: 24 additions & 3 deletions to_backend_theme/static/src/components/apps_menu/apps_menu.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
:root {
.o_grid_apps_menu[data-theme="viindoo"] {
.o_apps_menu_opened[data-theme="viindoo"] {
--app-menu-background: url("/to_backend_theme/static/src/img/home-menu-bg-overlay.svg")

}

.o_apps_menu_opened[data-theme="milk"] {
--app-menu-background: url("/web_responsive/static/src/img/home-menu-bg-overlay.svg"),
linear-gradient(
to bottom,
#{$app-menu-background-color},
#{desaturate(lighten($app-menu-background-color, 20%), 15)}
);
}

.o_apps_menu_opened[data-theme="community"] {
--app-menu-background: url("/web_responsive/static/src/img/home-menu-bg-overlay.svg"),
linear-gradient(
to bottom,
#{$brand-primary-dark},
#{desaturate(lighten($brand-primary-dark, 20%), 15)}
#{$o-brand-primary},
#{desaturate(lighten($o-brand-primary, 20%), 15)}
);
}
}
.app-menu-container {
background: none !important
}

.o_apps_menu_opened {
background: var(--app-menu-background);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/** @odoo-module **/

import { session } from "@web/session";
import { onMounted } from "@odoo/owl";
import { AppsMenuAction } from "@web_responsive/components/apps_menu/apps_menu_service";
import { patch } from "@web/core/utils/patch";


patch(AppsMenuAction.prototype, {
setup() {
super.setup();
onMounted(() => {
this.theme = session.apps_menu.theme || "viindoo";
document.body.setAttribute('data-theme', this.theme);
})
},
});


Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:root {
.o_grid_apps_menu[data-theme="viindoo"] {
--app-menu-text-color: white;
--app-menu-text-shadow: 1px 1px 1px #{rgba(black, 0.4)};
--app-menu-hover-background: #{rgba(white, 0.2)};
--app-menu-text-color: "#374151";
// --app-menu-text-shadow: 1px 1px 1px #{rgba(black, 0.4)};
// --app-menu-hover-background: #{rgba(white, 0.2)};
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
:root {
.o_grid_apps_menu[data-theme="viindoo"] {
--apps-menu-scrollbar-background: white;
--apps-menu-empty-search-color: white;
--app-menu-text-color: #374151;
--apps-menu-scrollbar-background: #374151;
--apps-menu-empty-search-color: #374151;
}
}
82 changes: 82 additions & 0 deletions to_backend_theme/static/src/img/home-menu-bg-overlay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ea91fd1

Please sign in to comment.