Commit Graph

139 Commits

Author SHA1 Message Date
Antoine Vandevenne (anv)
740812e420 [IMP] odoo_theme: tweak the HTML structure of TOC entries
task-3046383

X-original-commit: 877d1de3c2
Part-of: odoo/documentation#4108
2023-04-12 09:59:06 +02:00
Antoine Vandevenne (anv)
a088802245 [IMP] extensions/custom_admonitions: tweak the HTML structure of dfn
The structure of the `dfn` role is changed from its default
`<em class="dfn">text</em>` to
`<span class="dfn"><span>text</span></span>` to ease the styling.

task-3046383

X-original-commit: 281a893540
Part-of: odoo/documentation#4108
2023-04-12 09:59:06 +02:00
Olivier Dony
14e33886f4
[FIX] legal: fix some broken links (pdfs, translations)
1) PDF files are generated and stored at the root of the CURRENT_BRANCH
directory. The links to those files are generated at different levels of
the doctree, which makes it impossible to use a relative path.
For example the same "Enterprise Agreement" doc in EN is published on:
 - /16.0/legal/terms/enterprise.html
 - /16.0/fr/legal/terms/enterprise.html

As a workaround, use absolute links for the PDFs. They won't work
locally for now. Can be improved later, as long as we don't break
those links located in various depths of the troctree.

2) The legal constracts aren't translated in all availables languages
(yet), so those links are 404s now. Introduced a conf.py variable
`legal_translations` with the list of languages where translated
contracts are indeed available, and falling back to the EN version
otherwise. Some languages don't have *all* the contracts translated, so
some 404 may remain temporarily.

Forward-port of f69dba70be
2023-03-23 16:41:22 +01:00
Antoine Vandevenne (anv)
72e636da5f [ADD] extensions/cards: add an extension to implement cards
The extension adds two new directive:
- `cards` is the row container for one or more `card` directives.
- `card` is the implementation of a Bootstrap card that accepts a
  `target` argument for the href of the card, a `large` option to render
  the card on two columns, a `tag` option to display a single arbitrary
  tag on the card, and arbitrary content that is shown in the card
  body.

task-3141419

closes odoo/documentation#3672

X-original-commit: 48571c05a4
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-27 16:01:07 +01:00
Antoine Vandevenne (anv)
c140f7de4e [MOV] howto/rdtraining: move "Getting started" to the tutorials dir
This commit also replaces references to the "Building a module"
tutorial by references to the "Getting started" tutorial.

task-2991663

Part-of: odoo/documentation#3644
2023-02-22 14:31:24 +01:00
Mathieu (mano)
64fc72b6ca [IMP] toctrees: redesign and new card component
The goal of this commit is to propose a first step towards a new
`.. card::` directive for the toctrees. This is a first design
proposition for this new card component in raw html for the fallback
page `howtos.rst`

The long term objective is to redesign the toctrees by implementing card
components, clearer toctree list design and custom html pages.

Related to task-3059229

closes odoo/documentation#3404

X-original-commit: c59663f252
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-26 19:08:44 +01:00
Elisabeth Dickinson
f88f7eb97f [IMP] odoo_theme: Fix alerts and accordions colors
closes odoo/documentation#3317

X-original-commit: 8aebb79237
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-12 08:15:54 +01:00
Elisabeth Dickinson
a01d90a1e2 [IMP] odoo_theme: Fix text-dark on homepage
While doing the changes on the text-dark issue, we noticed the
homepage's text color isn't aligned with the rest of the website.
`.text-muted` was too light, so we changed it to `.text-dark`.

X-original-commit: ee2390fdaf
Part-of: odoo/documentation#3317
2023-01-12 08:15:54 +01:00
Elisabeth Dickinson
1e73db0aa1 [IMP] odoo-theme: Revert $dark color variable to initial $gray-900
This was changed to get a good text/background contrast on the
alert-dark (Exercise).
By doing so, the .text-dark class generated by BS from the $dark
theme-color was gray instead of the intended near-black color.

By changing the variable, the contrast issue with the alert was back,
to solve this we directly override the alert's background color instead.

X-original-commit: 32c9e59ae6
Part-of: odoo/documentation#3317
2023-01-12 08:15:53 +01:00
Antoine Vandevenne (anv)
c1ea2dfff1 [FIX] odoo_theme: re-enable redirect fallback logic
closes odoo/documentation#3294

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-05 10:52:33 +01:00
Elisabeth Dickinson
d1f2e20190 [IMP][CSS] Replace text-decoration on link with BS override 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
8eee40ed98 [IMP][CSS] Reorder styles according to styles guidelines 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
cefc0ecd46 [IMP] fix typo 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
37467f7440 [IMP] icon fixes 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
10dc23cda0 [IMP][CSS] Fix unresponsive font-size on alert text
By removing $font-size-sm on the alerts, the text is bigger. The title
text and its icon have been increased as well.
2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
57912a18f2 [IMP][CSS] Remove browser prefixes and unnecessary mixins 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
713b134327 [IMP][CSS] Fix literals in alerts containing tabs 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
2196189453 [IMP][CSS] Fix data indentation 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
d475404e05 [IMP][CSS] Fix alignment on modal btn-close 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
7cc86314c6 [IMP] Indentation fix 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
3c7ab6b46e [REM] Removal of changelog
The idea was not developed and it has since been decided not to do it.
2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
5534245b21 [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 18:30:40 +01:00
Elisabeth Dickinson
b9727457ce [IMP][CSS] Fix color variable issue 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
585e3bfb8e [IMP][CSS] Revamp of the .o_spoiler element to use same code as alerts 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
8020cbf564 [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 18:30:40 +01:00
Elisabeth Dickinson
750c43d0cf [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 18:30:40 +01:00
Elisabeth Dickinson
ff5ac57e1d [IMP][CSS] Place overrides in bootstrap_overridden file 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
d856ff21e8 [IMP][CSS] Clean up the file according to conventions
Includes reordering styles, renaming variables ($o-*),
re-indenting lines, removing commented code
2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
2223c6c885 [IMP][CSS] Set gray background to it's original darker color 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
103bf34cc1 [IMP][CSS] Improve literals styling (o_code, .sig-*) 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
944de07592 [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 18:30:40 +01:00
Elisabeth Dickinson
56f681d1ba [IMP][CSS] Remove repetitive or unnused CSS 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
c634afd40e [IMP][CSS] Improve margins on headings and sections 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
2bedf3711b [IMP][CSS] Replace margin and padding values with variables 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
950b714c92 [IMP][CSS] Revamp modal to use all BS classes and variables 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
e94a132e1a [IMP][CSS] Rescale heading fonts 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
f35e8482f8 [IMP][CSS] Cleanup font variables 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
5b6705fecc [IMP][CSS] Cleanup admonitions (alerts) 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
0f911e984b [IMP][CSS] Cleanup color variables 2023-01-03 18:30:40 +01:00
Elisabeth Dickinson
c51edecd28 [IMP][CSS] update literals styles (.o_code, .sig-*) 2023-01-03 18:30:40 +01:00
Antoine Vandevenne (anv)
fe894ad110 [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 18:30:36 +01:00
Antoine Vandevenne (anv)
e3972349f4 [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#3252

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-02 18:47:57 +01:00
Antoine Vandevenne (anv)
dca158c867 [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#3252
2023-01-02 18:47:57 +01:00
Antoine Vandevenne (anv)
c8f8164943 [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#3235

X-original-commit: f068065d39
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-27 13:04:22 +01:00
Antoine Vandevenne (anv)
a179595415 [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

X-original-commit: 5526f1ea07
Part-of: odoo/documentation#3235
2022-12-27 13:04:22 +01:00
Morgane (morm)
4259241ffd [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#3122

X-original-commit: b7bc34a197
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-07 15:21:24 +01:00
Morgane (morm)
6ba5660133 [FIX] documentation: tabs responsiveness
Prior of this commit, the tabs were not responsive in the documentation

closes odoo/documentation#3076

X-original-commit: c9a001d22b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-06 12:33:56 +01:00
Victor Feyens
c24d780387 [FIX] *: remove trailing whitespaces
Part-of: odoo/documentation#2980
2022-11-18 17:32:59 +01:00
Victor Feyens
cf2b1b934d [FIX] *: enforce 1 newline on files end
Part-of: odoo/documentation#2980
2022-11-18 17:32:58 +01:00
Victor Feyens
5128208495 [CLN] core: upgrade to python 3.6
& sort imports

closes odoo/documentation#2957

X-original-commit: 8a5aa384d3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-15 20:19:10 +01:00