diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-07-23 00:28:47 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-07-23 00:28:47 +0200 |
commit | 81493afa53a1a1d5ff4b417d05febf9f9e2a172b (patch) | |
tree | 00de0a1bb7c386cff4203aa7b0789569e75347bb /kosten/templates/js.jinja | |
parent | 6f6c8af2a55fabb69372e3fc4e8504167805d018 (diff) | |
download | kosten-81493afa53a1a1d5ff4b417d05febf9f9e2a172b.tar.gz kosten-81493afa53a1a1d5ff4b417d05febf9f9e2a172b.tar.bz2 kosten-81493afa53a1a1d5ff4b417d05febf9f9e2a172b.zip |
Restructure
Diffstat (limited to 'kosten/templates/js.jinja')
-rw-r--r-- | kosten/templates/js.jinja | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/kosten/templates/js.jinja b/kosten/templates/js.jinja new file mode 100644 index 0000000..531c9e1 --- /dev/null +++ b/kosten/templates/js.jinja @@ -0,0 +1,25 @@ +{% set js_lib = { + "kosten" : "js/kosten.js", + "highstock" : "js/lib/highstock-4.2.2.js", + "jquery" : "js/lib/jquery-1.11.2.min.js", + } +%} + +{% macro script(name) %} + {% if name in js_lib %} + <script type="text/javascript" src="{{ js_lib[name] | static_url }}"></script> + {% endif %} +{% endmacro %} + +{% macro scripts(names) %} + {% if names is not string %} + {% for name in names %} + {{ script(name) }} + {% endfor %} + {% else %} + {{ script(names) }} + {% for name in varargs %} + {{ script(name) }} + {% endfor %} + {% endif %} +{% endmacro %} |