Use the new layout template for both the form and the index page.
This commit is contained in:
parent
a235fb2f5d
commit
2b8f44b7dd
4 changed files with 43 additions and 41 deletions
|
|
@ -53,7 +53,7 @@ class LandingPage(RequestHandler):
|
|||
import jinja2
|
||||
p = Path(__file__).parent.parent / "templates"
|
||||
env = jinja2.Environment(loader=jinja2.FileSystemLoader(Path(p)))
|
||||
template = env.get_template("layout.html.j2")
|
||||
template = env.get_template("index.html.j2")
|
||||
report = template.render(**{})
|
||||
self.finish(report)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
{% extends "layout.html.j2" %}
|
||||
|
||||
{% set CALCULATOR_ACTIVE=1 %}
|
||||
|
||||
{% block extra_headers %}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.css" integrity="sha512-aOG0c6nPNzGk+5zjwyJaoRUgCdOrfSDhmMID2u4+OIslr0GjpLKo7Xm0Ao3xmpM4T8AmIouRkqwj1nrdVsLKEQ==" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="/calculator/static/css/form.css">
|
||||
|
|
|
|||
38
cara/apps/templates/index.html.j2
Normal file
38
cara/apps/templates/index.html.j2
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{% extends "layout.html.j2" %}
|
||||
{% set HOME_ACTIVE=1 %}
|
||||
|
||||
{% block main %}
|
||||
<div class="field--item">
|
||||
<div class="component-row component-row__display__fluidcenter section-navigation effect_none">
|
||||
<div class="component-row__row">
|
||||
<div class="component-row__column component-row__center section-has-no-column col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box-effects-wrapper ">
|
||||
|
||||
|
||||
<div class="text-component text-component-page clearfix">
|
||||
<h2 class="text-component-title">
|
||||
CARA: COVID Area Risk Assessment Tools
|
||||
</h2>
|
||||
<div class="text-component-text cern_full_html">
|
||||
<p>
|
||||
Please try out the CARA COVID calculator <a href="/calculator">here</a>.
|
||||
Your feedback is most welcome at <a href="mailto:CARA-dev@cern.ch">CARA-dev@cern.ch</a>
|
||||
<span style="height: 35vh; display: block;"></span>
|
||||
</p>
|
||||
<span style="min-height: 50vh; height: 100%;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a class="endof-cern-header-blocks"></a>
|
||||
|
||||
</div>
|
||||
{% endblock main %}
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
|
||||
<ul class="nav navbar-nav">
|
||||
<li>
|
||||
<a href="/" data-drupal-link-system-path="<front>" class="is-active">Home</a>
|
||||
<a href="/" data-drupal-link-system-path="<front>" {{ 'class="is-active"' if HOME_ACTIVE else '' }}>Home</a>
|
||||
</li>
|
||||
|
||||
<!-- <li>
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
</li> -->
|
||||
|
||||
<li>
|
||||
<a href="/calculator" data-drupal-link-system-path="node/22">COVID Calculator</a>
|
||||
<a href="/calculator" data-drupal-link-system-path="node/22" {{ 'class="is-active"' if CALCULATOR_ACTIVE else '' }}>COVID Calculator</a>
|
||||
</li>
|
||||
|
||||
<!-- <li class="dropdown">
|
||||
|
|
@ -178,44 +178,6 @@
|
|||
|
||||
<main role="main">
|
||||
{% block main %}
|
||||
<div class="field--item">
|
||||
<div class="component-row component-row__display__fluidcenter section-navigation effect_none">
|
||||
<div class="component-row__row">
|
||||
<div class="component-row__column component-row__center section-has-no-column col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="box-effects-wrapper ">
|
||||
|
||||
|
||||
<div class="text-component text-component-page clearfix">
|
||||
<h2 class="text-component-title">
|
||||
CARA: COVID Area Risk Assessment Tools
|
||||
</h2>
|
||||
<div class="text-component-text cern_full_html">
|
||||
<!-- <p class="text-align-justify">CERN’s Director-General <a href="https://againstcovid19.cern/articles/cern-against-covid-19-task-force-launch-message-directorate">established</a> the <strong><i>CERN against COVID-19</i></strong> task force in March 2020 to collect and coordinate ideas and contributions from the CERN community of over 18 000 people worldwide to the societal fight against the COVID-19 pandemic. These initiatives will draw on scientific and technical expertise and facilities at CERN, in the Member State countries and beyond, and will be carried out with that community and in close contacts with the relevant health institutions and experts from other fields.</p>
|
||||
|
||||
<p class="text-align-justify">We have been very encouraged by the hundreds of emails we have received, and the enthusiasm of the community. Ideas range from the deployment of CERN’s powerful computing, engineering and technical resources to contribute to the global fight against COVID-19, to assisting the local effort through logistical and emergency response support.</p>
|
||||
|
||||
<p class="text-align-justify">The objective of the <strong><i>CERN against COVID-19</i> </strong>initiative is to ensure effective and well-coordinated action, drawing on CERN’s many competencies and advanced technologies and working closely with experts in healthcare, drug development, epidemiology and emergency response so as to maximise the impact of our contributions. Proposals and ideas can be made by members of the CERN community via the form at the bottom of this page. Questions for the task force may be submitted via email to <a href="mailto:fight-covid@cern.ch" class="mailto" data-extlink="">fight-covid@cern.ch<svg focusable="false" class="mailto" role="img" aria-label="(link sends email)" xmlns="http://www.w3.org/2000/svg" viewBox="0 10 70 20"><metadata><sfw xmlns="http://ns.adobe.com/SaveForWeb/1.0/"><slicesourcebounds y="-8160" x="-8165" width="16389" height="16384" bottomleftorigin="true"></slicesourcebounds><optimizationsettings><targetsettings targetsettingsid="0" fileformat="PNG24Format"><png24format transparency="true" filtered="false" interlaced="false" nomattecolor="false" mattecolor="#FFFFFF"></png24format></targetsettings></optimizationsettings></sfw></metadata><title>(link sends email)</title><path d="M56 14H8c-1.1 0-2 0.9-2 2v32c0 1.1 0.9 2 2 2h48c1.1 0 2-0.9 2-2V16C58 14.9 57.1 14 56 14zM50.5 18L32 33.4 13.5 18H50.5zM10 46V20.3l20.7 17.3C31.1 37.8 31.5 38 32 38s0.9-0.2 1.3-0.5L54 20.3V46H10z"></path></svg></a>. We will do our best to answer all of them.</p> -->
|
||||
<p>
|
||||
Please try out the CARA COVID calculator <a href="/calculator">here</a>.
|
||||
Your feedback is most welcome at <a href="mailto:CARA-dev@cern.ch">CARA-dev@cern.ch</a>
|
||||
<span style="height: 35vh; display: block;"></span>
|
||||
</p>
|
||||
<span style="min-height: 50vh; height: 100%;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<a class="endof-cern-header-blocks"></a>
|
||||
|
||||
</div>
|
||||
{% endblock main %}
|
||||
</main>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue