Merge branch 'feature/base_theme_improvements' into 'master'

COVID Information link and CARA@CERN section only for CERN theme

Closes #217 and #209

See merge request cara/cara!290
This commit is contained in:
Andre Henriques 2021-12-21 16:13:29 +01:00
commit ac8dd82a73
20 changed files with 230 additions and 195 deletions

View file

@ -92,7 +92,7 @@ python -m cara.apps.calculator
To run with the CERN theme:
```
python -m cara.apps.calculator --theme=cara/apps/calculator/themes/cern
python -m cara.apps.calculator --theme=cara/apps/templates/cern
```
To run the calculator on a different URL path:

View file

@ -208,7 +208,7 @@
- name: CARA_CALCULATOR_PREFIX
value: /calculator-cern
- name: CARA_THEME
value: cara/apps/calculator/themes/cern
value: cara/apps/templates/cern
image: '${PROJECT_NAME}/cara-webservice'
ports:
- containerPort: 8080

View file

@ -229,7 +229,7 @@ def make_app(
calculator_templates = Path(__file__).parent / "templates"
templates_directories = [cara_templates, calculator_templates]
if theme_dir:
templates_directories.insert(0, theme_dir / 'templates')
templates_directories.insert(0, theme_dir)
loader = jinja2.FileSystemLoader([str(path) for path in templates_directories])
template_environment = jinja2.Environment(
loader=loader,

View file

@ -36,7 +36,6 @@ def main():
if theme_dir is not None:
theme_dir = Path(theme_dir).absolute()
assert theme_dir.exists()
assert (theme_dir / 'templates').exists()
app = make_app(debug=args.no_debug, calculator_prefix=args.prefix, theme_dir=theme_dir)
app.listen(args.port)
IOLoop.instance().start()

View file

@ -77,9 +77,11 @@
<hr width="80%">
<b>Room data:</b>
<div data-tooltip="The area you wish to study (choose one of the 2 options). Use GIS Portal or measure. Also indicate if a central (radiator-type) heating system is in use.">
{% block room_data %}
<div data-tooltip="The area you wish to study (choose one of the 2 options). Indicate if a central (radiator-type) heating system is in use.">
<span class="tooltip_text">?</span>
</div>
{% endblock room_data %}
<br>

View file

@ -0,0 +1,64 @@
{% extends "layout.html.j2" %}
{% set active_page="home/" %}
{% block main %}
{# <div style="height: 5em; display: block;"></div> #}
<header class= "bg-light">
<div class="container container--padding">
<img src="/static/images/cara_full_text.png" class="logo d-block m-auto" id="desktop_logo">
<img src="/static/images/cara_full_logo.png" class="logo d-none m-auto" id="mobile_logo">
</div>
</header>
<div class="container container--padding">
<div class="d-flex mb-3 justify-content-center" id="calculator_app_button">
<div><a href="{{ calculator_prefix }}" role="button" class="btn btn-outline-primary"><div class="d-flex d-row"><i class="icon-calculator"></i><span class="pl-1">Calculator</div></a></div>
</div>
<div class="split">
<div class="col-lg-8 col-md-7 pl-0">
<h2 class="paragraph-title">Introduction</h2><br>
<div>
<p>
CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions.
It does this by simulating the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming homogenous mixing, and it estimates the risk of COVID-19 airborne transmission therein.
Please see the <a href="/about">About</a> page for more details on the methodology, assumptions and limitations of CARA.
</p>
<p>
The full CARA source code can be accessed freely under an Apache 2.0 open source license from our <a href="https://gitlab.cern.ch/cara/cara">code repository</a>.
It includes detailed instructions on how to run your own version of this tool.
</p>
<br>
</div>
</div>
<div class="align-self-center">
<img src="static/images/CARA_1_Vs3_Colour.jpg" class="cara_home_image">
</div>
</div>
<br>
<div id="apps_section" class="d-none">
<div class="d-flex flex-row" >
<h2 class="paragraph-title pr-4 align-self-center">Apps:</h2>
<br>
<div class="pr-3"><a href="{{ calculator_prefix }}" role="button" class="btn btn-lg btn-outline-primary"><div class="d-flex d-row"><i class="icon-calculator"></i><span class="pl-2">Calculator</div></a></div>
<br>
<div class="expert_app_button"><a href="https://cara.web.cern.ch/expert-app" role="button" class="btn btn-lg btn-outline-secondary"><div class="d-flex d-row"><i class="icon-expert"></i><span class="pl-2">Expert (beta)</div></a></div>
</div>
<hr width="95%">
</div>
{% block cara_at_cern %}
{% endblock cara_at_cern %}
<br>
<h3 class="paragraph-title">Acknowledgements</h3><br>
<p>
We wish to thank CERNs HSE Unit, Beams Department, Experimental Physics Department, Information Technology Department, Industry, Procurement and Knowledge Transfer Department and International Relations Sector for their support to the study.
Thanks to Doris Forkel-Wirth, Benoit Delille, Walid Fadel, Olga Beltramello, Letizia Di Giulio, Evelyne Dho, Wayne Salter, Benoit Salvant and colleagues from the COVID working group for providing expert advice and extensively testing the model.
Finally, we wish to thank Fabienne Landua and the design service for preparing the illustrations and Alessandro Raimondo, Ana Padua and Manuela Cirilli from the Knowledge Transfer Group for their continuous support.
Our compliments towards the work and research performed by world leading scientists in this domain: Dr. Julian Tang, Prof. Manuel Gameiro, Dr. Linsey Marr, Prof. Jose Jimenez, Prof. Lidia Morawska, Prof. Yuguo Li et al. - their scientific contribution was indispensable for this project.
<span style="height: 3vh; display: block;"></span>
</p>
</div>
</div>
{% endblock main %}

View file

@ -0,0 +1,120 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>
{% block title %}
CARA | COVID Airborne Risk Assessment
{% endblock title %}
</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="/static/css/style.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700&display=swap" rel="stylesheet">
{% block extra_headers %}
{% endblock extra_headers %}
</head>
<body>
<nav class="navbar navbar-dark navbar-expand-lg">
<div class="container">
<a href="/" class="navbar-brand"><img src="/static/images/cara_logo_white_text.png" alt="Logo" title="Logo"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-link"><a href="/" class="{{ "header-navbar nav-link active" if "home/" == active_page else "header-navbar nav-link" }}">HOME</a></li>
<div id="apps_dropdown">
<li class="nav-item dropdown p-2">
<a class="nav-link dropdown-toggle {{ "header-navbar nav-link active" if "calculator/" in active_page else "header-navbar nav-link" }}" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
APPS
</a>
<ul class="dropdown-menu dropwown-navbar-colors" style="min-width: 14rem;" aria-labelledby="navbarDropdown">
<li><a href="{{ calculator_prefix }}" class="{{ "header-navbar nav-link active" if "calculator/" == active_page else "header-navbar nav-link" }}">CARA CALCULATOR</a></li>
<li><a href="{{ calculator_prefix }}/user-guide" style="margin-left: 4rem" class="{{ "header-navbar nav-link active" if "user-guide" in active_page else "header-navbar nav-link" }}">USER GUIDE</a></li>
<li><a href="/expert-app" class="{{ "header-navbar nav-link active" if "/expert-app" == active_page else "header-navbar nav-link" }}">EXPERT APP (BETA)</a></li>
</ul>
</li>
</div>
<div id="mobile_calculator_option">
<li class="nav-link"><a href="{{ calculator_prefix }}" class="{{ "header-navbar nav-link active" if "calculator/" == active_page else "header-navbar nav-link" }}">CARA CALCULATOR</a></li>
<li class="nav-link"><a href="{{ calculator_prefix }}/user-guide" class="{{ "header-navbar nav-link active" if "user-guide" in active_page else "header-navbar nav-link" }}">USER GUIDE</a></li>
</div>
{% block covid_information%}
{% endblock covid_information%}
<li class="nav-link"><a href="/about" class="{{ "header-navbar nav-link active" if "about" == active_page else "header-navbar nav-link" }}">ABOUT</a></li>
{% if user.is_authenticated() %}
<li class="nav-item dropdown p-2">
<a class="nav-link active dropdown-toggle d-inline-block" href="https://cern.ch/users-portal" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Signed in as: {{ user.username }}
</a>
<ul class="dropdown-menu dropwown-navbar-colors" style="min-width: 14rem;" aria-labelledby="navbarDropdown">
<li><a href="/auth/logout" class="nav-link ml-2">Sign out</a></li>
</ul>
{# Sent to Piwik for statistics #}
<script>
var AuthUserDomain = "{{ user.domain() }}";
</script>
{% endif %}
</li>
</ul>
</div>
</div>
</nav>
<main role="main">
{% block main %}
{% endblock main %}
</main>
<footer>
<div class="container">
<div class="row text-light text-center py-4 justify-content-center">
<div class="col-sm-10 col-md-8 col-lg-6">
<img src="/static/images/cara_logo_white_text.png" alt="Logo">
<p><span style="font-size:10px;"><em>CERN strives to deploy its know-how and technologies to help solve
the challenges arising in the local and global fight against COVID-19. As a particle physics
research organisation, CERN is not in a position to advise on medical research, health or health
policy issues. Any initiative is conducted on a best effort and as-is basis, without liability or
warranty.</em></span></p>
<p style="font-size:10px;">
CARA is <a href="https://gitlab.cern.ch/cara/cara/-/blob/master/LICENSE" class="ext">Apache 2.0 licensed</a> open-source
software developed at CERN.
You can find the source code at <a href="https://gitlab.cern.ch/cara/cara">https://gitlab.cern.ch/cara/cara</a>,
where we welcome contributions, feature requests and issue reports.
</p>
</div>
</div>
</div>
</footer>
<script src="/static/js/js_packaged_for_theme.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<script src="/static/js/jquery.colorbox-min.js"></script>
<script src="/static/js/ScrollMagic.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.3/js/bootstrap.min.js" integrity="sha512-8qmis31OQi6hIRgvkht0s6mCOittjMa9GMqtK9hes5iEQBQE/Ca6yGE5FsW36vyipGoWQswBj/QBm2JR086Rkw==" crossorigin="anonymous"></script>
<script src="/static/js/usage-tracking.js"></script>
<!-- Popper JS -->
<script src="/static/js/popper.min.js"></script>
<!-- Font Awesome -->
<script src="/static/js/all.min.js"></script>
{% block body_scripts %}
{% endblock body_scripts %}
</body>
</html>

View file

@ -86,7 +86,9 @@ However, this value may be revised in the future as more studies of the Gamma VO
<h3>Room Data</h3>
<br>
<p>Please enter either the room volume (in m³) or both the floor area (m²) and the room height (m).
This information is available via GIS Portal (<a href="https://gis.cern.ch/gisportal/">https://gis.cern.ch/gisportal/</a>).</p>
{% block room_volume_guide %}
</p>
{% endblock room_volume_guide %}
<br>
<h4>Room heating system</h4>
<br>

View file

@ -0,0 +1,2 @@
{# The main calculator form, this template is intended to be implemented by themes #}
{% extends "base/calculator.form.html.j2" %}

View file

@ -0,0 +1,7 @@
{% extends "base/calculator.form.html.j2" %}
{% block room_data %}
<div data-tooltip="The area you wish to study (choose one of the 2 options). Use GIS Portal or measure. Also indicate if a central (radiator-type) heating system is in use.">
<span class="tooltip_text">?</span>
</div>
{% endblock room_data %}

View file

@ -0,0 +1,11 @@
{% extends "base/index.html.j2" %}
{% block cara_at_cern %}
<h2 class="paragraph-title">CARA @ CERN</h2><br>
<div>
<p>
CARA has been developed by CERN with the intention of allowing members of personnel with roles related to supervision, health & safety or space management to simulate the concerned workplaces on CERN sites.
A hosted <a href="{{ calculator_prefix }}">CERN version of the CARA Covid Calculator</a> is available on this site to members of the CERN personnel.
</p>
</div>
{% endblock cara_at_cern %}

View file

@ -0,0 +1,5 @@
{% extends "base/layout.html.j2" %}
{% block covid_information %}
<li class="nav-link"><a href="https://hse.cern/covid-19-information" class="header-navbar nav-link">COVID INFORMATION</a></li>
{% endblock covid_information %}

View file

@ -0,0 +1,5 @@
{% extends "base/userguide.html.j2" %}
{% block room_volume_guide %}
This information is available via GIS Portal (<a href="https://gis.cern.ch/gisportal/">https://gis.cern.ch/gisportal/</a>).</p>
{% endblock room_volume_guide %}

View file

@ -1,68 +1,2 @@
{% extends "layout.html.j2" %}
{% set active_page="home/" %}
{% block main %}
{# <div style="height: 5em; display: block;"></div> #}
<header class= "bg-light">
<div class="container container--padding">
<img src="/static/images/cara_full_text.png" class="logo d-block m-auto" id="desktop_logo">
<img src="/static/images/cara_full_logo.png" class="logo d-none m-auto" id="mobile_logo">
</div>
</header>
<div class="container container--padding">
<div class="d-flex mb-3 justify-content-center" id="calculator_app_button">
<div><a href="{{ calculator_prefix }}" role="button" class="btn btn-outline-primary"><div class="d-flex d-row"><i class="icon-calculator"></i><span class="pl-1">Calculator</div></a></div>
</div>
<div class="split">
<div class="col-lg-8 col-md-7 pl-0">
<h2 class="paragraph-title">Introduction</h2><br>
<div>
<p>
CARA is a risk assessment tool developed to model the concentration of viruses in enclosed spaces, in order to inform space-management decisions.
It does this by simulating the long-range airborne spread SARS-CoV-2 virus in a finite volume, assuming homogenous mixing, and it estimates the risk of COVID-19 airborne transmission therein.
Please see the <a href="/about">About</a> page for more details on the methodology, assumptions and limitations of CARA.
</p>
<p>
The full CARA source code can be accessed freely under an Apache 2.0 open source license from our <a href="https://gitlab.cern.ch/cara/cara">code repository</a>.
It includes detailed instructions on how to run your own version of this tool.
</p>
<br>
</div>
</div>
<div class="align-self-center">
<img src="static/images/CARA_1_Vs3_Colour.jpg" class="cara_home_image">
</div>
</div>
<br>
<div id="apps_section" class="d-none">
<div class="d-flex flex-row" >
<h2 class="paragraph-title pr-4 align-self-center">Apps:</h2>
<br>
<div class="pr-3"><a href="{{ calculator_prefix }}" role="button" class="btn btn-lg btn-outline-primary"><div class="d-flex d-row"><i class="icon-calculator"></i><span class="pl-2">Calculator</div></a></div>
<br>
<div class="expert_app_button"><a href="https://cara.web.cern.ch/expert-app" role="button" class="btn btn-lg btn-outline-secondary"><div class="d-flex d-row"><i class="icon-expert"></i><span class="pl-2">Expert (beta)</div></a></div>
</div>
<hr width="95%">
</div>
<h2 class="paragraph-title">CARA @ CERN</h2><br>
<div>
<p>
CARA has been developed by CERN with the intention of allowing members of personnel with roles related to supervision, health & safety or space management to simulate the concerned workplaces on CERN sites.
A hosted <a href="{{ calculator_prefix }}">CERN version of the CARA Covid Calculator</a> is available on this site to members of the CERN personnel.
</p>
</div>
<br>
<h3 class="paragraph-title">Acknowledgements</h3><br>
<p>
We wish to thank CERNs HSE Unit, Beams Department, Experimental Physics Department, Information Technology Department, Industry, Procurement and Knowledge Transfer Department and International Relations Sector for their support to the study.
Thanks to Doris Forkel-Wirth, Benoit Delille, Walid Fadel, Olga Beltramello, Letizia Di Giulio, Evelyne Dho, Wayne Salter, Benoit Salvant and colleagues from the COVID working group for providing expert advice and extensively testing the model.
Finally, we wish to thank Fabienne Landua and the design service for preparing the illustrations and Alessandro Raimondo, Ana Padua and Manuela Cirilli from the Knowledge Transfer Group for their continuous support.
Our compliments towards the work and research performed by world leading scientists in this domain: Dr. Julian Tang, Prof. Manuel Gameiro, Dr. Linsey Marr, Prof. Jose Jimenez, Prof. Lidia Morawska, Prof. Yuguo Li et al. - their scientific contribution was indispensable for this project.
<span style="height: 3vh; display: block;"></span>
</p>
</div>
</div>
{% endblock main %}
{# The main index, this template is intended to be implemented by themes #}
{% extends "base/index.html.j2" %}

View file

@ -1,119 +1,2 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>
{% block title %}
CARA | COVID Airborne Risk Assessment
{% endblock title %}
</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="/static/css/style.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700&display=swap" rel="stylesheet">
{% block extra_headers %}
{% endblock extra_headers %}
</head>
<body>
<nav class="navbar navbar-dark navbar-expand-lg">
<div class="container">
<a href="/" class="navbar-brand"><img src="/static/images/cara_logo_white_text.png" alt="Logo" title="Logo"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-link"><a href="/" class="{{ "header-navbar nav-link active" if "home/" == active_page else "header-navbar nav-link" }}">HOME</a></li>
<div id="apps_dropdown">
<li class="nav-item dropdown p-2">
<a class="nav-link dropdown-toggle {{ "header-navbar nav-link active" if "calculator/" in active_page else "header-navbar nav-link" }}" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
APPS
</a>
<ul class="dropdown-menu dropwown-navbar-colors" style="min-width: 14rem;" aria-labelledby="navbarDropdown">
<li><a href="{{ calculator_prefix }}" class="{{ "header-navbar nav-link active" if "calculator/" == active_page else "header-navbar nav-link" }}">CARA CALCULATOR</a></li>
<li><a href="{{ calculator_prefix }}/user-guide" style="margin-left: 4rem" class="{{ "header-navbar nav-link active" if "user-guide" in active_page else "header-navbar nav-link" }}">USER GUIDE</a></li>
<li class="expert_app_button"><a href="/expert-app" class="{{ "header-navbar nav-link active" if "/expert-app" == active_page else "header-navbar nav-link" }}">EXPERT APP (BETA)</a></li>
</ul>
</li>
</div>
<div id="mobile_calculator_option">
<li class="nav-link"><a href="{{ calculator_prefix }}" class="{{ "header-navbar nav-link active" if "calculator/" == active_page else "header-navbar nav-link" }}">CARA CALCULATOR</a></li>
<li class="nav-link"><a href="{{ calculator_prefix }}/user-guide" class="{{ "header-navbar nav-link active" if "user-guide" in active_page else "header-navbar nav-link" }}">USER GUIDE</a></li>
</div>
<li class="nav-link"><a href="https://hse.cern/covid-19-information" class="header-navbar nav-link">COVID INFORMATION</a></li>
<li class="nav-link"><a href="/about" class="{{ "header-navbar nav-link active" if "about" == active_page else "header-navbar nav-link" }}">ABOUT</a></li>
{% if user.is_authenticated() %}
<li class="nav-item dropdown p-2">
<a class="nav-link active dropdown-toggle d-inline-block" href="https://cern.ch/users-portal" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Signed in as: {{ user.username }}
</a>
<ul class="dropdown-menu dropwown-navbar-colors" style="min-width: 14rem;" aria-labelledby="navbarDropdown">
<li><a href="/auth/logout" class="nav-link ml-2">Sign out</a></li>
</ul>
{# Sent to Piwik for statistics #}
<script>
var AuthUserDomain = "{{ user.domain() }}";
</script>
{% endif %}
</li>
</ul>
</div>
</div>
</nav>
<main role="main">
{% block main %}
{% endblock main %}
</main>
<footer>
<div class="container">
<div class="row text-light text-center py-4 justify-content-center">
<div class="col-sm-10 col-md-8 col-lg-6">
<img src="/static/images/cara_logo_white_text.png" alt="Logo">
<p><span style="font-size:10px;"><em>CERN strives to deploy its know-how and technologies to help solve
the challenges arising in the local and global fight against COVID-19. As a particle physics
research organisation, CERN is not in a position to advise on medical research, health or health
policy issues. Any initiative is conducted on a best effort and as-is basis, without liability or
warranty.</em></span></p>
<p style="font-size:10px;">
CARA is <a href="https://gitlab.cern.ch/cara/cara/-/blob/master/LICENSE" class="ext">Apache 2.0 licensed</a> open-source
software developed at CERN.
You can find the source code at <a href="https://gitlab.cern.ch/cara/cara">https://gitlab.cern.ch/cara/cara</a>,
where we welcome contributions, feature requests and issue reports.
</p>
</div>
</div>
</div>
</footer>
<script src="/static/js/js_packaged_for_theme.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script>
<script src="/static/js/jquery.colorbox-min.js"></script>
<script src="/static/js/ScrollMagic.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.3/js/bootstrap.min.js" integrity="sha512-8qmis31OQi6hIRgvkht0s6mCOittjMa9GMqtK9hes5iEQBQE/Ca6yGE5FsW36vyipGoWQswBj/QBm2JR086Rkw==" crossorigin="anonymous"></script>
<script src="/static/js/usage-tracking.js"></script>
<!-- Popper JS -->
<script src="/static/js/popper.min.js"></script>
<!-- Font Awesome -->
<script src="/static/js/all.min.js"></script>
{% block body_scripts %}
{% endblock body_scripts %}
</body>
</html>
{# The main layout, this template is intended to be implemented by themes #}
{% extends "base/layout.html.j2" %}

View file

@ -0,0 +1,2 @@
{# The main calculator report, this template is intended to be implemented by themes #}
{% extends "base/userguide.html.j2" %}

View file

@ -72,14 +72,13 @@ class TestBasicApp(tornado.testing.AsyncHTTPTestCase):
class TestCernApp(tornado.testing.AsyncHTTPTestCase):
def get_app(self):
cern_theme = Path(cara.apps.calculator.__file__).parent / 'themes' / 'cern'
cern_theme = Path(cara.apps.calculator.__file__).parent.parent / 'themes' / 'cern'
return cara.apps.calculator.make_app(theme_dir=cern_theme)
@tornado.testing.gen_test(timeout=_TIMEOUT)
def test_report(self):
response = yield self.http_client.fetch(self.get_url('/calculator/baseline-model/result'))
self.assertEqual(response.code, 200)
assert 'CERN HSE' in response.body.decode()
assert 'expected number of new cases is' in response.body.decode()