From 08807fcba959f3d8b70513824f614a2985f001fc Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 6 Dec 2018 17:56:51 +0000 Subject: [PATCH] [IMP] website: keep social media popover on one row Before this commit, the social media popover (used in forum but available everywhere) may break over multiple rows if used on a relative positioned small button. This however never occurred in standard <= 12.0 so we will consider this not a bug fix. This will however occur with the upcoming forum refactoring, so we needed a fix for master. This commit forces the social icons on one row and take the opportunity to refactor the template to make a simpler and more beautiful popover by using conventional icons and social media own colors. closes odoo/odoo#29327 --- .../static/src/scss/primary_variables.scss | 7 +++++++ addons/website/static/src/scss/website.scss | 4 ++++ addons/website/static/src/xml/website.share.xml | 16 +++++++--------- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/addons/website/static/src/scss/primary_variables.scss b/addons/website/static/src/scss/primary_variables.scss index 752823b7715..1cd2341ae59 100644 --- a/addons/website/static/src/scss/primary_variables.scss +++ b/addons/website/static/src/scss/primary_variables.scss @@ -31,6 +31,13 @@ $o-user-color-palette: () !default; // palette. $o-user-theme-color-palette: () !default; +$o-social-colors: ( + 'facebook': #3B5999, + 'twitter': #55ACEE, + 'linkedin': #0077B5, + 'google-plus': #DD4B39, +); + //------------------------------------------------------------------------------ // Fonts //------------------------------------------------------------------------------ diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 09946969873..eb350d658ce 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -1066,3 +1066,7 @@ table.table_desc tr td { background-color: rgba($value, 0.1); } } + +@each $media, $color in $o-social-colors { + @include text-emphasis-variant(".text-#{$media}", $color); +} diff --git a/addons/website/static/src/xml/website.share.xml b/addons/website/static/src/xml/website.share.xml index d78c1babc46..f07a2907492 100644 --- a/addons/website/static/src/xml/website.share.xml +++ b/addons/website/static/src/xml/website.share.xml @@ -1,15 +1,13 @@ -
-
- - - - - - -
+
+ + +