IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Commit f24a2d41 authored by Amy Rose's avatar Amy Rose
Browse files

remove unused templating from embed.html, fix Firefox compatibility

parent 1a57ac46
Pipeline #999 passed with stages
in 2 minutes and 11 seconds
{% block title %} {{dashboard.title()}} {% endblock %}
{% block head %}
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.4.1/dist/chart.min.js" integrity="sha256-GMN9UIJeUeOsn/Uq4xDheGItEeSpI5Hcfp/63GclDZk=" crossorigin="anonymous"></script>
<script src="/static/chart.min.js"></script>
<style>
body {
display: flex;
align-content: center;
align-items: center;
color: transparent;
}
canvas {
position: absolute;
z-index: 999;
max-width: 100vw;
max-height: 100vh;
}
</style>
{% endblock %}
{% block main %}
<canvas style="height: 100%; width: 100%;" id="{{dashboard.title()|lower|replace(' ', '-')|safe}}"></canvas>
<script>
new Chart(
document.getElementById("{{dashboard.title()|lower|replace(' ', '-')|safe}}"),
{{dashboard.get_json()|safe}}
);
</script>
{% endblock %}
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.4.1/dist/chart.min.js" integrity="sha256-GMN9UIJeUeOsn/Uq4xDheGItEeSpI5Hcfp/63GclDZk=" crossorigin="anonymous"></script>
<script src="/static/chart.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
canvas {
z-index: 999;
width: 100%;
height: 100%;
max-width: 100vw;
max-height: 100vh;
margin: auto;
}
</style>
</head>
<body>
<canvas id="{{dashboard.title()|lower|replace(' ', '-')|safe}}"></canvas>
<script>
new Chart(
document.getElementById("{{dashboard.title()|lower|replace(' ', '-')|safe}}"),
{{dashboard.get_json()|safe}}
);
</script>
</body>
</html
Supports Markdown
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