From d341c676719e505fadc43edaf89ea1e00b5404a0 Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Wed, 12 Jun 2019 13:55:33 +0200 Subject: [PATCH] [templates][base] Don't use CDN for font-awesome/bootstrap We already have everything locally and thus no need for CDN uses. --- beat/web/templates/base.html | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/beat/web/templates/base.html b/beat/web/templates/base.html index 35bb915ac..44a9c29ce 100644 --- a/beat/web/templates/base.html +++ b/beat/web/templates/base.html @@ -1,21 +1,21 @@ {% comment %} * Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/ * Contact: beat.support@idiap.ch - * + * * This file is part of the beat.web module of the BEAT platform. - * + * * Commercial License Usage * Licensees holding valid commercial BEAT licenses may use this file in * accordance with the terms contained in a written agreement between you * and Idiap. For further information contact tto@idiap.ch - * + * * Alternatively, this file may be used under the terms of the GNU Affero * Public License version 3 as published by the Free Software and appearing * in the file LICENSE.AGPL included in the packaging of this file. * The BEAT platform is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. - * + * * You should have received a copy of the GNU Affero Public License along * with the BEAT platform. If not, see http://www.gnu.org/licenses/. {% endcomment %} @@ -33,9 +33,9 @@ {% block meta %}{% endblock %} - <!-- stylesheets must come before the javascripts as to speed-up perf --> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> + <link rel="stylesheet" href="{% fingerprint "font-awesome/css/font-awesome.min.css" %}" type="text/css"/> + <link rel="stylesheet" href="{% fingerprint "bootstrap/dist/css/bootstrap.min.css" %}" type="text/css"/> + <link rel="stylesheet" href="{% fingerprint "bootstrap3-dialog/dist/css/bootstrap-dialog.min.css" %}" type="text/css" media="screen"/> <link rel="icon" type="ui/image/x-icon" href="{% fingerprint "ui/images/icons/ico/beat.ico" %}" /> <link rel="stylesheet" href="{% fingerprint "ui/css/style.css" %}" type="text/css" media="screen"/> @@ -43,19 +43,14 @@ <!-- BEAT-page-specific content --> {% block stylesheets %}{% endblock %} - <!-- jquery 1.11.x from Google CDN with fallback on our installation --> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> - <!-- jquery fallback --> - <script>window.jQuery || document.write('<script src="{% fingerprint "jquery/dist/jquery.min.js" %}"><\/script>')</script> + <!-- jquery --> + <script src="{% fingerprint "jquery/dist/jquery.min.js" %}"></script> - <!-- JQuery Cookie plugin from jsdelivr CDN with fallback --> - <script src="https://cdn.jsdelivr.net/jquery.cookie/1.4.1/jquery.cookie.min.js"></script> - <script>$.cookie || document.write('<script src="{% fingerprint "jquery.cookie/jquery.cookie.js" %}"><\/script>')</script> + <!-- JQuery Cookie plugin --> + <script src="{% fingerprint "jquery.cookie/jquery.cookie.js" %}"></script> - <!-- Bootstrap and Font-Awesome with fallback from bootstrapcdn --> - <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> - <!-- Bootstrap/Font-Awesome local fallback --> - <script>if(typeof($.fn.modal) === 'undefined'){document.write('<link rel="stylesheet" href="{% fingerprint "font-awesome/css/font-awesome.min.css" %}"><\/link><link rel="stylesheet" href="{% fingerprint "bootstrap/dist/css/bootstrap.min.css" %}"><\/link><link rel="stylesheet" href="{% fingerprint "ui/css/style.css" %}"><\/link><script src="{% fingerprint "bootstrap/dist/js/bootstrap.min.js" %}"><\/script>')}</script> + <!-- Bootstrap and Font-Awesome --> + <script src="{% fingerprint "/bootstrap/dist/js/bootstrap.min.js" %}"></script> <!-- project: https://github.com/phstc/jquery-dateFormat --> <script src="{% fingerprint "jquery-dateFormat/dist/jquery-dateFormat.min.js" %}" type="text/javascript" charset="utf-8"></script> -- GitLab