Merge pull request #4272 from Simounet/feat/load-custom-css-only-if-exists

Load custom.css only if exists
This commit is contained in:
Jérémy Benoist
2020-03-28 16:49:29 +01:00
committed by GitHub
5 changed files with 18 additions and 10 deletions

View File

@ -44,7 +44,9 @@
{% block css %}
{% endblock %}
<link rel="stylesheet" href="{{ asset('custom.css') }}">
{% if asset_file_exists('custom.css') %}
<link rel="stylesheet" href="{{ asset('custom.css') }}">
{% endif %}
{% block scripts %}
<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
<script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>