]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
DASH: template inheritance -> base.jinja2
authorOle Artz <ole.artz@t-online.de>
Thu, 17 Aug 2017 13:43:10 +0000 (15:43 +0200)
committerOle Artz <ole.artz@t-online.de>
Thu, 17 Aug 2017 13:43:10 +0000 (15:43 +0200)
python_suite/dashboard/views/base.jinja2 [new file with mode: 0644]
python_suite/dashboard/views/pv_overview.jinja2

diff --git a/python_suite/dashboard/views/base.jinja2 b/python_suite/dashboard/views/base.jinja2
new file mode 100644 (file)
index 0000000..c8f5d74
--- /dev/null
@@ -0,0 +1,33 @@
+<html>
+       <head>
+               <title>{% block title %}OVERVIEW{% endblock %} - PRESTO</title>
+               <meta http-equiv="refresh" content="5">
+               <link rel="stylesheet" href="/static/css/style.css">
+       </head>
+
+       <body>
+       <div id="container">
+               <div class="header">
+                       <a href="http://www.uni-frankfurt.de/45043072/IKF?legacy_request=1"><img src="/static/images/ikf_logo.png" alt="logo" class="ikf"/></a>
+                       <a href="http://www.fair-center.eu/for-users/experiments/cbm-and-hades/cbm.html"><img src="/static/images/cbm_logo.png" alt="logo" class="cbm"/></a>
+                       <h1>PRESTO - Overview<br/> Prototype of the Second Station of the Micro Vertex Detector of the Compressed Baryonic Matter</h1>
+               </div>
+               <nav class="menu_bar">
+                       {% for page in config.pages %}
+                       <a class="{{ 'active' if page == req_page else '' }}" href="/list/{{ page }}">{{ config.pages[page].name }}</a>
+                       {% endfor %}
+               </nav>
+               <div id="content">
+                       {% block content %}{% endblock %}
+               </div>
+<hr/>
+               <div id="footnote">
+                       Copyright &copy;<a href="mailto:ole.artz@stud.uni-frankfurt.de">Ole Artz</a>, Philipp Klaus,
+                       <a href="https://www.uni-frankfurt.de/51839311/Working-Group-People">IKF-Working Group Prof. Dr. Stroth</a>
+               </div>
+       </div>  
+       <script type="text/javascript" src="/static/js/script.js"></script>
+               </body>
+
+</html>
+
index bc01588a120f01abd0597b2f34e8c8d271cc34dc..b70536f0991cdaa725803b61f1d1d373f8ad745f 100644 (file)
@@ -1,22 +1,8 @@
-<html>
-       <head>
-               <title>PRESTO - OVERVIEW</title>
-               <meta http-equiv="refresh" content="5">
-               <link rel="stylesheet" href="/static/css/style.css">
-       </head>
+{% extends "base.jinja2" %}
 
-       <body>
-       <div id="container">
-               <div class="header">
-                       <a href="http://www.uni-frankfurt.de/45043072/IKF?legacy_request=1"><img src="/static/images/ikf_logo.png" alt="logo" class="ikf"/></a>
-                       <a href="http://www.fair-center.eu/for-users/experiments/cbm-and-hades/cbm.html"><img src="/static/images/cbm_logo.png" alt="logo" class="cbm"/></a>
-                       <h1>PRESTO - Overview<br/> Prototype of the Second Station of the Micro Vertex Detector of the Compressed Baryonic Matter</h1>
-               </div>
-               <nav class="menu_bar">
-                       {% for page in config.pages %}
-                       <a class="{{ 'active' if page == req_page else '' }}" href="/list/{{ page }}">{{ config.pages[page].name }}</a>
-                       {% endfor %}
-               </nav>
+{% block title %}{{ config.pages[req_page].name }}{% endblock %}
+
+{% block content %}
                <div id="PVs">
                        {% set page = config.pages[req_page] %}
                        {% for group in page.groups %}
                        </div>
                        {% endfor %}
                </div>
-<hr/>
-               <div id="footnote">
-                       Copyright &copy;<a href="mailto:ole.artz@stud.uni-frankfurt.de">Ole Artz</a>, Philipp Klaus,
-                       <a href="https://www.uni-frankfurt.de/51839311/Working-Group-People">IKF-Working Group Prof. Dr. Stroth</a>
-               </div>
-       </div>  
-       <script type="text/javascript" src="/static/js/script.js"></script>
-               </body>
-
-</html>
-
+{% endblock %}