From 207b741d23f7513a1603d4cfef2b54d8b0682430 Mon Sep 17 00:00:00 2001 From: "Mathieu (mano)" Date: Thu, 12 Jan 2023 17:07:53 +0000 Subject: [PATCH] [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#3405 X-original-commit: 53035435f9613c56019b0e97dcd8630716af5394 Signed-off-by: Antoine Vandevenne (anv) --- content/developer/howtos.rst | 91 ++++++++++++++++++- .../static/scss/bootstrap_overridden.scss | 3 + extensions/odoo_theme/static/style.scss | 22 +++++ 3 files changed, 115 insertions(+), 1 deletion(-) diff --git a/content/developer/howtos.rst b/content/developer/howtos.rst index 203807a7f..5c6f825c6 100644 --- a/content/developer/howtos.rst +++ b/content/developer/howtos.rst @@ -1,4 +1,5 @@ -:nosearch: +:show-content: +:hide-page-toc: ========= Tutorials @@ -14,3 +15,91 @@ Tutorials howtos/company howtos/accounting_localization howtos/translations + +.. raw:: html + + + diff --git a/extensions/odoo_theme/static/scss/bootstrap_overridden.scss b/extensions/odoo_theme/static/scss/bootstrap_overridden.scss index c7fc2d232..a4e53a708 100644 --- a/extensions/odoo_theme/static/scss/bootstrap_overridden.scss +++ b/extensions/odoo_theme/static/scss/bootstrap_overridden.scss @@ -103,3 +103,6 @@ $accordion-icon-transform: rotate(0deg) !default; $alert-border-width: 3px; $alert-border-scale: 0; $alert-border-radius: 0 3px 3px 0; + +// Card +$card-cap-bg: transparent; diff --git a/extensions/odoo_theme/static/style.scss b/extensions/odoo_theme/static/style.scss index 5dcbd4377..24fc3f6e2 100644 --- a/extensions/odoo_theme/static/style.scss +++ b/extensions/odoo_theme/static/style.scss @@ -1056,6 +1056,28 @@ header { } } +//------------------------------------------------------------------------------ +// Cards +//------------------------------------------------------------------------------ + +.o_toctree_card { + + &:hover { + text-decoration: none; + cursor: pointer; + + .card { + background-color: rgba($teal-100, 0.2); + } + + } + + .card { + transition: all 200ms; + } + +} + //------------------------------------------------------------------------------ // Content Tabs //------------------------------------------------------------------------------