kpsul/kfet/cms/templates/kfetcms/base.html

69 lines
1.6 KiB
HTML
Raw Normal View History

{% extends "kfet/base.html" %}
{% load static %}
{% load wagtailuserbar %}
{% load wagtailcore_tags %}
{% block extra_head %}
<link rel="stylesheet" type="text/css" href="{% static "kfetcms/css/index.css" %}">
{% endblock %}
{% block title %}{{ page.seo_title }}{% endblock %}
{% block header-class %}text-center{% endblock %}
{% block header-title %}{{ page.title }}{% endblock %}
{% block content %}
<div class="row row-messages">
{% include "kfet/base_messages.html" %}
</div>
<div class="row column-row">
<div class="cms-column {% block col-size %}column-md-2{% endblock %}">
<div class="cms-content">
{% block block1-content %}
{% endblock %}
{% block block2-content %}
{{ page.content|richtext }}
{% endblock %}
{% block block3-content %}
{% endblock %}
</div>
</div>
</div>
{% wagtailuserbar %}
<script type="text/javascript">
$( function() {
// Titles and their following elements (until next title) are unbreakable.
// This workaround should not be necessary if we use StreamField instead of
// RichTextField in wagtail pages.
$('.cms-content h2, .cms-content h3').filter( function() {
return $(this).closest('.unbreakable').length == 0;
})
.each( function() {
let elt = $('<div>', {class: "unbreakable"});
$(this).before(elt);
let current = $(this);
while (current.length !== 0) {
let next = current.next(':not(h2, h3)');
current.appendTo(elt);
current = next;
}
});
});
</script>
{% endblock %}
{% block footer %}
{% include "kfet/base_footer.html" %}
{% endblock %}