welco/welco/templates/welco/home.html

53 lines
1.4 KiB
HTML

{% extends "welco/base.html" %}
{% load i18n %}
{% block subheader %}
<div id="subheader">
{% if 'mail' in channels %}
<a class="icon-mail" href="{% url 'home-mail' %}">{% trans 'Mail' %}</a>
{% endif %}
{% if 'phone' in channels %}
<a class="icon-phone" href="{% url 'home-phone' %}">{% trans 'Phone' %}</a>
{% endif %}
</div>
{% endblock %}
{% block bodyargs %}class="welco-home"{% endblock %}
{% block content %}
<div class="all source-{{ source.source_key }}">
<div class="cell document source top">
{{ source.render }}
</div>
<div class="cell kb" data-zone-url="{% url 'kb-zone' %}">
<h2>{% trans 'Knowledge Database' %}</h2>
{{ kb.render }}
</div>
<div class="cell contacts" data-zone-url="{% url 'contacts-zone' %}">
<h2>{% trans 'Contact' %}</h2>
{{ contacts.render }}
</div>
<div class="cell qualif" data-zone-url="{% url 'qualif-zone' %}">
<h2>{% trans 'Qualification' %}</h2>
<div></div>
</div>
</div>
<script>
$('div.cell').delegate('h2', 'click', function() {
$('div.cell').removeClass('top');
$(this).parents('div.cell').addClass('top');
});
$(window).on('resize', function() {
if ($('.top iframe').length == 1) {
$('.top iframe').css('height', 'calc( ' + $('.document').height() + 'px - 7em)');
} else {
$('iframe').css('height', 'calc( ' + $('.document').height() + 'px - 2em)');
}
});
$(window).trigger('resize');
</script>
{% endblock %}