Remove CDN dependencies, copy files locally

Having requests to some CDNs on a login page is often considered Bad™,
since it can load third-party code on a sensitive page of the website.

As a side effect, this removes calls to fonts.google.com, which is a
known tracking website.
This commit is contained in:
Théophile Bastian 2018-05-10 16:52:14 +02:00
parent 83658010f0
commit 93740066b3
13 changed files with 5049 additions and 9 deletions

Binary file not shown.

View file

@ -0,0 +1,25 @@
/** This CSS file was taken from fonts.google.com
*
* The font "roboto" and its derivatives are under Apache license, as published
* here: https://www.apache.org/licenses/LICENSE-2.0
* The font is by Christian Robertson. Thanks!
*/
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(roboto-regular.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(roboto-bold.ttf) format('truetype');
}
@font-face {
font-family: 'Roboto Slab';
font-style: normal;
font-weight: 400;
src: local('Roboto Slab Regular'), local('RobotoSlab-Regular'), url(roboto-slab-regular.ttf) format('truetype');
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 434 KiB

View file

@ -16,21 +16,20 @@
{# CSS #}
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:400,700|Roboto+Slab:400">
href="{% static "allauth_ens/fonts/roboto.css" %}">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN"
crossorigin="anonymous">
href="{% static "font-awesome/css/font-awesome.min.css" %}"
>
<link rel="stylesheet"
href="{% static "allauth_ens/screen.css" %}">
href="{% static "allauth_ens/screen.css" %}">
{# JS #}
<script type="text/javascript"
src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
crossorigin="anonymous"></script>
src="{% static "allauth_ens/jquery-3.2.1.slim.min.js" %}"
integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=">
</script>
<script type="text/javascript"
src="{% static "allauth_ens/authens.js" %}"></script>
src="{% static "allauth_ens/authens.js" %}"></script>
{% block extra_js %}{% endblock %}