aboutsummaryrefslogtreecommitdiff
path: root/design/templates/pages/page.html
blob: 3feff7564b49af810537c51921d964ccd75f5855 (plain)
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
{% extends 'base.html' %}
{% block content %}
<main>
    <h1>{{page.title}}</h1>
    {{page.body_html|safe}}
</main>
{% endblock %}

{% block extra %}
{% if login_form %}
<div class="overlay-content" id="js-overlay-content" style="display: none;">
    {% include 'lib/login.html' with form=login_form %}
</div>
{% endif %}
{%endblock%}
{% block jsdomready %}
{% if login_form %}
  // Select your overlay trigger
  var trigger = document.querySelector('#overlay-trigger');
  trigger.addEventListener('click', function(e){
    e.preventDefault();
    novicell.overlay.create({
      'selector': trigger.getAttribute('data-element'),
      'class': 'selector-overlay',
      "onCreate": function() { console.log('created'); },
      "onLoaded": function() { console.log('loaded'); },
      "onDestroy": function() { console.log('Destroyed'); }
    });
  });
{% endif %}
{%endblock%}