[IMP] *: introduce tables of contents in top-level app pages

This commit is contained in:
Fabien Pinckaers
2021-06-30 11:21:32 +02:00
committed by Antoine Vandevenne (anv)
parent b4ef20a970
commit 16418c020b
231 changed files with 1839 additions and 1978 deletions
+1 -1
View File
@@ -79,7 +79,7 @@
{%- set main_classes = main_classes + ['o_index'] %}
{%- endif %}
{%- if 'show-content' in meta %} {# The page is an accessible toctree #}
{%- if ('show-content' in meta) and ('show-toc' not in meta) %} {# The page is an accessible toctree #}
{%- set main_classes = main_classes + ['o_hide_toc'] %}
{%- endif %}
@@ -1,65 +1,59 @@
<div id="o_content">
<section class="o_content_fw_banner row">
<div class="col-lg-6">
<h1 class="text-white">{{ _("Odoo Documentation") }}</h1>
<p class="text-white">{{ _("The comprehensive guide for Odoo users. Easily find the tutorial and helpful tips that suit your needs.") }}</p>
<div class="mt-3">
<a href="https://odoo.com/trial" class="btn btn-primary mb-2">{{ _("Try Odoo for FREE") }}</a>
</div>
</div>
<section class="o_content_fw_banner">
<h1 class="text-white">{{ _("Odoo Documentation") }}</h1>
</section>
<section>
<div class="row gx-lg-5">
<div class="col-lg-6">
<h2><i class="i-doc-apps d-lg-none me-2"></i>{{ _("Applications") }}</h2>
<p class="text-muted">{{ _("Master any app thanks to their end-user guides. Our wide array of functional workflows and processes are designed to help you unleash Odoo's potential.") }}</p>
<h5 class="text-muted pt-3 text-uppercase fw_semibold">{{ _("Top Links") }}</h5>
<h2><a href="{{ pathto('applications') }}">{{ _("User Docs") }}</a></h2>
<p class="text-muted">{{ _("Discover our guide to help you use and configure the platform, by applications.") }}</p>
<h5 class="text-muted pt-3 text-uppercase fw_semibold">{{ _("Top Apps") }}</h5>
<ul class="list-unstyled">
<li>
<a href="{{ pathto('applications/finance/accounting/overview/main_concepts/in_odoo') }}" class="stretched-link">
{{ _("The Accounting behind Odoo") }}
<a href="{{ pathto('applications/finance/accounting') }}" class="stretched-link">
{{ _("Accounting") }}
</a>
</li>
<li>
<a href="{{ pathto('applications/inventory_and_mrp/inventory/overview/process/initial_stock') }}" class="stretched-link">
{{ _("Set your Initial Stock") }}
<a href="{{ pathto('applications/inventory_and_mrp/inventory') }}" class="stretched-link">
{{ _("Inventory") }}
</a>
</li>
<li>
<a href="{{ pathto('applications/general/base_import/import_faq') }}" class="stretched-link">
{{ _("Import data into Odoo") }}
<a href="{{ pathto('applications/inventory_and_mrp/manufacturing') }}" class="stretched-link">
{{ _("Manufacturing") }}
</a>
</li>
<li>
<a href="{{ pathto('applications/productivity/discuss/overview/get_started') }}" class="stretched-link">
{{ _("Get Started with Discuss") }}
<a href="{{ pathto('applications/sales/point_of_sale') }}" class="stretched-link">
{{ _("Point of Sale") }}
</a>
</li>
</ul>
</div>
<div class="col-lg-6">
<h2 class="border-top pt-4 pt-lg-0"><i class="i-doc-admin d-lg-none me-2"></i>{{ _("Administration") }}</h2>
<p class="text-muted">{{ _("Easily setup your first Odoo installation. From downloads to day-to-day database administration, the dedicated tutorials have got you covered.") }}</p>
<h2 class="border-top pt-4 pt-lg-0"><a href="{{ pathto('administration') }}">{{ _("Install and Maintain") }}</a></h2>
<p class="text-muted">{{ _("Learn how to install, deploy and upgrade Odoo on premise or on Odoo.sh.") }}</p>
<h5 class="text-muted pt-3 text-uppercase fw_semibold">{{ _("Top Links") }}</h5>
<ul class="list-unstyled">
<li>
<a href=" {{ pathto('administration/install') }} " class="stretched-link">
<a href=" {{ pathto('administration/deployment/install') }} " class="stretched-link">
{{ _("Installing Odoo") }}
</a>
</li>
<li>
<a href="{{ pathto('administration/deployment/deploy') }}" class="stretched-link">
{{ _("Deploying Odoo") }}
{{ _("System configuration") }}
</a>
</li>
<li>
<a href="{{ pathto('administration/update') }}" class="stretched-link">
{{ _("Updating Odoo") }}
<a href="{{ pathto('administration/maintain/update') }}" class="stretched-link">
{{ _("Bugfix updates") }}
</a>
</li>
<li>
<a href="{{ pathto('administration/odoo_sh/overview/introduction') }}" class="stretched-link">
{{ _("Introduction to Odoo.sh") }}
{{ _("Odoo.sh: The Odoo Cloud Platform") }}
</a>
</li>
</ul>
@@ -67,58 +61,39 @@
</div>
<div class="row gx-lg-5">
<div class="col-lg-6">
<h2 class="border-top pt-4"><i class="i-doc-dev d-lg-none me-2"></i>{{ _("Developer") }}</h2>
<h2 class="border-top pt-4"><a href="{{ pathto('developer') }}">{{ _("Developer") }}</a></h2>
<p class="text-muted">{{ _("Learn to develop in Odoo by reading the framework references and programmer tutorials.") }}</p>
<h5 class="text-muted pt-3 text-uppercase fw_semibold">{{ _("Top Links") }}</h5>
<ul class="list-unstyled">
<li>
<a href="{{ pathto('developer/reference/orm') }}" class="stretched-link">
{{ _("ORM API") }}
</a>
</li>
<li>
<a href="{{ pathto('developer/howtos/backend') }}" class="stretched-link">
{{ _("Building a Module") }}
{{ _("Tutorial: Building a Module") }}
</a>
</li>
<li>
<a href="{{ pathto('developer/webservices/odoo') }}" class="stretched-link">
<a href="{{ pathto('developer/reference/addons/orm') }}" class="stretched-link">
{{ _("ORM") }}
</a>
</li>
<li>
<a href="{{ pathto('developer/reference/addons/views') }}" class="stretched-link">
{{ _("Regular Views") }}
</a>
</li>
<li>
<a href="{{ pathto('developer/reference/javascript/qweb') }}" class="stretched-link">
{{ _("QWeb Views") }}
</a>
</li>
<li>
<a href="{{ pathto('developer/misc/api/odoo') }}" class="stretched-link">
{{ _("External API") }}
</a>
</li>
<li>
<a href="{{ pathto('developer/reference/cmdline') }}" class="stretched-link">
{{ _("Command-line interface") }}
</a>
</li>
</ul>
</div>
<div class="col-lg-6">
<h2 class="border-top pt-4"><i class="i-doc-services d-lg-none me-2"></i>{{ _("Services") }}</h2>
<p class="text-muted">{{ _("Find out how to open a support ticket should you need to contact a Customer Service Representative.") }}</p>
<h5 class="text-muted pt-3 text-uppercase fw_semibold">{{ _("Top Links") }}</h5>
<ul class="list-unstyled">
<li>
<a href="{{ pathto('services/support/where_can_i_get_support') }}" class="stretched-link">
{{ _("Where to find help?") }}
</a>
</li>
<li>
<a href="{{ pathto('services/support/supported_versions') }}" class="stretched-link">
{{ _("Supported versions") }}
</a>
</li>
<li>
<a href="{{ pathto('legal') }}" class="stretched-link">
{{ _("Legal") }}
</a>
</li>
</ul>
</div>
</div>
<div class="row gx-lg-5">
<div class="col-lg-6">
<h2 class="border-top pt-4"><i class="i-doc-contribute d-lg-none me-2"></i>{{ _("Contributing") }}</h2>
<h2 class="border-top pt-4"><a href="{{ pathto('contributing') }}">{{ _("Contributing") }}</a></h2>
<p class="text-muted">{{ _("You want to contribute to Odoo but don't know where to start? The tutorials and guidelines are there to help you make Odoo even better.") }}</p>
<h5 class="text-muted pt-3 text-uppercase fw_semibold">{{ _("Top Links") }}</h5>
<ul class="list-unstyled">
@@ -139,4 +114,4 @@
{# If changelog exists import it here}
{% include "layout_templates/changelog.html" %}
{#}
</div>
</div>
+58 -36
View File
@@ -55,10 +55,9 @@ header.o_main_header {
padding: 0 $padding-m;
}
@include media-breakpoint-up(xl) {
padding: 0 $padding-l;
padding: 0 $padding-l 0 $padding-m;
}
.o_logo_wrapper {
> .o_logo {
img {
@@ -203,6 +202,7 @@ header.o_main_header {
z-index: 10;
@include font-size($font-size-secondary);
color: $o-violet-dark;
font-weight: $fw_regular;
@include media-breakpoint-up(lg) {
width: calc(#{$o-side-nav-width} - 1rem);
height: calc(100vh - #{$o-header-height});
@@ -212,8 +212,6 @@ header.o_main_header {
}
@include media-breakpoint-up(xl) {
width: $o-side-nav-width;
padding-top: $padding-l;
padding-left: $padding-l;
}
&.show {
@@ -223,6 +221,11 @@ header.o_main_header {
.toctree-l1 {
padding-top: $padding-xs;
padding-bottom: $padding-xs;
> .o_toc_entry_wrapper a {
color: $o-violet-dark;
font-weight: 600;
}
}
ul {
@@ -232,6 +235,20 @@ 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);
@@ -290,16 +307,8 @@ header.o_main_header {
a {
display: inline-block;
padding: .4rem 0;
color: inherit;
opacity: .75;
&.current, &:hover {
opacity: 1;
}
}
> .o_toc_entry_wrapper i {
opacity: .75;
color: $gray-darker;
font-weight: $fw_regular;
}
&:not(.toctree-l1) {
@@ -314,9 +323,6 @@ header.o_main_header {
margin-right: .125rem;
@include o-transition(rotate, .3s);
font-size: .75rem;
font-weight: $fw_bold;
color: inherit;
&[aria-expanded="true"] {
@include o-transform(rotate(90deg));
}
@@ -332,7 +338,6 @@ header.o_main_header {
}
> a , > .o_toc_entry_wrapper a, > .o_toc_entry_wrapper i {
font-weight: $fw_bold;
opacity: 1;
}
}
}
@@ -448,11 +453,6 @@ header.o_main_header {
margin: -#{$margin-l} -#{$margin-l} $margin-l;
padding: $padding-l $padding-l;
}
.btn-primary {
background-color: #00A09D;
border-color: #00A09D;
}
}
.row:first-of-type h2.border-top {
@include media-breakpoint-up(lg) {
@@ -485,17 +485,25 @@ header.o_main_header {
}
}
// pages with full width: Legal
// First level legal page and pages with toctrees (i.e.: User Docs, Install & Maintain, Developer, Contributing)
&.o_fullwidth_page {
.toctree-l1 > a {
display: block;
color: $gray-darker;
@include font-size($h2-font-size);
padding-bottom: $padding-xs;
border-bottom: 1px solid $gray-light;
margin-bottom: $margin-s;
div.toctree-wrapper > ul {
display: flex;
flex-wrap: wrap;
> li {
@include media-breakpoint-down(lg) {
width: 100%;
}
@include media-breakpoint-up(lg) {
width: 33%;
&:not(:nth-of-type(3n)){
padding-right: $padding-m;
}
}
}
}
}
}
// pages with column for code on the right
&.o_has_code_column {
@@ -583,22 +591,36 @@ header.o_main_header {
}
.toctree-wrapper {
> ul {
> ul, .toctree-l1 > ul {
padding-left: 0;
list-style: none;
}
.toctree-l1 > a[href="#"] {
.toctree-l1 > a {
display: block;
@include font-size($h2-font-size);
margin-top: $padding-m;
padding-bottom: $padding-xs;
border-bottom: 1px solid $gray-light;
margin-bottom: $margin-s;
font-size: 1.2rem;
font-weight: 600;
border-bottom: 2px solid $gray-darker;
}
.toctree-l1 {
margin-bottom: 2rem;
}
.toctree-l2 > a[href="#"] {
margin-top: 0.7rem;
display: inline-block;
}
a[href="#"] {
pointer-events: none;
cursor: default;
color: $gray-darker;
font-weight: $fw_regular;
font-weight: $fw_semibold;
}
}