Commit Graph

106 Commits

Author SHA1 Message Date
Morgane (morm)
898fdf15ae [FIX] documentation: tabs responsiveness
Prior of this commit, the tabs were not responsive in the documentation

closes odoo/documentation#3080

X-original-commit: c9a001d22b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-12-06 14:37:03 +01:00
Victor Feyens
968ed0a17a [FIX] *: enforce 1 newline on files end
Part-of: odoo/documentation#2983
2022-11-18 20:30:00 +01:00
Antoine Vandevenne (anv)
cdb4b9398c [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#2876

X-original-commit: 4d7a88639a
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 15:51:21 +02:00
stefanorigano (SRI)
9b695ca9c3 [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

X-original-commit: 1691e8970b
Part-of: odoo/documentation#2876
2022-10-28 15:51:20 +02:00
Antoine Vandevenne (anv)
61e94177f6 [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: f648960c78
Part-of: odoo/documentation#2467
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
2022-07-13 19:56:04 +02:00
Antoine Vandevenne (anv)
9b54acbee1 [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: 7cbbb77746
Part-of: odoo/documentation#2467
2022-07-13 19:56:03 +02:00
Antoine Vandevenne (anv)
49387a9557 [FIX] odoo_theme: fix the display of modal images in mobile
task-2908330

closes odoo/documentation#2452

X-original-commit: 5e0f14f683
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-12 18:31:45 +02:00
Antoine Vandevenne (anv)
c24673d532 [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#2342

X-original-commit: e2a3ca0631
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-29 11:11:49 +02:00
Elisabeth Dickinson
19f90800c3 [REF] odoo_theme: replace values with variables in SCSS files
X-original-commit: c82d95b17c
2022-06-27 16:04:59 +02:00
Elisabeth Dickinson
5c344d726f [REF] odoo_theme: move stray mixins into the _mixins.scss file
X-original-commit: 7fa153594d
2022-06-27 16:04:58 +02:00
Elisabeth Dickinson
3be8b18bee [CLN] odoo_theme: remove unnecessary css
X-original-commit: fca78f44db
2022-06-27 16:04:58 +02:00
Elisabeth Dickinson
52ee4a7a9c [CLN] odoo_theme: remove old doc's unused variables
X-original-commit: 383e3d4206
2022-06-27 16:04:57 +02:00
Elisabeth Dickinson
974bc9624a [REF] odoo_theme: move scrollbar styling to .o_side_nav-inner
X-original-commit: b9ca38215d
2022-06-27 16:04:56 +02:00
Elisabeth Dickinson
7c37474507 [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 16:04:55 +02:00
Elisabeth Dickinson
b103c3fbbd [IMP] odoo_theme: replace "hide search matches" by a close button
X-original-commit: 994d273a59
2022-06-27 16:04:54 +02:00
Elisabeth Dickinson
cc61e7ff93 [IMP] odoo_theme: improve spacing around code blocks on reference pages
X-original-commit: 794e42f78b
2022-06-27 16:04:53 +02:00
Elisabeth Dickinson
aee958b1ff [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 16:04:52 +02:00
Elisabeth Dickinson
c366745863 [FIX] odoo_theme: remove the horizontal scroll bar
X-original-commit: 26bc1cd707
2022-06-27 16:04:51 +02:00
Elisabeth Dickinson
568b75790b [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 16:04:50 +02:00
Elisabeth Dickinson
cfa9494c33 [IMP] odoo_theme: improve general spacings and paddings
X-original-commit: 2e693b3c4a
2022-06-27 16:04:49 +02:00
Elisabeth Dickinson
fe0211c1ed [IMP] odoo_theme: improve special terms styling
Including the `:command:`, `:file:` and `:dfn:` roles, and code-styled
text in alerts.

task-2790284

X-original-commit: 7239986484
2022-06-27 16:04:48 +02:00
Antoine Vandevenne (anv)
bc91b1d06c [IMP] odoo_theme: open images in a modal
task-2358082

closes odoo/documentation#2284

X-original-commit: 2a867b4f60
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
2022-06-23 20:37:42 +02:00
Antoine Vandevenne (anv)
b3f26c2914 [FIX] odoo_theme: correctly test for fallback URLs when using switchers
closes odoo/documentation#2275

X-original-commit: 9e84b6f681
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-23 10:15:03 +02:00
Elisabeth Dickinson
f47fda5471 [FIX] odoo_theme: fix highlight blocks in field-list items
On pages such as /developer/reference/backend/orm.html#fields, the
highlight blocks inside `dl.field-list` items were pushing the width of
the page to go outside the screen on mobile. This is fixed by changing
the `.field-list`'s `display: grid` into `block` on mobile.

closes odoo/documentation#2230

X-original-commit: a689ea236d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-15 17:19:01 +02:00
Antoine Vandevenne (anv)
c952b418f2 [FIX] odoo_theme: stop testing for valid URLs if in localhost
The mechanism that makes the version and language switchers test for
valid URLs crashed when testing in localhost. The mechanism is now
skipped if the URL starts with a '/'.

X-original-commit: 98e98f65c9
2022-06-15 11:49:32 +02:00
Elisabeth Dickinson
311752091d [FIX] odoo_theme: fix searchbox's highlight-link
task-2800937

X-original-commit: 3fd32fe92a
2022-06-15 11:49:31 +02:00
Elisabeth Dickinson
522f684b9a [IMP] odoo_theme: revamp side menu to add overlay
task-2800937

X-original-commit: 4ed8c2238a
2022-06-15 11:49:30 +02:00
Elisabeth Dickinson
7fe67ec854 [FIX] odoo_theme: fix menu scrolling
task-2800937

X-original-commit: 9c53901db9
2022-06-15 11:49:29 +02:00
Elisabeth Dickinson
b49110f30e [IMP] odoo_theme: add side menu collapse icon
task-2800937

X-original-commit: 7284b11a36
2022-06-15 11:49:28 +02:00
Elisabeth Dickinson
1b8d66916a [IMP] odoo_theme: change collapsing menu orientation
task-2800937

X-original-commit: dee96ad2da
2022-06-15 11:49:27 +02:00
Elisabeth Dickinson
e0a4defc84 [IMP] odoo_theme: add subheader and adapt switchers and searchbar
task-2800937

X-original-commit: 411e1cb1d3
2022-06-15 11:49:26 +02:00
Elisabeth Dickinson
98c6f414c0 [IMP] design: add an icon behind external links
The external links' target attribute is now also updated to open the
link in a new tab. In addition, the "[source]" link of autodoc's models
is moved right next to the name of the model to correctly position the
icon.

task-2790244

closes odoo/documentation#2213

X-original-commit: 343decf192
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-14 14:53:44 +02:00
Elisabeth Dickinson
24cef029dc [IMP] odoo_theme: show the "On this page" section in mobile
When the page gets too small for the "On this page" section (local tree
of content) to fit on the page, the section is now moved above the menu
(global tree of content) rather than being hidden.

task-2800970

closes odoo/documentation#2201

X-original-commit: c0040fa532
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-14 07:41:06 +02:00
Martin Trigaux
3901e3b241 [FIX] odoo_theme: correctly consider baseurl
urlBase was only containing the domain name, not the /documentation/

closes odoo/documentation#2062

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-20 12:11:29 +02:00
Martin Trigaux
a81e0623b0 [IMP] odoo_theme: introduce fallback URLs for the page switchers
When a user clicks on the link of an alternate page in the version or
language switcher, we now check if the page referenced by the target URL
exists or not. If not, we generate a series of fallback URLs from the
target URL and check whether the targeted resource exists or not, until
we read the root of the documentation. As soon as we find a valid URL,
we redirect the user to it.

This is inspired by the behaviour of docs.python.org's version and
language switchers.

task-2534669

closes odoo/documentation#2052

X-original-commit: 25e863a64c
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-19 23:16:49 +02:00
wan
28fe18157e [ADD] extension: allow to build graphs using graphviz
X-original-commit: e00b5e35c7
Part-of: odoo/documentation#1969
2022-05-09 14:03:24 +02:00
Antoine Vandevenne (anv)
17b5636645 [FIX] odoo_theme: fix CSS issues and warnings
closes odoo/documentation#1717

X-original-commit: cb7a41b75b
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-18 16:07:38 +01:00
Antoine Vandevenne (anv)
990ca4f7ca [REM] extensions: remove the 'switcher' extension
The 'sphinx-tabs' extension is better in every aspect:
- Synchronize selected tabs (group tabs feature).
- No need for extra `code-block` directive (code tabs feature).
- Better looking.
- No custom Python, JS, or CSS.

task-2787415

X-original-commit: 269173caac
Part-of: odoo/documentation#1692
2022-03-11 14:44:46 +00:00
Elisabeth Dickinson
66d3bf35d0 [IMP] scss: content tabs refining
This commit removes unnecessary negative margins and makes code-blocks
inside content tabs lose their bottom margin and border.

closes odoo/documentation#1673

X-original-commit: ac28acee4a
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-08 16:31:09 +00:00
Elisabeth Dickinson
f0707ad049 [IMP] scss: make alert full width of parent
Before this commit, the alerts would all have different widths according
to their content, some stretching and getting pushed under the
"on this page" menu. This way all alerts are aligned.

X-original-commit: b76a566522
Part-of: odoo/documentation#1673
2022-03-08 16:31:09 +00:00
Carlos Valverde
9c56734a3a [IMP] documentation: content tabs design
This commit improves current css style added by default to the Odoo
Documentation's content tabs.

This design improvement has been made by following the current theme's
style, especially in terms of palette and borders.

Tabs are responsive and have been optimised in order to have a
cross-browser compatibility.

--
Task-2755240

closes odoo/documentation#1666

X-original-commit: 7250f88b8d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-08 10:16:45 +00:00
Elisabeth Dickinson
1c2ea73923 [IMP] odoo_theme: switch admonitions' display type to inline-block
When placing an image before an admonition block and setting its
alignment to left or right, the admonition block would hide the image.
The reason for this is the use of "float" on the image. In order for
the image to reappear, we change the admonition's `display: block` to
`display: inline-block`.

task-2582954

closes odoo/documentation#1595

X-original-commit: c30f2735b8
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-15 08:50:29 +00:00
wan
0222285869 [ADD] extensions: add a custom example admonition
closes odoo/documentation#1506

X-original-commit: 434bb66492
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-28 11:20:03 +00:00
Fabien Pinckaers
16418c020b [IMP] *: introduce tables of contents in top-level app pages 2021-07-07 14:56:38 +02:00
Elisabeth Dickinson
c8750ae032
[FIX] odoo_theme: fix header display on small screen widths
The highlight-link was pushing the header height to be on two lines.
It is now absolutely positioned below the searchbar instead of to its right.
The switchers now push themselves to the right instead of being pushed by the searchbar-wrapper.
2021-06-09 11:22:58 +02:00
Elisabeth Dickinson
49baf6b4d7
[IMP] odoo_theme: fix layout on esoteric screens 2021-06-04 17:27:11 +02:00
Antoine Vandevenne (anv)
2591ddc6d2 [FIX] odoo_theme: fix crash on menu loading introduced with 675f7bc8 2021-06-04 16:24:58 +02:00
Antoine Vandevenne (anv)
675f7bc899 [FIX] odoo_theme: highlight all occurrences of a same entry in the menu
When a page is referenced multiple times in the global toctree, only its
latest TOC entry was highlighted (and expanded if it's a TOC page).
This commit allows a page to be referenced multiple times at any level
of the global TOC while correctly highlighting all of its TOC entries.

task-2551473
2021-06-04 11:44:03 +02:00
Elisabeth Dickinson
7efbf490f6 [FIX] odoo_theme: padding fix in sidenav 2021-05-31 16:04:41 +02:00
Victor Feyens
bfec9a58f9 [FIX] code: typos 2021-05-31 14:44:18 +02:00
Elisabeth Dickinson
fa267e5cfc [FIX] odoo_theme: design fixes
- change button color (in line with odoo.com)
- adapt margin above h2
- change gray variable on footer (to use the same as everywhere else)
- fix grey background in nav
- fix opacity on icon when active in nav
- add icons on mobile homepage
- fix missing homepage separator in mobile
- fix nav top padding on mobile (hidden by searchbar)
- adjust nav's active links styles
- adjust margin on version switcher
- hide toctree-wrapper when show-content is in meta
- fix highlighted-link on tablet screen
- style toctree-wrapper (a lil bit)
- hide local toc while page is loading
- SCSS linting
2021-05-28 17:06:58 +02:00
Elisabeth Dickinson
74e7da5694 [FIX] odoo_theme: hide searchbar on scroll in mobile 2021-05-26 17:38:29 +02:00
Elisabeth Dickinson
88f00fe611
[FIX] odoo_theme: remove images from homepage
task-2534617
2021-05-26 11:40:14 +02:00
Elisabeth Dickinson
26d489c6e1
[FIX] theme: improve search bar implementation and behavior
This commit removes the extra search bar that was dedicated to the
mobile layout and adapts the desktop's one to be compatible with mobile.
It also brings back the "Hide Search Matches" button.
2021-05-12 09:49:55 +02:00
Elisabeth Dickinson
9204658456
[FIX] theme: always hide in-page toctrees
Toctree pages will soon hold content and thus be reachable.
The TOC should never be displayed on those pages.
2021-05-11 10:28:13 +02:00
Antoine Vandevenne (anv)
e3fee2cf46 [REF][MOV] documentation apocalypse
Prior to this commit, the Odoo documentation was mainly split between
two repositories: odoo/odoo/doc and odoo/documentation-user. Some bits
of documentation were also hosted elsewhere (e.g., wiki, upgrade, ...).
This was causing several problems among which:
  - The theme, config, Makefile, and similar technical resources had to
    be duplicated. This resulted in inconsistent layout, features, and
    build environments from one documentation to another.
  - Some pages did not fit either documentation as they were relevant
    for both users and developers. Some were relevant to neither of the
    two (e.g., DB management).
  - Cross-doc references had to be absolute links and they broke often.
  - Merging large image files in the developer documentation would bloat
    the odoo/odoo repository. Some contributions had to be lightened to
    avoid merging too many images (e.g., Odoo development tutorials).
  - Long-time contributors to the user documentation were chilly about
    going through the merging process of the developer documentation
    because of the runbot, mergebot, `odoo-dev` repository, etc.
  - Some contributors would look for the developer documentation in the
    `odoo/documentation-user` repository.
  - Community issues about the user documentation were submitted on the
    `odoo/odoo` repository and vice-versa.

Merging all documentations in one repository will allow us to have one
place, one theme, one work process, and one set of tools (build
environment, ...) for all of the Odoo docs.

As this is a good opportunity to revamp the layout of the documentation,
a brand new theme replaces the old one. It features a new way to
navigate the documentation, centered on the idea of always letting the
reader know what is the context (enclosing section, child pages, page
structure ...) of the page they are reading. The previous theme would
quickly confuse readers as they navigated the documentation and followed
cross-application links.

The chance is also taken to get rid of all the technical dangling parts,
performance issues, and left-overs. Except for some page-specific JS
scripts, the Odoo theme Sphinx extension is re-written from scratch
based on the latest Sphinx release to benefit from the improvements and
ease future contributions.

task-2351938
task-2352371
task-2205684
task-2352544

Closes #945
2021-05-04 15:44:00 +02:00