Commit 03dfd4f4 authored by Daniele Venzano's avatar Daniele Venzano

Use tornado-style static_url() for static resources in templates

parent 0aa1e20e
......@@ -4,9 +4,9 @@
{% block head %}
<meta charset="UTF-8">
<title>{% block title %}{% endblock %} - Zoe</title>
<script src="/static/jquery-2.1.4.min.js" type="application/javascript"></script>
<script src="/static/zoe.js" type="application/javascript"></script>
<link rel="stylesheet" href="/static/zoe.css" type="text/css">
<script src="{{ static_url("jquery-2.1.4.min.js") }}" type="application/javascript"></script>
<script src="{{ static_url("zoe.js") }}" type="application/javascript"></script>
<link rel="stylesheet" href="{{ static_url("zoe.css") }}" type="text/css">
{% endblock %}
{% block custom_head %}
{% endblock %}
......
......@@ -3,7 +3,7 @@
{% block content_header %}
<div class="header">
<div id="logos">
<img class="logo" src="/static/logo.png" alt="Zoe logo"/>
<img class="logo" src="{{ static_url("logo.png") }}" alt="Zoe logo"/>
</div>
<div id="nav">
<div class="nav-item">
......
......@@ -2,8 +2,8 @@
{% block title %}Inspect execution {{ e.name }}{% endblock %}
{% block custom_head %}
<script src="/static/moment.min.js" type="application/javascript"></script>
<script src="/static/moment-timezone.min.js" type="application/javascript"></script>
<script src="{{ static_url("moment.min.js") }}" type="application/javascript"></script>
<script src="{{ static_url("moment-timezone.min.js") }}" type="application/javascript"></script>
<script>
let locale = window.navigator.userLanguage || window.navigator.language;
moment.locale(locale);
......
......@@ -2,9 +2,9 @@
{% block title %}Home{% endblock %}
{% block custom_head %}
<script src="/static/sorttable.js" type="application/javascript"></script>
<script src="/static/moment.min.js" type="application/javascript"></script>
<script src="/static/moment-timezone.min.js" type="application/javascript"></script>
<script src="{{ static_url("sorttable.js") }}" type="application/javascript"></script>
<script src="{{ static_url("moment.min.js") }}" type="application/javascript"></script>
<script src="{{ static_url("moment-timezone.min.js") }}" type="application/javascript"></script>
<script>
function format_timestamp(ts) {
var m = moment.utc(ts);
......
......@@ -2,9 +2,9 @@
{% block title %}Home{% endblock %}
{% block custom_head %}
<script src="/static/sorttable.js" type="application/javascript"></script>
<script src="/static/moment.min.js" type="application/javascript"></script>
<script src="/static/moment-timezone.min.js" type="application/javascript"></script>
<script src="{{ static_url("sorttable.js") }}" type="application/javascript"></script>
<script src="{{ static_url("moment.min.js") }}" type="application/javascript"></script>
<script src="{{ static_url("moment-timezone.min.js") }}" type="application/javascript"></script>
<script>
function format_timestamp(ts) {
var m = moment.utc(ts);
......
......@@ -2,7 +2,7 @@
{% block title %}Login{% endblock %}
{% block custom_head %}
<script src="/static/jquery.validate.min.js" type="application/javascript"></script>
<script src="{{ static_url("jquery.validate.min.js") }}" type="application/javascript"></script>
{% endblock %}
{% block content %}
......
......@@ -2,7 +2,7 @@
{% block title %}Zoe system status{% endblock %}
{% block custom_head %}
<script src="/static/Chart.min.js" type="application/javascript"></script>
<script src="{{ static_url("Chart.min.js") }}" type="application/javascript"></script>
<script>
Chart.scaleService.updateScaleDefaults('linear', {
ticks: {
......
......@@ -3,7 +3,7 @@
{% block title %}ZApp Shop{% endblock %}
{% block custom_head %}
<script src="/static/jquery.validate.min.js" type="application/javascript"></script>
<script src="{{ static_url("jquery.validate.min.js") }}" type="application/javascript"></script>
{% endblock %}
{% block content %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment