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
@@ -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 }}';
|
||||
|
||||
Reference in new issue
Block a user