platypush/platypush/backend/http/templates/index.html

74 lines
2.7 KiB
HTML

<!doctype html>
<head>
<title>Platypush Web Panel</title>
<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/font-awesome.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/dist/webpanel.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/axios.min.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/api.js') }}"></script>
{% for style in styles.values() %}
<link rel="stylesheet" href="{{ url_for('static', filename=style['_style_file']) }}">
{% endfor %}
<script type="text/javascript">
if (!window.config) {
window.config = {};
}
window.config = { ...window.config,
websocket_port: {{ websocket_port }},
has_ssl: {% print('true' if has_ssl else 'false') %},
templates: JSON.parse('{% print(utils.to_json(templates))|safe %}'),
scripts: JSON.parse('{% print(utils.to_json(scripts))|safe %}'),
};
{% if token %}
window.config.token = '{{ token }}';
{% else %}
window.config.token = undefined;
{% endif %}
</script>
{% include 'elements.html' %}
</head>
<body>
<div id="app">
{% include 'header.html' %}
{% with plugins=templates.keys() %}
{% include 'nav.html' %}
{% endwith %}
<main>
<div class="plugins-container">
{% for plugin, conf in templates.items() %}
{% with configuration=templates[plugin], utils=utils %}
{% include conf['_template_file'] %}
<plugin tag="{{ utils.plugin_name_to_tag(plugin) }}"
:config="{{ conf }}" :class="{hidden: '{{ plugin }}' != selectedPlugin}"/>
{% endwith %}
{% endfor %}
</div>
</main>
</div>
{% include 'plugins/template.html' %}
{% for script in scripts.values() %}
<script type="text/javascript" src="{{ url_for('static', filename=script['_script_file']) }}"></script>
{% endfor %}
<script type="text/javascript" src="{{ url_for('static', filename='js/elements.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='js/application.js') }}"></script>
</body>