Commit Graph

70 Commits

Author SHA1 Message Date
Antoine Vandevenne (anv)
54d676cac8 [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
2022-07-13 11:27:18 +02:00
Antoine Vandevenne (anv)
5e0f14f683 [FIX] odoo_theme: fix the display of modal images in mobile
task-2908330

closes odoo/documentation#2439

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-12 13:32:02 +02:00
Antoine Vandevenne (anv)
ad374af15d [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#2337

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-30 16:12:41 +02:00
Antoine Vandevenne (anv)
120ae78553 [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#2324

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-27 17:05:05 +02:00
Elisabeth Dickinson
c82d95b17c [REF] odoo_theme: replace values with variables in SCSS files 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
7fa153594d [REF] odoo_theme: move stray mixins into the _mixins.scss file 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
fca78f44db [CLN] odoo_theme: remove unnecessary css 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
383e3d4206 [CLN] odoo_theme: remove old doc's unused variables 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
b9ca38215d [REF] odoo_theme: move scrollbar styling to .o_side_nav-inner 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
9a2e8eefef [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.
2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
994d273a59 [IMP] odoo_theme: replace "hide search matches" by a close button 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
794e42f78b [IMP] odoo_theme: improve spacing around code blocks on reference pages 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
0b536debac [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.
2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
26bc1cd707 [FIX] odoo_theme: remove the horizontal scroll bar 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
91cb3ca026 [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.
2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
2e693b3c4a [IMP] odoo_theme: improve general spacings and paddings 2022-06-27 14:24:54 +02:00
Elisabeth Dickinson
7239986484 [IMP] odoo_theme: improve special terms styling
Including the `:command:`, `:file:` and `:dfn:` roles, and code-styled
text in alerts.

task-2790284
2022-06-27 14:24:54 +02:00
Antoine Vandevenne (anv)
2a867b4f60 [IMP] odoo_theme: open images in a modal
task-2358082

closes odoo/documentation#1687

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
2022-06-23 10:44:43 +02:00
Antoine Vandevenne (anv)
9e84b6f681 [FIX] odoo_theme: correctly test for fallback URLs when using switchers
closes odoo/documentation#2266

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-22 17:21:53 +02:00
Antoine Vandevenne (anv)
80c7b27827 [IMP] redirects: split redirects.txt into multiple, per-version, files
The `redirects.txt` file used to specify redirect rules for renamed or
moved documentation pages is starting to grow too big to be easily
maintainable. The main reason is that the number of redirect rules that
were thought to be required has been largely underestimated when
implementing the 'redirects' extension. At first, we believed that no
guidelines or structure were necessary because only a small amount of
redirect rules would be specified. This proved wrong and the file is now
becoming a mess, making it increasingly difficult to figure out where,
why, when, and if a redirect rule is specified in the file.

As the file is versioned, another issue emerges: conflicts occur every
time a commit is forward-ported to a later version if that commit adds a
redirect rule at the end of the file or at a line that was changed in
the later version. As redirect rules are frequently added, and since
blocks of redirect rules for new versions are added at the end of the
file, this tends to happen a lot.

This commit attempts to hit two birds with one stone by splitting the
`redirects.txt` file into multiple files, one per version. While doing
so, the existing redirect rules are ordered alphabetically and moved
into contextual blocks. Instructions and guidelines on how to create
redirect rules are also listed in the `redirects/MANUAL.md` file. By
sorting the redirect rules and adding them in different files, the
number of conflicts should decrease by a lot.

task-2891912

closes odoo/documentation#2265

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-22 16:31:52 +02:00
Elisabeth Dickinson
a689ea236d [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#2215

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-15 11:16:41 +02:00
Antoine Vandevenne (anv)
98e98f65c9 [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 '/'.
2022-06-15 09:56:46 +02:00
Elisabeth Dickinson
3fd32fe92a [FIX] odoo_theme: fix searchbox's highlight-link
task-2800937
2022-06-15 09:56:16 +02:00
Elisabeth Dickinson
4ed8c2238a [IMP] odoo_theme: revamp side menu to add overlay
task-2800937
2022-06-15 09:56:07 +02:00
Elisabeth Dickinson
9c53901db9 [FIX] odoo_theme: fix menu scrolling
task-2800937
2022-06-15 09:55:55 +02:00
Elisabeth Dickinson
7284b11a36 [IMP] odoo_theme: add side menu collapse icon
task-2800937
2022-06-15 09:55:44 +02:00
Elisabeth Dickinson
dee96ad2da [IMP] odoo_theme: change collapsing menu orientation
task-2800937
2022-06-15 09:55:25 +02:00
Elisabeth Dickinson
411e1cb1d3 [IMP] odoo_theme: add subheader and adapt switchers and searchbar
task-2800937
2022-06-15 09:55:05 +02:00
Elisabeth Dickinson
343decf192 [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#2167

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-14 11:42:13 +02:00
Elisabeth Dickinson
c0040fa532 [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#2179

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-06-13 14:53:08 +02:00
Martin Trigaux
241fd5e76f [FIX] odoo_theme: correctly consider baseurl
urlBase was only containing the domain name, not the /documentation/

closes odoo/documentation#2054

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-20 11:47:20 +02:00
Martin Trigaux
25e863a64c [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#1588

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-19 16:54:50 +02:00
Jeremy Kersten
4c526eb02f [IMP] odoo_theme: allow to add plausible script
export PLAUSIBLE_SCRIPT=https://plausible.io/js/script.js
export PLAUSIBLE_DOMAIN=yourdomain.com

closes odoo/documentation#1946

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-05-09 09:49:41 +02:00
Antoine Vandevenne (anv)
ff79ca3a6b [IMP] odoo_theme: hide the "Edit on GitHub" button for pages in legal/
closes odoo/documentation#1810

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-04-08 10:38:58 +02:00
Donatienne Pirlot
6a316ca86e [FIX] upgrade: small fixes
task-2684744

closes odoo/documentation#1752

Signed-off-by: Castillo Jonathan (jcs) <jcs@odoo.com>
2022-03-29 10:11:55 +02:00
Antoine Vandevenne (anv)
cb7a41b75b [FIX] odoo_theme: fix CSS issues and warnings
closes odoo/documentation#1711

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-18 13:24:20 +01:00
Antoine Vandevenne (anv)
fa17384396 [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

Part-of: odoo/documentation#1667
2022-03-10 17:09:18 +00:00
Elisabeth Dickinson
ac28acee4a [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#1668

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-08 16:03:44 +00:00
Elisabeth Dickinson
b76a566522 [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.

Part-of: odoo/documentation#1668
2022-03-08 16:03:44 +00:00
Carlos Valverde
7250f88b8d [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#1641

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-03-08 09:46:49 +00:00
Antoine Vandevenne (anv)
286b01a241 [IMP] extensions: add content tabs (backport of cf6ca0fb)
closes odoo/documentation#1624

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-23 10:58:12 +00:00
Elisabeth Dickinson
c30f2735b8 [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#1589

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-15 08:29:51 +00:00
Antoine Vandevenne (anv)
fb469b8211 [IMP] conf: show all relevant versions in the version switcher
From now on, the master branch and the latest released SaaS branch are
always shown. SaaS branches are labeled "Odoo Online".

The list of the versions shown in the switcher is hard-coded to force
their ordering.

The class `dropdown-toggle` is always added to the version|language
switcher regardless of whether other versions|languages are available,
as a quick fix to a CSS issue that occurs when the class is missing.

closes odoo/documentation#1565

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-11 13:16:40 +00:00
wan
acda12669d [ADD] extensions: add a custom example admonition
closes odoo/documentation#1498

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-28 09:21:43 +00:00
Fabien Pinckaers
16418c020b [IMP] *: introduce tables of contents in top-level app pages 2021-07-07 14:56:38 +02:00
Martin Trigaux
c38dbf59ce [MERGE] Forward port of 12.0 into 13.0 2021-06-14 16:04:49 +02:00
Martin Trigaux
207bfd6684 [IMP] extension: mark HTML content as translatable 2021-06-14 15:01:01 +02:00
Antoine Vandevenne (anv)
251438d569 [MERGE] Forward-port of branch 12.0 to 13.0 2021-06-09 12:10:06 +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
Antoine Vandevenne (anv)
a8cfd6c6c5 [MERGE] Forward-port of branch 12.0 to 13.0 2021-06-07 09:09:43 +02:00