[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#2197
X-original-commit: c0040fa532
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
committed by
Antoine Vandevenne (anv)
parent
7ecdf31e66
commit
279d264970
@@ -227,6 +227,23 @@ header.o_main_header {
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
.o_main_toc {
|
||||
> ul {
|
||||
li {
|
||||
&.o_active_toc_entry {
|
||||
&:not(.toctree-l1) > .o_toc_entry_wrapper i[class^="i-"]:not(.collapsed), > a , > .o_toc_entry_wrapper a, > .o_toc_entry_wrapper i {
|
||||
color: $o-violet-dark;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
&.current {
|
||||
color: $o-violet-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
.o_deepest_active_toc_entry {
|
||||
@@ -235,20 +252,6 @@ header.o_main_header {
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
li {
|
||||
&.o_active_toc_entry {
|
||||
&:not(.toctree-l1) > .o_toc_entry_wrapper i[class^="i-"]:not(.collapsed), > a , > .o_toc_entry_wrapper a, > .o_toc_entry_wrapper i {
|
||||
color: $o-violet-dark;
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
&.current {
|
||||
color: $o-violet-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> .toctree-l1 {
|
||||
&[class*="o_menu_"] > .o_toc_entry_wrapper > i:before {
|
||||
@include o-inline-icon($i-doc-apps, 0 5px 0 0);
|
||||
@@ -292,7 +295,7 @@ header.o_main_header {
|
||||
}
|
||||
}
|
||||
|
||||
.o_side_nav, .o_page_toc_nav {
|
||||
.o_main_toc, .o_page_toc_nav {
|
||||
ul { // all uls in toc
|
||||
list-style: none;
|
||||
padding-left: $padding-s;
|
||||
@@ -350,19 +353,28 @@ header.o_main_header {
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
aside.o_page_toc {
|
||||
display: none;
|
||||
color: $body-color;
|
||||
@include font-size($font-size-secondary);
|
||||
@include media-breakpoint-up(xl) {
|
||||
display: block;
|
||||
&:not(.o_in_nav_toc) {
|
||||
display: none;
|
||||
@include media-breakpoint-up(xl) {
|
||||
display: block;
|
||||
top: $o-header-height;
|
||||
right: 0;
|
||||
padding: $padding-l $padding-s $padding-l 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: $o-header-height;
|
||||
right: 0;
|
||||
width: $o-on-page-width;
|
||||
height: 100%;
|
||||
max-height: calc(100vh - #{$o-header-height});
|
||||
padding: $padding-l $padding-s $padding-l 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
&.o_in_nav_toc {
|
||||
display: block;
|
||||
@include media-breakpoint-up(xl) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
@@ -1071,7 +1083,7 @@ header.o_main_header {
|
||||
> div[class^="highlight-"]{
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
> *:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user