diff --git a/content/developer/howtos/website_themes/theming.rst b/content/developer/howtos/website_themes/theming.rst index bb83b2506..fe5ba0d48 100644 --- a/content/developer/howtos/website_themes/theming.rst +++ b/content/developer/howtos/website_themes/theming.rst @@ -158,7 +158,8 @@ always required. It usually contains much more information. (Blogs, Events, eCommerce, ...), you can also add them. - Odoo version and major number are mandatory. However, patch number is optional. If you want to specify the required version of Odoo to run your module, you should use a five arguments - structure, using the first two arguments to indicate the Odoo version. + structure, using the first two arguments to indicate your current Odoo version (for + instance, `{BRANCH}`). .. image:: theming/versioning.png :alt: Module versioning @@ -562,6 +563,167 @@ values and *not* the :file:`primary_variables.scss` file. http://localhost:8069/website/demo/bootstrap +.. _theming/module/bootstrap/fonts: + +Font sizes +~~~~~~~~~~ + +Odoo has CSS font size classes to separate style (font sizes) and semantic (tag and styles in +general). Both logic can be combined to be more flexible. + +.. seealso:: + `Bootstrap documentation about display headings + `_ + +.. _theming/module/bootstrap/fonts/text: + +Text style +********** + +Odoo's Website Builder allows to select a style for your text. Some are just tag related like the +`Header` with no extra CSS class. Other combine tag and style directly applied on them like the +`Header 1 Display`. + +.. image:: theming/header.png + :alt: Header styles + :width: 300 + +.. code-block:: xml + + +

Heading 1 with Display Heading 1 size

+

Heading 1 with Display Heading 2 size

+

Heading 1 with Display Heading 3 size

+

Heading 1 with Display Heading 4 size

+ + +

A text typically used as an introduction.

+ + +

Body text with a smaller size.

+ +.. _theming/module/bootstrap/fonts/sizing: + +Sizing classes +************** + +The sizing classes are added on a freshly created `span` tag inside the targeted element (See +examples below). + +.. image:: theming/sizing.png + :alt: Sizing classes + :width: 300 + +.. _theming/module/bootstrap/fonts/sizing/headings-and-body: + +Heading and body text +^^^^^^^^^^^^^^^^^^^^^ + +Assuming these classes can be applied on any text element, take `h2` as an example below: + +.. code-block:: xml + + +

Heading

+ + +

Heading

+

Heading

+

Heading

+

Heading

+

Heading

+ + +

Heading

+ + +

Heading

+ +.. _theming/module/bootstrap/fonts/sizing/display: + +Display headings +^^^^^^^^^^^^^^^^ + +If larger titles are needed, Odoo uses Bootstrap's Display Headings classes, from `display-1` to `6`. + +.. code-block:: xml + +

Heading

+

Heading

+

Heading

+

Heading

+ +.. note:: + The Website Builder allows the user to configure only sizes from `Display 1` to `Display 4`. You + can set the other sizes (`5` and `6`) to use them in your code but the user won't be able to + modify them directly within the Website Builder interface. + +.. _theming/module/website: + +Website settings +---------------- + +Global options related to the website can be set through the website record by following the +structure below. + +**Declaration** + +.. code-block:: xml + :caption: ``/website_airproof/data/website.xml`` + + + + + Airproof + + + 18 + 3 + + /contact-us + https://www.facebook.com/Airproof + https://www.instagram.com/airproof + https://www.linkedin.com/company/airproof + https://www.youtube.com/c/airproof + + + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :widths: 20 80 + + * - Field + - Description + * - name + - Name of the website (displayed in the browser) + * - logo + - Path to the logo (previously created into a record) + * - favicon + - Path to the favicon (previously created into a record) + * - shop_ppg + - Number of products shown per page in the e-commerce + * - shop_ppr + - Number of products shown per rows (in a page) in the e-commerce + * - cookies_bar + - Enable/disable the cookies bar + * - contact_us_button_url + - URL of the `Contact us` page (For instance, used in the standard header templates). + * - social_facebook + - URL of a Facebook profile + * - social_instagram + - URL of a Instagram profile + * - social_linkedin + - URL of a LinkedIn company profile + * - social_youtube + - URL of a YouTube channel + +.. note:: + + `website.default_website` is the default reference whenever you work with only one website. If + there are several websites in your database, this record will refer to the default site (the + first one). + .. _theming/module/views: Views diff --git a/content/developer/howtos/website_themes/theming/header.png b/content/developer/howtos/website_themes/theming/header.png new file mode 100644 index 000000000..13da46e2e Binary files /dev/null and b/content/developer/howtos/website_themes/theming/header.png differ diff --git a/content/developer/howtos/website_themes/theming/sizing.png b/content/developer/howtos/website_themes/theming/sizing.png new file mode 100644 index 000000000..6436375c1 Binary files /dev/null and b/content/developer/howtos/website_themes/theming/sizing.png differ diff --git a/content/developer/howtos/website_themes/theming/theme-colors-big.png b/content/developer/howtos/website_themes/theming/theme-colors-big.png index fa606feda..07e3fa201 100644 Binary files a/content/developer/howtos/website_themes/theming/theme-colors-big.png and b/content/developer/howtos/website_themes/theming/theme-colors-big.png differ diff --git a/content/developer/howtos/website_themes/theming/theme-colors.png b/content/developer/howtos/website_themes/theming/theme-colors.png index fc29e7312..dbcfe1e60 100644 Binary files a/content/developer/howtos/website_themes/theming/theme-colors.png and b/content/developer/howtos/website_themes/theming/theme-colors.png differ diff --git a/content/developer/howtos/website_themes/theming/versioning.png b/content/developer/howtos/website_themes/theming/versioning.png index 28a90fe79..4a7126d16 100644 Binary files a/content/developer/howtos/website_themes/theming/versioning.png and b/content/developer/howtos/website_themes/theming/versioning.png differ