kpsul/kfet/cms/templates/kfetcms/base.html
Aurélien Delobelle 8c6d56b27c Add Wagtail CMS for kfet app.
K-Fêt
- Integrate wagtail to serve "static" pages of old K-Fêt website
- Fixture "kfetcms/kfet_wagtail_17_05" contains a copy of old website
(as in May 2017).
- Media files can be got until end of June 17 at
http://partage.eleves.ens.fr//files/604e6dea2ceebc66b1936c6b3f911744/kfet_media.tar.gz

Login/logout
- Update package django_cas_ng to last version.
- Clean COFCASBackend.
- Change CAS version to 3 (version used on eleves.ens). This enables
the logout redirection (for CAS ofc).
- Add messages and clean existing ones on login/logout (for both
outsider and cas users).

Misc
- Update settings to bypass an incompability between debug-toolbar and
wagtailmenus packages.
- Better management of dev/test-specific urls (if debug-toolbar wasn't in
INSTALLED_APPS, media files were not served).
- UI improvements.
2017-05-30 20:44:30 +02:00

68 lines
1.6 KiB
HTML

{% 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 %}