Use flask-assets.

This commit is contained in:
Alexis Lahouze 2015-08-16 00:37:08 +02:00
parent 51763e0ddf
commit d26f086a43

View File

@ -21,7 +21,7 @@
<!-- Title -->
<title>Accountant</title>
<base href="{{ url_for('.index') }}">
<base href="{{ url_for('frontend.index') }}">
<!-- Bootstrap -->
<link href="{{ url_for('bower.static', filename='bootstrap/dist/css/bootstrap.css') }}" rel="stylesheet">
@ -32,6 +32,20 @@
<!-- Font Awesome -->
<link href="{{ url_for('bower.static', filename='font-awesome/css/font-awesome.css') }}" rel="stylesheet">
<!-- main css -->
{% assets 'frontend_css' %}
<link href="{{ ASSET_URL }}" rel="stylesheet">
{% endassets %}
<!-- JQuery -->
<script type="text/javascript" src="{{ url_for('bower.static', filename='jquery/dist/jquery.js') }}"></script>
<!-- Moment.js -->
<script type="text/javascript" src="{{ url_for('bower.static', filename='moment/min/moment-with-locales.js') }}"></script>
<!-- Highstocks -->
<script type="text/javascript" src="{{ url_for('bower.static', filename='highstock-release/highstock.js') }}"></script>
<!-- Pines Notify -->
<link href="{{ url_for('bower.static', filename='pines-notify/pnotify.core.css') }}" rel="stylesheet">
<link href="{{ url_for('bower.static', filename='pines-notify/pnotify.buttons.css') }}" rel="stylesheet">
@ -45,18 +59,6 @@
<script type="text/javascript" src="{{ url_for('bower.static', filename='pines-notify/pnotify.history.js') }}"></script>
<script type="text/javascript" src="{{ url_for('bower.static', filename='pines-notify/pnotify.nonblock.js') }}"></script>
<!-- main css -->
<link href="static/css/main.css" rel="stylesheet">
<!-- JQuery -->
<script type="text/javascript" src="{{ url_for('bower.static', filename='jquery/dist/jquery.js') }}"></script>
<!-- Moment.js -->
<script type="text/javascript" src="{{ url_for('bower.static', filename='moment/min/moment-with-locales.js') }}"></script>
<!-- Highstocks -->
<script type="text/javascript" src="{{ url_for('bower.static', filename='highstock-release/highstock.js') }}"></script>
<!-- AngularJS core -->
<script type="text/javascript" src="{{ url_for('bower.static', filename='angular/angular.js') }}"></script>
@ -66,6 +68,11 @@
<script type="text/javascript" src="{{ url_for('bower.static', filename='angular-strap/dist/angular-strap.js') }}"></script>
<script type="text/javascript" src="{{ url_for('bower.static', filename='angular-strap/dist/angular-strap.tpl.js') }}"></script>
<script type="text/javascript" src="{{ url_for('bower.static', filename='highcharts-ng/dist/highcharts-ng.js') }}"></script>
<script type="text/javascript" src="{{ url_for('bower.static', filename='angular-pnotify/src/angular-pnotify.js') }}"></script>
<!-- xeditable -->
<link href="{{ url_for('bower.static', filename='angular-xeditable/dist/css/xeditable.css') }}" rel="stylesheet">
<script type="text/javascript" src="{{ url_for('bower.static', filename='angular-xeditable/dist/js/xeditable.js') }}"></script>
</head>
<body style="padding-bottom: 50px; padding-top: 70px">
@ -84,7 +91,9 @@
</div>
<!-- Custom Javascript library for entries -->
<script type="text/javascript" src="static/build/js/app.js"></script>
{% assets "frontend_js" %}
<script type="text/javascript" src="{{ ASSET_URL }}"></script>
{% endassets %}
</body>
</html>