From 0e58ae3ee0966dc79fc267cac20ba586fcb4e1a2 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 20 Jul 2015 13:31:35 +0200 Subject: [PATCH] [IMP] make application TOC toplevel look like subtitles --- _extensions/odoo/__init__.py | 4 ++-- _extensions/odoo/static/style.css | 23 +++++++++++++++++++++++ _extensions/odoo/static/style.less | 13 +++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/_extensions/odoo/__init__.py b/_extensions/odoo/__init__.py index fb96c68b4..32d58c589 100644 --- a/_extensions/odoo/__init__.py +++ b/_extensions/odoo/__init__.py @@ -65,10 +65,10 @@ def navbarify(node, navbar=None): # no subrefs -> ignore if not list_item.children[1].children: continue - # otherwise replace reference node by its own children + # otherwise replace reference node by an inline (so it can still be styled) para = n.parent para.remove(n) - para.extend(n.children) + para.append(nodes.inline('', '', *n.children)) def resolve_content_toctree( diff --git a/_extensions/odoo/static/style.css b/_extensions/odoo/static/style.css index 439836b06..737a95f57 100644 --- a/_extensions/odoo/static/style.css +++ b/_extensions/odoo/static/style.css @@ -9092,6 +9092,29 @@ main.index.animating .card { width: 100%; height: 100%; } +.toctree-wrapper > ul { + list-style: none; + padding: 0; +} +.toctree-wrapper > ul > li.toctree-l1 > span { + font-family: Lato, sans-serif; + font-weight: 300; + line-height: 1.1; + color: #393f4f; + margin-top: 22px; + margin-bottom: 11px; + font-size: 34px; +} +.toctree-wrapper > ul > li.toctree-l1 > span small, +.toctree-wrapper > ul > li.toctree-l1 > span .small { + font-weight: normal; + line-height: 1; + color: #777777; +} +.toctree-wrapper > ul > li.toctree-l1 > span small, +.toctree-wrapper > ul > li.toctree-l1 > span .small { + font-size: 65%; +} hr.divider { border-color: rgba(229, 229, 229, 0.4); position: absolute; diff --git a/_extensions/odoo/static/style.less b/_extensions/odoo/static/style.less index e4dfcf27e..be30ef37f 100644 --- a/_extensions/odoo/static/style.less +++ b/_extensions/odoo/static/style.less @@ -343,6 +343,19 @@ main.index { .square(100%); } +// the first level of an application toctree should look more like sections + +.toctree-wrapper > ul { + list-style: none; + padding: 0; + + > li.toctree-l1 > span { + font-family: @headings-font-family; + // copy h2 content :/ + .h2() + } +} + // Elements // -----------------------------------------------