mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Use HTTP2 preload for always used CSS and JS files.
This commit is contained in:
parent
5782ef70fb
commit
6882f91ef2
3 changed files with 14 additions and 10 deletions
|
@ -11,6 +11,7 @@
|
|||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"doctrine/annotations": "^1.6",
|
||||
"doctrine/doctrine-bundle": "^1.12",
|
||||
"florianv/swap": "^4.0",
|
||||
"friendsofsymfony/ckeditor-bundle": "^2.0",
|
||||
"gregwar/captcha-bundle": "dev-master",
|
||||
|
@ -51,8 +52,7 @@
|
|||
"twig/extra-bundle": "^3.0",
|
||||
"twig/inky-extra": "^3.0",
|
||||
"twig/intl-extra": "^3.0",
|
||||
"webmozart/assert": "^1.4",
|
||||
"doctrine/doctrine-bundle": "^1.12"
|
||||
"webmozart/assert": "^1.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"dama/doctrine-test-bundle": "^5.0",
|
||||
|
|
2
composer.lock
generated
2
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "5b16a7920092123e0428568b1a22b433",
|
||||
"content-hash": "9660d2f97bab13484c770ab738af0e6c",
|
||||
"packages": [
|
||||
{
|
||||
"name": "clue/stream-filter",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<link rel="manifest" href="{{ asset('manifest.json') }}">
|
||||
<link rel="manifest" href="{{ preload(asset('manifest.json'), {as: 'manifest'}) }}">
|
||||
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
@ -37,14 +37,17 @@
|
|||
{% set theme = app.user.theme %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
{% if theme %}
|
||||
<link rel="stylesheet" href="{{ asset('build/themes/' ~ theme ~ '.css') }}">
|
||||
<link rel="stylesheet" href="{{ preload(asset('build/themes/' ~ theme ~ '.css'), {as: 'style'}) }}">
|
||||
{% else %}
|
||||
<link rel="stylesheet" href="{{ asset('build/themes/bootstrap.css') }}">
|
||||
<link rel="stylesheet" href="{{ preload(asset('build/themes/bootstrap.css'), {as: 'style'}) }}">
|
||||
{% endif %}
|
||||
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
|
||||
{% for css in encore_entry_css_files('app') %}
|
||||
<link rel="stylesheet" href="{{ preload(asset(css), {as: 'style'}) }}">
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
@ -116,8 +119,9 @@
|
|||
|
||||
{% endblock %}
|
||||
{% block javascripts %}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
|
||||
{% for js in encore_entry_js_files('app') %}
|
||||
<script src="{{ preload(asset(js), {as: 'script'}) }}"></script>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue