Wrap notifications HTML code into a block
This block is override in error pages to be none and do not show notifications on these pages.humitos/mkdocs/theme-config
parent
017f5817e1
commit
a341a4482f
|
@ -10,6 +10,8 @@
|
|||
{% include "error_header.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block notify %}{% endblock %}
|
||||
|
||||
{# Hide the language select form so we don't set a CSRF cookie #}
|
||||
{% block language-select-form %}{% endblock %}
|
||||
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
{% include "error_header.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block notify %}{% endblock %}
|
||||
|
||||
{# Hide the language select form so we don't set a CSRF cookie #}
|
||||
{% block language-select-form %}{% endblock %}
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}
|
||||
{% trans "Server Error" %}
|
||||
{% endblock %}
|
||||
{% block title %}
|
||||
{% trans "Server Error" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block header-wrapper %}
|
||||
{% include "error_header.html" %}
|
||||
{% endblock %}
|
||||
{% block header-wrapper %}
|
||||
{% include "error_header.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block notify %}{% endblock %}
|
||||
|
||||
{# Hide the language select form so we don't set a CSRF cookie #}
|
||||
{% block language-select-form %}{% endblock %}
|
||||
|
|
|
@ -84,15 +84,19 @@
|
|||
<div id="content">
|
||||
<div class="wrapper">
|
||||
|
||||
{% if messages %}
|
||||
<ul class="notifications">
|
||||
{% for message in messages %}
|
||||
<li class="notification notification-{{ message.level }}" {% if message.pk %}data-dismiss-url="{% url 'message_mark_read' message.pk %}{% endif %}">
|
||||
{{ message }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<!-- BEGIN notify -->
|
||||
{% block notify %}
|
||||
{% if messages %}
|
||||
<ul class="notifications">
|
||||
{% for message in messages %}
|
||||
<li class="notification notification-{{ message.level }}" {% if message.pk %}data-dismiss-url="{% url 'message_mark_read' message.pk %}{% endif %}">
|
||||
{{ message }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
<!-- END notify -->
|
||||
|
||||
{% block content-header %}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue