mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: allow manually set legacy mode
This commit is contained in:
1 parent
e5de4f101b
commit
cca5cb895e
6 files changed
+32
-18
No files matched your search
@@ -1,5 +1,5 @@
|
||||
{% macro render() %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
|
||||
<noscript><div class="section__body no-padding">
|
||||
<blockquote class="warn">
|
||||
<p>{{ _('This page needs JavaScript to work.') }}</p>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
--code-font-family: "{{ UserContext.codeFontFamily }}", "monaco", "Source Code Pro", "Consolas", "Lucida Console", "monospace";
|
||||
--font-ligatures: {{ "normal" if UserContext.codeFontLigatures else "none" }} !important;
|
||||
}
|
||||
{% if not isIE(handler.request.headers['user-agent']) %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
|
||||
#panel { display: flex; flex-direction: column; }
|
||||
{% endif %}
|
||||
</style>
|
||||
@@ -42,7 +42,7 @@
|
||||
<link rel="stylesheet" media="all" href="{{ UiContext.cdn_prefix }}default-{{ global.Hydro.version['ui-default'] }}.theme.css">
|
||||
<link rel="stylesheet" media="all" href="{{ UiContext.cdn_prefix }}hydro.css">
|
||||
{% endif %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
|
||||
<script>
|
||||
var _htmlNode = document.documentElement;
|
||||
_htmlNode.className = _htmlNode.className.replace(' nojs', ' hasjs');
|
||||
@@ -59,7 +59,7 @@
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}{% endblock %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) %}
|
||||
{% if not isIE(handler.request.headers['user-agent']) and not handler.session.legacy %}
|
||||
<script>
|
||||
var UiContext = '{{ UiContext|json|jsesc|safe }}';
|
||||
var UserContext = '{{ UserContext|json|jsesc|safe }}';
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
{%- endfor -%}
|
||||
</ol>
|
||||
</li>
|
||||
<li class="footer__extra-link-item"><a href="/legacy?legacy=true">{{ _('Enable legacy mode') }}</a></li>
|
||||
<li class="footer__extra-link-item nojs--hide" data-dropdown-target="#menu-footer-theme">
|
||||
<span><span class="icon icon-global"></span> {{ _('Theme') }} <span class="icon icon-expand_less"></span></span>
|
||||
<ol class="dropdown-target menu" id="menu-footer-theme">
|
||||
|
||||
Reference in new issue
Block a user