From e128874cefacb082b25d1fcb31641462df126728 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Wed, 28 Apr 2021 12:11:29 +0200 Subject: [PATCH] layout cleanup/improvements remove outdated comments fix todos/fixmes ... --- extensions/odoo_theme/layout.html | 32 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/extensions/odoo_theme/layout.html b/extensions/odoo_theme/layout.html index 70007992a..20d38f0bf 100644 --- a/extensions/odoo_theme/layout.html +++ b/extensions/odoo_theme/layout.html @@ -3,17 +3,18 @@ {% block css %} {{ super() }} - {# Allow custom css style import for specific pages #} - {% if 'custom-css' in meta %} - {# TODO VFE this should be wrapped in a loop as custom-css is a comma(, not ;)-separated list #} - {% set link = '_static/css/' + meta['custom-css'] %} - + {% if 'custom-css' in meta %}{# Allow custom css style import for specific pages #} + {% set css_files = meta['custom-css'].split(',') %} + {% for css_file in css_files %} + {% set link = '_static/css/' + css_file %} + + {% endfor %} {% endif %} {% endblock %} {% block scripts %} - {% if 'custom-js' in meta %} - {# Before the custom files using React & Immutable #} + {% if 'custom-js' in meta %}{# Allow custom js import for specific pages #} + {# Before the custom files using React & Immutable (accounting mementos) #} @@ -27,13 +28,10 @@ {% endfor %} {% endif %} - {# FIXME ANVFEDI Do we really need prefixfree ? It triggers a reload of css files two more times/page #} - - {{ super() }} - {# TODO EDI boostrap beta cdn ??? Isn't there a stable CDN ? It looks like this cdn won't exist forever :D #} - + {{ super() }} {# Load the scripts specified in the extensions/themes #} + {% endblock %} {% block linktags %} @@ -55,12 +53,12 @@ {% endblock %} {% block header %} - {# shown when js has properly set all the classes on the toc elements #} + {# shown when js has properly set all the classes on the toc elements #} @@ -103,11 +101,9 @@ {% include "layout_templates/homepage.html" %} {% else %}
- -
+
{# Beacon used by the Sphinx search to know where to look for a string #} {% block body %} {% endblock %}
- {# Do not show the edition link for pages without content #} {% if github_link and pagename != 'search' %} Edit on GitHub {% endif %}