From f190b6ebb0712cede82e51ac5e38c51be4c98528 Mon Sep 17 00:00:00 2001 From: Brieuc-brd Date: Thu, 27 Jul 2023 12:57:21 +0200 Subject: [PATCH] [FIX] website_forum: fix color issues === ISSUE 1 === Prior to this commit, card colors in the index list were static, creating a contrast issue if the page background color changed. This commit fixes this issue. === ISSUE 2 === Prior to this commit, the popover text color and the shadow created color issues when the background color of the page was dark. To fix that and maintain consistency, we use the common Bootstrap shadow and force the text color to be dark. task-3559012 Part of task-3097005 closes odoo/odoo#141069 X-original-commit: ac61d3ba59b9fa10e300cbf065d73c165e1d7af0 Signed-off-by: Thibault Delavallee (tde) --- addons/website_forum/static/src/js/website_forum.js | 2 +- .../website_forum/static/src/scss/website_forum.scss | 10 ++++++++-- .../views/forum_forum_templates_forum_all.xml | 4 ++-- .../website_forum/views/forum_forum_templates_post.xml | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index cccae9e59e8..652f03972b2 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -164,7 +164,7 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ offset: '10', animation: false, html: true, - customClass: 'o_wforum_bio_popover_container', + customClass: 'o_wforum_bio_popover_container shadow-sm', }); }); diff --git a/addons/website_forum/static/src/scss/website_forum.scss b/addons/website_forum/static/src/scss/website_forum.scss index 95fa78e92ff..3cf169110b2 100644 --- a/addons/website_forum/static/src/scss/website_forum.scss +++ b/addons/website_forum/static/src/scss/website_forum.scss @@ -260,14 +260,16 @@ $-forum-sidebar-width: map-get($container-max-widths, sm) / 2; } .popover.o_wforum_bio_popover_container { - box-shadow: 0 2px 5px $gray-400; - .popover-header { background-color: tint-color($primary, 80%); border-bottom: 0; color: $primary; } + .popover-body { + color: $dark; + } + max-width: 552px; .o-text-gold { @@ -291,3 +293,7 @@ $-forum-sidebar-width: map-get($container-max-widths, sm) / 2; box-shadow: $box-shadow !important; } } + +.o_wforum_background_gradient { + background-image: linear-gradient(0deg, rgba($body-bg, .75) 30%, rgba($body-bg, 0) 100%); +} diff --git a/addons/website_forum/views/forum_forum_templates_forum_all.xml b/addons/website_forum/views/forum_forum_templates_forum_all.xml index c101d52fa7a..e5d4b947182 100644 --- a/addons/website_forum/views/forum_forum_templates_forum_all.xml +++ b/addons/website_forum/views/forum_forum_templates_forum_all.xml @@ -39,8 +39,8 @@ class="card oe_img_bg h-100 justify-content-end shadow-sm border-0 p-3 pt-5 text-reset text-decoration-none transition-base" t-attf-style="background-image: url('#{website.image_url(forum, 'image_1920') if forum.image_1920 else ''}')" > -
-
+
+

diff --git a/addons/website_forum/views/forum_forum_templates_post.xml b/addons/website_forum/views/forum_forum_templates_post.xml index 2f77d978267..07d37bd6869 100644 --- a/addons/website_forum/views/forum_forum_templates_post.xml +++ b/addons/website_forum/views/forum_forum_templates_post.xml @@ -40,7 +40,7 @@ t-value="'/forum/' + slug(question_tag.forum_id) + '/tag/' + slug(question_tag) + '/questions?' + keep_query( 'search', 'sorting', 'my', 'create_uid', filters='tag')"/>

@@ -182,7 +182,7 @@