Commit Graph

117 Commits

Author SHA1 Message Date
Elisabeth Dickinson
11414bc285 [IMP][CSS] Fix alignment on modal btn-close 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
9613b7a40c [IMP] Indentation fix 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
d04496adea [REM] Removal of changelog
The idea was not developed and it has since been decided not to do it.
2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
830b1a00aa [IMP][CSS] Use BS font-weight variables and fix
Instead of redefining font-weights, we override the BS variables and add
one extra font-weight in the newly-introduced extended utilities file.
After this change all the variables needed replacing and some tweaking
was needed to get the same or closely similar result as before this
change.

By doing so the font-weight classes in the typography file were obsolete
and hence removed.
Some other font-weight issues which were already there have been fixed
in this commit too.
2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
de13db24a0 [IMP][CSS] Fix color variable issue 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
4bbf0d542f [IMP][CSS] Revamp of the .o_spoiler element to use same code as alerts 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
64787fce6e [IMP][CSS]Change order of imported scss files
The aim of this cleanup is to use as many bootstrap classes, functions
and utilities as possible to reduce the amount of extra code.
Instead of redefining variables, BS variables are overridden in the
bootstrap_overridden file.

In order to be able to reuse these overridden variables within our own
custom variable file — and after consultation with SRI — it was
determined that the variables.scss file should come after the bootstrap
files in the order of importation, unlike the order of odoo website's
scss files.

Changes to variables in bootstrap_overridden have been made to adapt to
the new structure.
2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
c24402385a [IMP][CSS] Use CSS variables to style different alert types
CSS variables avoid having to repeat code for each alert type.
Also remove the need to add "tip" to the theme-colors (no need for "tip"
styled buttons, badges etc, especially as tips use the primary color) by
styling `.alert-tip` with customized copy of BS alert mechanism.

In order to be able to modify the icons with a CSS variable,
the `content` attribute has been removed from the `o-inline-icon` mixin.
Code where this mixin is called in other places has been adapted.
2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
443ad1c6c1 [IMP][CSS] Place overrides in bootstrap_overridden file 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
39d5c90480 [IMP][CSS] Clean up the file according to conventions
Includes reordering styles, renaming variables ($o-*),
re-indenting lines, removing commented code
2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
29d043102c [IMP][CSS] Set gray background to it's original darker color 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
ddc2014728 [IMP][CSS] Improve literals styling (o_code, .sig-*) 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
5864376199 [IMP][CSS] Update _sphinx_basic.css after update of Sphinx
Note: Some code is commented instead of being deleted.
This allows us to keep track of what should be commented out in future
versions of Sphinx' basic CSS.
2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
b6e6f74410 [IMP][CSS] Remove repetitive or unnused CSS 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
29c1151551 [IMP][CSS] Improve margins on headings and sections 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
069bd62fdf [IMP][CSS] Replace margin and padding values with variables 2023-01-03 08:48:41 +01:00
Elisabeth Dickinson
28d19ede84 [IMP][CSS] Revamp modal to use all BS classes and variables 2023-01-03 08:48:40 +01:00
Elisabeth Dickinson
2c250f605a [IMP][CSS] Rescale heading fonts 2023-01-03 08:48:40 +01:00
Elisabeth Dickinson
0ff455dbdb [IMP][CSS] Cleanup font variables 2023-01-03 08:48:40 +01:00
Elisabeth Dickinson
e4bb7e34df [IMP][CSS] Cleanup admonitions (alerts) 2023-01-03 08:48:40 +01:00
Elisabeth Dickinson
2d977b2c48 [IMP][CSS] Cleanup color variables 2023-01-03 08:48:40 +01:00
Elisabeth Dickinson
1fa11060ad [IMP][CSS] update literals styles (.o_code, .sig-*) 2023-01-03 08:48:40 +01:00
Antoine Vandevenne (anv)
2073beb1c9 [IMP] odoo_theme: add the class o_code on literals
The SCSS that styles the `literal`, `code`, `file`, and `command` roles
is excessively complex because the traduction from RST to HTML is not
consistent from one role to another: some use `<code>` elements, some
have the `code` class, some wrap the literal with a `span` element.

This commit sets the `o_code` class on all of these roles' parent node
at translation time to allow simplifying the SCSS target.
2023-01-03 08:48:40 +01:00
Antoine Vandevenne (anv)
cc98a064c0 [FIX] odoo_theme: handle non-TOC pages when expanding top menu entries
Trying to "expand" those pages lead to a crash that prevented the menu
to be shown at all.

Incidentally, this commit also handles menus built with `make fast`.

closes odoo/documentation#3251

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-02 16:11:04 +01:00
Antoine Vandevenne (anv)
bcd752f01c [IMP] odoo_theme: scroll the active menu entry into view
In large and deeply nested TOCs like finance/accounting/fiscal_localizations/localizations/...
the user had to constantly scroll the menu to the menu entry they just
clicked because the expanded menu would not fit entirely on the page.
With this commit, the active menu entry is scrolled into view each time
the page is reloaded.

The previous behavior was also the reason for expanding the top menu
entries on only the homepage. Thanks to the scroll, they now always
expand.

Part-of: odoo/documentation#3251
2023-01-02 16:11:04 +01:00
Antoine Vandevenne (anv)
f068065d39 [FIX] odoo_theme: update the aria attributes when scrolling the page TOC
The 'aria-expanded' attribute was not correctly updated on the `i` tag
when the user scrolled through the page TOC. This caused a minor issue
where an arrow (`i`) that was collapsed manually with a click would no
longer automatically expand afterward.

task-3106339

closes odoo/documentation#3224

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-27 11:55:02 +01:00
Antoine Vandevenne (anv)
5526f1ea07 [IMP] odoo_theme: expand top level menu items on the homepage
When the user browses the homepage, it might be hard to figure out
where they want to go next. Expanding the top-level menu items could
help them with that.

task-3106339

Part-of: odoo/documentation#3224
2022-12-27 11:55:02 +01:00
Morgane (morm)
b7bc34a197 [IMP] documentation: legal page design
Prior to this commit, the terms and conditions were displayed in a table
with all the languages and it was not practical for the futur, with many
more languages.

task-3073198

closes odoo/documentation#3058

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-07 10:45:41 +01:00
Morgane (morm)
c9a001d22b [FIX] documentation: tabs responsiveness
Prior of this commit, the tabs were not responsive in the documentation

closes odoo/documentation#3062

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-02 15:59:57 +01:00
Victor Feyens
4af7600805 [FIX] *: enforce 1 newline on files end
Part-of: odoo/documentation#2978
2022-11-18 17:33:13 +01:00
Victor Feyens
8a5aa384d3 [CLN] core: upgrade to python 3.6
& sort imports

closes odoo/documentation#2954

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-15 16:21:56 +01:00
Antoine Vandevenne (anv)
4d7a88639a [IMP] extensions/spoilers: add an extension for spoilers
It is often needed in developer tutorials to show excerpts of code for
examples and solutions. This takes quite some page space and, for the
latter, it is not always desired to show the final code result right
after the exercise objective.

This commit adds a spoiler feature to the documentation to allow hiding
content until the reader wants to display it.

The feature relies on the new `.. spoiler:: Button label` directive.

task-3036845

closes odoo/documentation#2837

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Morgan Meganck <morm@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2022-10-28 11:29:30 +02:00
stefanorigano (SRI)
1691e8970b [IMP] odoo_theme: add default BS functions
Prior to this change it was not possible to use Bootstrap default SCSS
functions in 'bootstrap_overridden.scss'.

This commit mirrors odoo framework's architecture, injecting bootstrap
'_functions.scss' at the beginning of the documentation's SCSS "bundle".

Commit preparatory to the introduction of the 'Spoiler' documentation
component.

task-3036845

Part-of: odoo/documentation#2837
2022-10-28 11:29:29 +02:00
Victor Feyens
a0e608bfc5 [IMP] conf.py, requirements.txt, *: allow building with Python 3.10
- Bump Sphinx version to 4.3.2 (default for Debian Jammy).
- Remove the retrocompatibility for Sphinx < 3.5 (warnings are raised in
  4.5).
- Fix translator issue crashing builds.
- Unpin jinja2 from the requirements as the base issue is solved in sphinx 4

Task - 2898477

closes odoo/documentation#2361

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-07-14 16:39:48 +02:00
Antoine Vandevenne (anv)
f648960c78 [FIX] odoo_theme: show a cursor when hovering on an image without modal
The images that have the class `o-no-modal` cannot be clicked to open in
a modal, so the cursor should not be changed to a pointer when hovering
on them.

This commit also simplifies the theme's SCSS by replacing the hard-coded
SVG images used in the "Supported versions" page by unicode circles with
a custom styling.

X-original-commit: 556cd6b
Part-of: odoo/documentation#2461
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
2022-07-13 14:27:32 +02:00
Antoine Vandevenne (anv)
7cbbb77746 [FIX] odoo_theme: only open images that have no target in modal
Since clicking on the image redirects the user to the target URL, it's
useless to open the image in a modal. Also, it partially broke the
layout of the /legal.html page due to the modal div being inserted into
table cells.

This commit also introduces the possibility to add the `o-no-modal`
class on images that should not open in a modal.

task-2909167

X-original-commit: 54d676c
Part-of: odoo/documentation#2461
2022-07-13 14:27:32 +02:00
Antoine Vandevenne (anv)
029ef0ae3b [FIX] odoo_theme: fix the display of modal images in mobile
task-2908330

closes odoo/documentation#2442

X-original-commit: 5e0f14f683
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-12 16:51:00 +02:00
Antoine Vandevenne (anv)
4e67b8986c [MOV] developer/misc: move all pages to a more logical location
Before this commit, the "Developer/Misc" directory of the doc, and
more particularly the "Developer/Misc/Other" sub-directory, was used as
a garbage dump where we moved all the pages that didn't fit elsewhere.
Due to that, interesting and important pages, such as the Coding
Guidelines, were buried in that directory never to be read again by Odoo
developers.

This commit moves most pages under "Misc" one or two levels up to be
located directly under "Developer" hence making them more accessible. A
new "Contributing/Development" directory is added to host the Coding
Guidelines page and soon many other pages.

task-2897143

closes odoo/documentation#2350

X-original-commit: ad374af15d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-04 10:38:45 +02:00
Antoine Vandevenne (anv)
7f95e9e2e0 [IMP] developer/views: apply the new API references style
The documentation of view attributes was lacking visual structure to
help the reader figure out which attribute relates to which parent
element. Since this documentation was relying on RST block quotes to
represent the hierarchy of view attributes, we can apply the same new
styling that was added with commit 934f45cf and designed for autodoc,
and which relies on the exact same HTML structure as block quotes.

task-2755298

closes odoo/documentation#2329

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-28 14:16:15 +02:00
Elisabeth Dickinson
538a5def8d [REF] odoo_theme: replace values with variables in SCSS files
X-original-commit: c82d95b17c
2022-06-27 15:28:25 +02:00
Elisabeth Dickinson
0163224b35 [REF] odoo_theme: move stray mixins into the _mixins.scss file
X-original-commit: 7fa153594d
2022-06-27 15:28:25 +02:00
Elisabeth Dickinson
92a62d60b1 [CLN] odoo_theme: remove unnecessary css
X-original-commit: fca78f44db
2022-06-27 15:28:24 +02:00
Elisabeth Dickinson
1e420852c2 [CLN] odoo_theme: remove old doc's unused variables
X-original-commit: 383e3d4206
2022-06-27 15:28:23 +02:00
Elisabeth Dickinson
959f512d17 [REF] odoo_theme: move scrollbar styling to .o_side_nav-inner
X-original-commit: b9ca38215d
2022-06-27 15:28:22 +02:00
Elisabeth Dickinson
8dee0e3665 [CLN] odoo_theme: remove old doc's utility mixins
These mixins were used in the old doc and were kept "just in case". The
`valid-radius` mixin already exists in the bootstrap library.

X-original-commit: 9a2e8eefef
2022-06-27 15:28:22 +02:00
Elisabeth Dickinson
ce0f306c1b [IMP] odoo_theme: replace "hide search matches" by a close button
X-original-commit: 994d273a59
2022-06-27 15:28:21 +02:00
Elisabeth Dickinson
d2c7b0732b [IMP] odoo_theme: improve spacing around code blocks on reference pages
X-original-commit: 794e42f78b
2022-06-27 15:28:20 +02:00
Elisabeth Dickinson
6f909baa0c [FIX] odoo_theme: fix scrollTo margin/padding with new headers height
The scroll padding needed increasing with the new sub-header.
Unnecessary calc() and parenthesis on the headers-height variable are
removed.

X-original-commit: 0b536debac
2022-06-27 15:28:20 +02:00
Elisabeth Dickinson
74d26fe16a [FIX] odoo_theme: remove the horizontal scroll bar
X-original-commit: 26bc1cd707
2022-06-27 15:28:19 +02:00
Elisabeth Dickinson
ec08821dc1 [IMP] odoo_theme: improve URL stylings
- Remove external-link icon on images.
- Remove underline from external-link icon on link hover.
- Add overflow-wrap on URLs on mobile.

X-original-commit: 91cb3ca026
2022-06-27 15:28:18 +02:00