-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmodular_template.html
106 lines (97 loc) · 4.44 KB
/
modular_template.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<head>
<title>{{ model_name }} (Mesa visualization)</title>
<link href="/static/external/bootstrap-5.1.3-dist/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="/static/external/bootstrap-slider-11.0.2/dist/css/bootstrap-slider.min.css" type="text/css" rel="stylesheet" />
<link href="/static/css/visualization.css" type="text/css" rel="stylesheet" />
<!-- CSS includes go here -->
{% for file_name in package_css_includes %}
<link href="/static/css/{{ file_name }}" type="text/css" rel="stylesheet" />
{% end %}
{% for file_name in local_css_includes %}
<link href="/local/{{ file_name }}" type="text/css" rel="stylesheet" />
{% end %}
<!-- This is the Tornado template for the Modular Visualization. The Javascript code opens a WebSocket connection to
the server (the port is set via the template). On every step, it receives inputs, one per module, and sends
them to the associated function to render. -->
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-dark bg-dark navbar-static-top navbar-expand-lg mb-3">
<div class="container">
<button type="button" class="navbar-toggler collapsed" data-bs-toggle="collapse" data-bs-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="visually-hidden">Toggle navigation</span>
☰
</button>
<a class="navbar-brand" href="#">{{ model_name }}</a>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="nav-item">
<a href="#" data-bs-toggle="modal" data-bs-target="#about" data-bs-title="About" data-bs-content="#about-content" class="nav-link">
About
</a>
</li>
</ul>
<ul class="nav navbar-nav ms-auto">
<li id="play-pause" class="nav-item"><a href="#" class="nav-link">Start</a>
</li>
<li id="step" class="nav-item"><a href="#" class="nav-link">Step</a>
</li>
<li id="reset" class="nav-item"><a href="#" class="nav-link">Reset</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container d-flex flex-row">
<div class="col-xl-4 col-lg-4 col-md-4 col-3" id="sidebar"></div>
<div class="col-xl-8 col-lg-8 col-md-8 col-9" id="elements">
<div id="elements-topbar">
<div>
<label class="badge bg-primary" for="fps" style="margin-right: 15px">Frames Per Second</label>
<input id="fps" data-slider-id="fps" type="text">
</div>
<p>Current Step: <span id="currentStep">0</span>
</p>
</div>
</div>
</div>
<!-- About modal -->
<div id="about" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">About {{ model_name }}</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
</button>
</div>
<div class="modal-body">
<div>{{ description }}</div>
<div> </div>
<div style="clear: both;"></div>
</div>
</div>
</div>
</div>
<!-- Bottom-load all JavaScript dependencies -->
<script src="/static/external/bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js"></script>
<script src="/static/external/bootstrap-slider-11.0.2/dist/bootstrap-slider.min.js"></script>
<!-- Script includes go here -->
{% for file_name in package_js_includes %}
<script src="/static/js/{{ file_name }}" type="text/javascript"></script>
{% end %}
{% for file_name in local_js_includes %}
<script src="/local/{{ file_name }}" type="text/javascript"></script>
{% end %}
<!-- template-specific code snippets here -->
<script>
var port = {{ port }};
</script>
<script src="/static/js/runcontrol.js"></script>
<!-- Element-specific scripts go here -->
<script>
{% for script in scripts %}
{% raw script %}
{% end %}
</script>
</body>