|
4 | 4 | <meta charset="UTF-8">
|
5 | 5 | <title>{% if title %}{{ title }} - {% endif %}API Platform</title>
|
6 | 6 |
|
7 |
| - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700"> |
8 |
| - <link rel="stylesheet" href="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui.css') }}"> |
9 |
| - <link rel="stylesheet" href="{{ asset('bundles/apiplatform/style.css') }}"> |
10 |
| - |
| 7 | + {% block stylesheet %} |
| 8 | + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700"> |
| 9 | + <link rel="stylesheet" href="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui.css') }}"> |
| 10 | + <link rel="stylesheet" href="{{ asset('bundles/apiplatform/style.css') }}"> |
| 11 | + {% endblock %} |
| 12 | + |
11 | 13 | {# json_encode(65) is for JSON_UNESCAPED_SLASHES|JSON_HEX_TAG to avoid JS XSS #}
|
12 | 14 | <script id="swagger-data" type="application/json">{{ swagger_data|json_encode(65)|raw }}</script>
|
13 | 15 | </head>
|
|
74 | 76 | </div>
|
75 | 77 | </div>
|
76 | 78 |
|
77 |
| -{% if (reDocEnabled and not swaggerUiEnabled) or (reDocEnabled and 're_doc' == active_ui) %} |
78 |
| - <script src="{{ asset('bundles/apiplatform/redoc/redoc.standalone.js') }}"></script> |
79 |
| - <script src="{{ asset('bundles/apiplatform/init-redoc-ui.js') }}"></script> |
80 |
| -{% elseif (swaggerUiEnabled) %} |
81 |
| - <script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-bundle.js') }}"></script> |
82 |
| - <script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-standalone-preset.js') }}"></script> |
83 |
| - <script src="{{ asset('bundles/apiplatform/init-swagger-ui.js') }}"></script> |
84 |
| -{% endif %} |
| 79 | +{% block javascript %} |
| 80 | + {% if (reDocEnabled and not swaggerUiEnabled) or (reDocEnabled and 're_doc' == active_ui) %} |
| 81 | + <script src="{{ asset('bundles/apiplatform/redoc/redoc.standalone.js') }}"></script> |
| 82 | + <script src="{{ asset('bundles/apiplatform/init-redoc-ui.js') }}"></script> |
| 83 | + {% elseif (swaggerUiEnabled) %} |
| 84 | + <script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-bundle.js') }}"></script> |
| 85 | + <script src="{{ asset('bundles/apiplatform/swagger-ui/swagger-ui-standalone-preset.js') }}"></script> |
| 86 | + <script src="{{ asset('bundles/apiplatform/init-swagger-ui.js') }}"></script> |
| 87 | + {% endif %} |
| 88 | +{% endblock %} |
85 | 89 |
|
86 | 90 | </body>
|
87 | 91 | </html>
|
0 commit comments