Grouped common CSS and JS includes into separate templates

This commit is contained in:
Fabio Manganiello 2020-01-19 14:47:51 +01:00
parent 5ae57e3aaf
commit c44de5e2d7
7 changed files with 24 additions and 41 deletions

View file

@ -0,0 +1,5 @@
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/skeleton.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/normalize.css') }}">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css"
integrity="sha384-REHJTs1r2ErKBuJB0fCK99gCYsVjwxHrSU0N7I1zl9vZbggVJXRMsv/sLlOAGb4M" crossorigin="anonymous">

View file

@ -3,20 +3,11 @@
<title>Platypush Dashboard</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Lato">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/skeleton.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/normalize.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='font-awesome/css/all.css') }}">
{% include 'css-common.html' %}
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/dist/dashboard.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/dist/webpanel/plugins/assistant.google.css') }}">
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/axios.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/api.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/events.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/notifications.js') }}"></script>
{% include 'js-common.html' %}
<script type="text/javascript" src="{{ url_for('static', filename='js/plugins/pushbullet/index.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/plugins/assistant.google/index.js') }}"></script>

View file

@ -4,10 +4,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/normalize.css') }}">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.12.0/css/all.css"
integrity="sha384-REHJTs1r2ErKBuJB0fCK99gCYsVjwxHrSU0N7I1zl9vZbggVJXRMsv/sLlOAGb4M" crossorigin="anonymous">
{% include 'css-common.html' %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/dist/webpanel.css') }}">
<script type="text/javascript">
@ -34,17 +31,7 @@
{% endif %}
</script>
{% if utils.isfile(static_folder, 'js', 'lib', 'vue.js') %}
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.js') }}"></script>
{% else %}
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.min.js') }}"></script>
{% endif %}
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/axios.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/api.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/events.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/notifications.js') }}"></script>
{% include 'js-common.html' %}
<script type="text/javascript" src="{{ url_for('static', filename='js/autocomplete.js') }}"></script>
{% for style in styles.values() %}

View file

@ -0,0 +1,11 @@
{% if utils.isfile(static_folder, 'js', 'lib', 'vue.js') %}
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.js') }}"></script>
{% else %}
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.min.js') }}"></script>
{% endif %}
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/axios.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/api.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/events.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/notifications.js') }}"></script>

View file

@ -2,9 +2,7 @@
<head>
<title>Platypush login page</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/normalize.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='font-awesome/css/all.css') }}">
{% include 'css-common.html' %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/dist/login.css') }}">
</head>

View file

@ -2,9 +2,7 @@
<head>
<title>Platypush registration page</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/normalize.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='font-awesome/css/all.css') }}">
{% include 'css-common.html' %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/dist/login.css') }}">
</head>

View file

@ -4,9 +4,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="{{ url_for('static', filename='css/skeleton.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/normalize.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='font-awesome/css/all.css') }}">
{% include 'css-common.html' %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/dist/settings.css') }}">
<script type="text/javascript">
@ -21,12 +19,7 @@
{% endif %}
</script>
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/vue.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/lib/axios.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/api.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/notifications.js') }}"></script>
{% include 'js-common.html' %}
{% include 'elements.html' %}
</head>