ui: 优化资源加载

This commit is contained in:
undefined committed 2021-09-01 20:27:30 +08:00
1 parent fffacdc63c
commit c8a0d48a41
7 files changed
+111 -143

No files matched your search

@@ -2,7 +2,7 @@
{% if udoc %}
<span class="user-profile-link">
{% if avatar %}
<img class="small user-profile-avatar v-center" src="{{ avatarUrl(udoc.avatar|default('')) }}" width="20" height="20">
<img class="small user-profile-avatar v-center" loading="lazy" src="{{ avatarUrl(udoc.avatar|default('')) }}" width="20" height="20">
{% endif %}
<a class="user-profile-name" href="{{ url('user_detail', uid=udoc._id) }}">
{% if udoc.displayName and udoc.displayName != udoc.uname %}
-13
View File
@@ -1,13 +0,0 @@
/* {% if nav_logo_dark %} */
.nav__logo {
background-image: url({{nav_logo_dark}}) !important
}
/* {% endif %} */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 1.5dppx), only screen and (min-resolution: 144dpi) {
/* {% if nav_logo_dark_2x %} */
.nav__logo, .header--mobile__domain {
background-image: url({{nav_logo_dark_2x}}) !important
}
/* {% endif %} */
}
@@ -26,9 +26,9 @@
{% endblock %}
{% if not isIE(handler.request.headers['user-agent']) %}
<script src="{{ static_url((handler.user|default({})).theme|default('default') + '.theme.js') }}"></script>
<script type="text/javascript" src="{{ static_url('hydro.js') }}"></script>
{% endif %}
<link rel="stylesheet" media="all" href="{{ static_url((handler.user|default({})).theme|default('default') + '.theme.css') }}">
<link rel="stylesheet" media="all" href="{{ url('ui_extracss') }}">
<title>{{ handler.renderTitle(page_name) }}</title>
{% if not isIE(handler.request.headers['user-agent']) %}
<script>
@@ -46,9 +46,6 @@
UiContext = '{{ UiContext|json|jsesc|safe }}';
UserContext = '{{ UserContext|json|jsesc|safe }}';
</script>
<script type="text/javascript" src="{{ ('/locale/{0}.js'.format(handler.translate('__id'))) }}"></script>
<script type="text/javascript" src="/ui-constants.js"></script>
<script type="text/javascript" src="{{ static_url('hydro.js') }}"></script>
{% endif %}
</body>
</html>