From 4ac0bb1bed42599a66168b28ed90b7d0d15d5365 Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Fri, 27 Sep 2024 18:12:58 +0200 Subject: [PATCH] chore(View): Remove unnecessary theme view and defer basic styles (#30128) --- superset/templates/appbuilder/navbar.html | 1 + superset/templates/superset/basic.html | 245 ++-- superset/templates/superset/theme.html | 1355 --------------------- superset/views/core.py | 4 - 4 files changed, 130 insertions(+), 1475 deletions(-) delete mode 100644 superset/templates/superset/theme.html diff --git a/superset/templates/appbuilder/navbar.html b/superset/templates/appbuilder/navbar.html index 3db7f5de6..dda9c2430 100644 --- a/superset/templates/appbuilder/navbar.html +++ b/superset/templates/appbuilder/navbar.html @@ -36,6 +36,7 @@ width="{{ app_icon_width }}" src="{{ appbuilder.app_icon }}" alt="{{ appbuilder.app_name }}" + loading="lazy" /> diff --git a/superset/templates/superset/basic.html b/superset/templates/superset/basic.html index b97ecb338..49cd8aa10 100644 --- a/superset/templates/superset/basic.html +++ b/superset/templates/superset/basic.html @@ -1,124 +1,137 @@ + {# Licensed to the Apache Software Foundation (ASF) under one or more -contributor license agreements. See the NOTICE file distributed with this work -for additional information regarding copyright ownership. The ASF licenses this -file to you under the Apache License, Version 2.0 (the "License"); you may not -use this file except in compliance with the License. You may obtain a copy of -the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by -applicable law or agreed to in writing, software distributed under the License -is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the specific language -governing permissions and limitations under the License. #} + contributor license agreements. See the NOTICE file distributed with this work + for additional information regarding copyright ownership. The ASF licenses this + file to you under the Apache License, Version 2.0 (the "License"); you may not + use this file except in compliance with the License. You may obtain a copy of + the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by + applicable law or agreed to in writing, software distributed under the License + is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the specific language + governing permissions and limitations under the License. #} - -{% import 'appbuilder/general/lib.html' as lib %} {% from -'superset/partials/asset_bundle.html' import css_bundle, js_bundle with context -%} {% set favicons = appbuilder.app.config['FAVICONS'] %} - -
- {% include "head_custom_extra.html" %} -
+ {% import 'appbuilder/general/lib.html' as lib %} {% from
+ 'superset/partials/asset_bundle.html' import css_bundle, js_bundle with context
+ %} {% set favicons = appbuilder.app.config['FAVICONS'] %}
+ {% import "superset/macros.html" as macros %}
+
+
+ {% include "head_custom_extra.html" %}
+