Replace third party client libraries with CDN delivered versions (#709)

* Correct invalid html

* Add bundle files for CDN CSS and javascript

* Replace static javascript refs with bundles

* Change password reset templates to use a basefile

And switch to use bundles

* Remove third party libraries

* Remove awkward margin styling on navbars
This commit is contained in:
Basraah
2017-02-12 13:06:10 +10:00
committed by Adarnof
parent 8c82897a92
commit 58e121d10d
34 changed files with 175 additions and 15783 deletions

View File

@@ -0,0 +1,7 @@
{% load staticfiles %}
<!-- Bootstrap Core CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- Extra Bootstrap CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/startbootstrap-sb-admin-2/3.3.7+1/css/sb-admin-2.min.css" rel="stylesheet">
<!-- End Bootstrap CSS -->

View File

@@ -0,0 +1,6 @@
{% load static %}
<!-- Start Bootstrap + jQuery js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- End Bootstrap + jQuery js -->

View File

@@ -0,0 +1,4 @@
{% load staticfiles %}
<!-- Font Awesome Bundle -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<!-- End Font Awesome Bundle -->

View File

@@ -0,0 +1,4 @@
{% load static %}
<!-- Start jQuery datetimepicker CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.3.7/jquery.datetimepicker.min.css" rel="stylesheet" type="text/css">
<!-- End jQuery datetimepicker CSS -->

View File

@@ -0,0 +1,4 @@
{% load static %}
<!-- Start jQuery datetimepicker js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-datetimepicker/2.3.7/jquery.datetimepicker.min.js"></script>
<!-- End jQuery datetimepicker js -->

View File

@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% load navactive %}
{% load menu_items %}
@@ -15,28 +15,11 @@
<title>{% block title %}{% block page_title %}{% endblock page_title %} - Alliance Auth{% endblock title %}</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/sb-admin-2.css' %}" rel="stylesheet">
{% include 'bundles/bootstrap-css.html' %}
{% include 'bundles/fontawesome.html' %}
<link href="{% static 'css/auth-base.css' %}" type="text/css" rel="stylesheet">
{% block extra_css %}{% endblock extra_css %}
<style>
.grayiconecolor {
color: #505050;
}
#lang_select {
margin-right: 25px;
}
#f_lang_select {
margin-right: 5px;
}
.navbar-brand {
height: 58px;
padding: 19px 19px;
}
</style>
</head>
<body>
@@ -44,7 +27,7 @@
<div id="wrapper">
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<nav class="navbar navbar-inverse navbar-static-top auth-navbar-top" role="navigation">
<div class="container-fluid">
<a class="navbar-brand">
{{ SITE_NAME }}
@@ -94,7 +77,7 @@
<!-- /.navbar-top-links -->
<div class="navbar-default sidebar" role="navigation">
<div class="navbar-default sidebar auth-sidebar" role="navigation">
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li class="text-center divider-horizontal">
@@ -231,10 +214,12 @@
</div>
</div>
{% endif %}
<script src="{% static 'js/jquery.min.js' %}"></script>
<script src="{% static 'js/jquery.datetimepicker.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script>{% block extra_script %}
{% endblock extra_script %}</script>
{% include 'bundles/bootstrap-js.html' %}
{% block extra_javascript %}
{% endblock extra_javascript %}
<script>
{% block extra_script %}
{% endblock extra_script %}
</script>
</body>
</html>

View File

@@ -1,69 +1,71 @@
{% load staticfiles %}
<style>
html {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
div {
height: 200px;
width: 400px;
position: fixed;
top: 60%;
left: 50%;
margin-top: -100px;
margin-left: -200px;
}
#logo {
height: 200px;
width: 900px;
position: fixed;
top: 20%;
left: 50%;
margin-top: -100px;
margin-left: -450px;
}
</style>
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>{{ SITE_NAME }}</title>
<style>
html {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
div {
height: 200px;
width: 400px;
position: fixed;
top: 60%;
left: 50%;
margin-top: -100px;
margin-left: -200px;
}
#logo {
height: 200px;
width: 900px;
position: fixed;
top: 20%;
left: 50%;
margin-top: -100px;
margin-left: -450px;
}
img {
border: 0;
}
</style>
</head>
<body>
<div id="logo">
<p style="text-align:center">
<img src="{% static 'img/index_images/logo.png' %}" border="0">
<img src="{% static 'img/index_images/logo.png' %}" alt="Logo">
</p>
</div>
<div id="content">
<p style="text-align:center">
<a href="/dashboard/">
<img src="{% static 'img/index_images/auth.png' %}" border="0">
<img src="{% static 'img/index_images/auth.png' %}" alt="Auth">
</a>
</p>
{% if FORUM_URL %}
<p style="text-align:center">
<a href="{{FORUM_URL}}">
<img src="{% static 'img/index_images/forums.png' %}" border="0">
<img src="{% static 'img/index_images/forums.png' %}" alt="Forums">
</a>
</p>
{% endif %}
{% if KILLBOARD_URL %}
<p style="text-align:center">
<a href="{{KILLBOARD_URL}}">
<img src="{% static 'img/index_images/killboard.png' %}" border="0">
<img src="{% static 'img/index_images/killboard.png' %}" alt="Killboard">
</a>
</p>
{% endif %}
{% if EXTERNAL_MEDIA_URL %}
<p style="text-align:center">
<a href="{{EXTERNAL_MEDIA_URL}}">
<img src="{% static 'img/index_images/media.png' %}" border="0">
<img src="{% static 'img/index_images/media.png' %}" alt="External Media">
</a>
</p>
{% endif %}

View File

@@ -13,10 +13,8 @@
<meta name="author" content="">
<title>{{ SITE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
{% include 'bundles/bootstrap-css.html' %}
{% include 'bundles/fontawesome.html' %}
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
@@ -98,5 +96,6 @@
</div>
</div>
</div>
{% include 'bundles/bootstrap-js.html' %}
</body>
</html>

View File

@@ -12,11 +12,9 @@
<meta name="author" content="">
<title>{{ SITE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<link href="{% static 'css/sb-admin-2.css' %}" rel="stylesheet">
{% include 'bundles/bootstrap-css.html' %}
{% include 'bundles/fontawesome.html' %}
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
@@ -75,5 +73,6 @@
</div>
</div>
</div>
{% include 'bundles/bootstrap-js.html' %}
</body>
</html>

View File

@@ -8,7 +8,8 @@
{% block page_title %}{% trans "Create Operation" %}{% endblock page_title %}
{% block extra_css %}
<link href="{% static 'css/jquery.datetimepicker.css' %}" rel="stylesheet" type="text/css">{% endblock extra_css %}
{% include 'bundles/jquery-datetimepicker-css.html' %}
{% endblock extra_css %}
{% block content %}
<div class="col-lg-12">
@@ -30,6 +31,10 @@
{% endblock content %}
{% block extra_javascript %}
{% include 'bundles/jquery-datetimepicker-js.html' %}
{% endblock %}
{% block extra_script %}
$('#id_start').datetimepicker({

View File

@@ -8,7 +8,8 @@
{% block page_title %}{% trans "Timer Create" %}{% endblock page_title %}
{% block extra_css %}
<link href="{% static 'css/jquery.datetimepicker.css' %}" rel="stylesheet" type="text/css">{% endblock extra_css %}
{% include 'bundles/jquery-datetimepicker-css.html' %}
{% endblock extra_css %}
{% block content %}
<div class="col-lg-12">
@@ -30,6 +31,10 @@
{% endblock content %}
{% block extra_javascript %}
{% include 'bundles/jquery-datetimepicker-js.html' %}
{% endblock %}
{% block extra_script %}
$('#id_eve_time').datetimepicker({

View File

@@ -0,0 +1,44 @@
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ SITE_NAME }} - {% block page_title %}{% endblock page_title %}</title>
{% include 'bundles/bootstrap-css.html' %}
{% include 'bundles/fontawesome.html' %}
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.panel-transparent {
background: rgba(48, 48, 48, 0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
{% block content %}
{% endblock content %}
{% include 'bundles/bootstrap-js.html' %}
</body>
</html>

View File

@@ -1,43 +1,11 @@
{% extends 'registration/password_reset_base.html' %}
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
{% block page_title %}Login{% endblock %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ SITE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.panel-transparent {
background: rgba(48, 48, 48, 0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
{% block content %}
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
@@ -51,5 +19,4 @@
</div>
</div>
</div>
</body>
</html>
{% endblock content %}

View File

@@ -1,42 +1,11 @@
{% extends 'registration/password_reset_base.html' %}
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
{% block page_title %}Login{% endblock %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ SITE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.panel-transparent {
background: rgba(48, 48, 48, 0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
{% block content %}
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
@@ -60,5 +29,4 @@
</div>
</div>
</div>
</body>
</html>
{% endblock %}

View File

@@ -1,43 +1,11 @@
{% extends 'registration/password_reset_base.html' %}
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
{% block page_title %}Login{% endblock %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ SITE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.panel-transparent {
background: rgba(48, 48, 48, 0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
{% block content %}
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
@@ -52,5 +20,4 @@
</div>
</div>
</div>
</body>
</html>
{% endblock content %}

View File

@@ -1,42 +1,11 @@
{% extends 'registration/password_reset_base.html' %}
{% load staticfiles %}
{% load i18n %}
{% load bootstrap %}
<html>
<html lang="en">
<head>
{% block page_title %}Login{% endblock %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>{{ SITE_NAME }} - Login</title>
<!-- Bootstrap Core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- Custom Fonts -->
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet" type="text/css">
<style>
body {
background: url('{% static 'img/index_images/index_blank_bg.jpg' %}') no-repeat scroll;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.panel-transparent {
background: rgba(48, 48, 48, 0.7);
color: #ffffff;
}
.panel-body {
}
</style>
</head>
<body>
{% block content %}
<div class="container" style="margin-top:150px">
<div class="col-md-4 col-md-offset-4">
<div class="panel panel-default panel-transparent">
@@ -55,5 +24,4 @@
</div>
</div>
</div>
</body>
</html>
{% endblock content %}