Commit Graph
17 Commits
Author SHA1 Message Date
qsm-odoo 22c4311e28 [IMP] *: make customize dialog generic and improve options
* web, web_editor, website, website_theme_install, portal,
  theme_default, theme_bootswatch

The purpose of this task is to make the customize dialog as generic as
possible, that is theme-independant:

1) The design is now totally generic (Odoo visuals)
2) The XML definition is form-view like. This allows themes to extend
   the dialog without any risk of breaking the style and also allows to
   not care about lots of technical details.
3) New options have been included. Those were themes options that are
   now generic and which themes can simply adapt without touching the
   customize modal (navbar colors, footer color, navbar layout, fonts,
   body background, ...).

The color palette can now also be customized with user colors.

Using sass functionnalities, color palettes and fonts integration is now
a lot better.

Thanks to @qha-odoo for the original design.

task-31677
2018-08-10 16:49:29 +02:00
qsm-odoo d8c217a67d [REF] *: BS4, review color system
Odoo used to declare two main colors: primary and optional (which are
purple and turquoise in enterprise). Those were respectively assigned
to the 'primary' bootstrap variable and the 'btn-primary' bootstrap
variable.

BS4, however, does not allow to have a different primary color for
buttons. Instead, the 'primary' color is used for all 'primary' related
components and utility classes, same as for all other colors. So, if we
want to keep our enterprise buttons green, our 'optional' colors had to
become our 'primary' color. The old odoo primary is then renamed to the
'odoo' color.

The palette of grays is now larger by default and is numbered from 100 to
900 alongside the $black and $white variables. The equivalence for older
variables and the way we used them is:

$gray-darker          ->  gray 900 (unused before)
$gray-dark            ->  gray 900
$gray                 ->  gray 700
$gray-light           ->  gray 600
$gray-lighter-darker  ->  gray 400 (the old variable was created by us)
$gray-lighter-dark    ->  gray 300 (the old variable was created by us)
$gray-lighter         ->  gray 200

Fortunately, the 'lighter' variations we created fit well in the default
BS4 system ! Unfortunately, our $gray-lighter which carried the same
function as $gray-200 (see above) is very close to the new default
$gray-100 and quite distant from the new $gray-200. This will be handled
in the next commit.
2018-07-27 12:36:54 +02:00
qsm-odoo c59380bac5 [REF] *: BS4, rename btn-default to btn-secondary
BS4 "btn-default" class was replaced with "btn-secondary", which makes
more sense.
2018-07-27 12:36:54 +02:00
qsm-odoo 0ca6d39777 [REF] *: BS4, adapt media queries
media queries that target a specific screen size handled by bootstrap
have now a more convenient way to be defined:

```
@​media (min-width: $screen-sm-min) { ... }
->
@​include media-breakpoint-up(sm) { ... }
```

```
@​media (max-width: $screen-sm-max) { ... }
->
@​include media-breakpoint-down(sm) { ... }
```

```
@​media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) { ... }
->
@​include media-breakpoint-only(sm) { ... }
```

```
@​media (min-width: $screen-sm-min) and (max-width: $screen-md-max) { ... }
->
@​include media-breakpoint-between(sm, md) { ... }
```

Also, bootstrap has changed the values for its default screen sizes:

------------------
     | BS3 | BS4 |
------------------
0    | XS  | XS  | -> Portrait Mobile
576  | /   | SM  | -> Landscape Mobile
768  | SM  | MD  | -> Portrait Tablet
992  | MD  | LG  | -> Landscape Tablet / Small Desktop
1200 | LG  | XL  | -> Desktop
------------------

While it is possible to configure BS variables to behave as BS3, we took
the decision to keep the BS4 variables untouched. BS4 system seems
indeed better and having the purest bootstrap possible is better for
Odoo to be used as a framework.
2018-07-27 12:36:54 +02:00
qsm-odoo 67cace90a9 [REF] theme_default: adapt the scss convertion for everything to work 2018-04-18 15:59:22 +02:00
qsm-odoo 97aa0a8dec [REF] *: convert less content to scss content
Convert content so that the assets compile on app installation. The
style is still broken after this as the variables/mixins/... are not
defined in the right order (as it did not matter in LESS but does in
SCSS).

This commit basically changes:
- Variables: @​var_hello -> $var-hello
- Mixins: .mixin_world() {} -> @​mixin mixin-world {}
- Classes used as mixin: .my_class() -> @​extend .my_class
    - Here there were no other solution than to convert the use of
      a mixin call by the use of an extend as a first approximation
- LESS functions -> SCSS functions (e.g. fade -> rgba)
- Move first variable definition before the variable is used
    - Still need to make sure last variable definition is at the
      right place
2018-04-18 15:59:16 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
stefanorigano 8dfc757386 [IMP] theme_bootswatch, theme_default: add screenshots 2017-06-30 17:28:42 +02:00
Christophe Simonis c2569b9df1 [MERGE] forward port branch 9.0 up to 30dda3faee 2017-03-28 13:21:24 +02:00
Christophe Simonis 30dda3faee [MERGE] forward port branch saas-6 up to 8fd0f8664b 2017-03-28 13:16:16 +02:00
Pierre Masereel 8fd0f8664b [FIX] theme_default: full width in mobile
When a theme is customized to be 'boxed', the website is not full width
in mobile, and there is an horizontal scrolling.

To fix this issue, we removed only set the width of the "wrapwrap" div
to 85% when the screen is bigger than a phone.
2017-03-27 14:22:00 +02:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
qsm-odoo 5b65befcd8 [REF] web,web_editor,website,report,mass_mailing,mail: LESS
* Convert some CSS to LESS
* Split/Join LESS files
* Remove duplicates between website and web_editor
* UI improvements
* Allow simple customizations thanks to LESS var&mixins for website
2016-02-24 13:09:48 +01:00
qsm-odoo f731217a0d [REF] theme_(default,bootswatch)
Add sequence numbers and remove auto_install of theme_default.
Also change the theme_default icon and add a cover.
2016-01-04 15:49:14 +01:00
Jeremy Kersten 3d496addf5 [IMP] theme_default: add an icon for description in module list 2015-08-26 17:35:50 +02:00
David Monjoie 1cbf013234 [IMP] theme_default: fixed confusion with website
It was quite confusing to use the same icon as the
website builder while having a similar name, even
worse as it appeared as first result for 'website'.
2015-07-06 15:02:21 +02:00
David Monjoie a9a6aa7ca2 [IMP] website: extract default website customize options into new theme_default module 2015-06-16 15:36:05 +02:00