/
base.html
68 lines (63 loc) · 2.03 KB
/
base.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{#
Renders Bokeh models into a basic .html file.
:param title: value for ``<title>`` tags
:type title: str
:param plot_resources: typically the output of RESOURCES
:type plot_resources: str
:param plot_script: typically the output of PLOT_SCRIPT
:type plot_script: str
Users can customize the file output by providing their own Jinja2 template
that accepts these same parameters.
#}
{% from macros import embed %}
<!DOCTYPE html>
<html lang="en" {{ html_attrs | default("", true) }}>
{% block head %}
<head>
{% block inner_head %}
<meta charset="utf-8">
<title>{% block title %}{{ title | e if title else "Panel App" }}{% endblock %}</title>
<link rel="apple-touch-icon" sizes="180x180" href="{{ dist_url }}images/apple-touch-icon.png">
{% if app_favicon is not defined %} <link rel="icon" type="image/png" sizes="32x32" href="{{ dist_url }}images/favicon.ico"> {% endif %}
{% if manifest_url %}<link rel="manifest" href="{{ manifest_url }}">{% endif %}
{% if theme_name == "dark"%}<style>html { background-color: #121212 }</style>{% endif %}
{% block preamble -%}{%- endblock %}
{% block resources %}
<style>
html, body {
display: flow-root;
box-sizing: border-box;
height: 100%;
margin: 0;
padding: 0;
}
</style>
{% block css_resources -%}
{{- bokeh_css if bokeh_css }}
{%- endblock css_resources %}
{% block js_resources -%}
{{ bokeh_js if bokeh_js }}
{%- endblock js_resources %}
{% endblock resources %}
{% block postamble %}{% endblock %}
{% endblock inner_head %}
</head>
{% endblock head%}
{% block body %}
<body>
{% block inner_body %}
{% block contents %}
{% for doc in docs %}
{{ embed(doc) if doc.elementid }}
{%- for root in doc.roots %}
{% block root scoped %}
{{ embed(root) }}
{% endblock %}
{% endfor %}
{% endfor %}
{% endblock contents %}
{{ plot_script | indent(4) }}
{% endblock inner_body %}
</body>
{% endblock body%}
</html>