Add IE11 banner to frontend (#4207)

This commit is contained in:
Raphael Michel
2024-06-10 14:29:17 +02:00
committed by GitHub
parent 93dd6bf34d
commit ebda10542e
4 changed files with 26 additions and 2 deletions

View File

@@ -327,8 +327,7 @@
{% endblocktrans %}
{% blocktrans trimmed %}
Internet Explorer is an old browser that does not support lots of recent web-based
technologies. While some features might already not work properly, we plan on no longer
supporting Internet Explorer in our administrative backend in the next months.
technologies and is no longer supported by this website.
{% endblocktrans %}
{% blocktrans trimmed %}
We kindly ask you to move to one of our supported browsers, such as Microsoft Edge,

View File

@@ -182,4 +182,6 @@ def _default_context(request):
ctx['settings'] = pretix_settings
ctx['django_settings'] = settings
ctx['ie_deprecation_warning'] = 'MSIE' in request.headers.get('User-Agent', '') or 'Trident/' in request.headers.get('User-Agent', '')
return ctx

View File

@@ -46,6 +46,22 @@
<body class="nojs" data-locale="{{ request.LANGUAGE_CODE }}" data-now="{% now "U.u" %}" data-datetimeformat="{{ js_datetime_format }}" data-timeformat="{{ js_time_format }}" data-dateformat="{{ js_date_format }}" data-datetimelocale="{{ js_locale }}" data-currency="{{ request.event.currency }}">
{{ html_page_header|safe }}
<header>
{% if ie_deprecation_warning %}
<div class="old-browser-warning">
<span class="fa fa-internet-explorer"></span>
{% blocktrans trimmed %}
We've detected that you are using <strong>Microsoft Internet Explorer</strong>.
{% endblocktrans %}
{% blocktrans trimmed %}
Internet Explorer is an old browser that does not support lots of recent web-based
technologies and is no longer supported by this website.
{% endblocktrans %}
{% blocktrans trimmed %}
We kindly ask you to move to one of our supported browsers, such as Microsoft Edge,
Mozilla Firefox, Google Chrome, or Safari.
{% endblocktrans %}
</div>
{% endif %}
{% block above %}
{% endblock %}
</header>

View File

@@ -519,6 +519,13 @@ h2 .label {
.progress-bar-#{$i} { width: 1% * $i; }
}
.old-browser-warning {
background-color: #ffe761;
padding: 32px; /* 30px + 2px optical compensation */
font-size: 30px;
}
@import "_iframe.scss";
@import "_a11y.scss";
@import "_print.scss";