]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/base.html.twig
Load custom.css only if exists
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / base.html.twig
index aa388bcbcbd3d5a2e062f8e1f5ab122822435589..2486172d5f6be810376cab683ecd0bb6248e3d29 100644 (file)
@@ -1,13 +1,15 @@
 <!DOCTYPE html>
-<!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="en"><![endif]-->
-<!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="en"><![endif]-->
-<!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]-->
-<!--[if gt IE 8]><html class="no-js" lang="en"><![endif]-->
-<html>
+{% set lang = app.request.locale|default('') -%}
+<!--[if lte IE 6]><html class="no-js ie6 ie67 ie678"{% if lang is not empty %} lang="{{ lang }}"{% endif %}><![endif]-->
+<!--[if lte IE 7]><html class="no-js ie7 ie67 ie678"{% if lang is not empty %} lang="{{ lang }}"{% endif %}><![endif]-->
+<!--[if IE 8]><html class="no-js ie8 ie678"{% if lang is not empty %} lang="{{ lang }}"{% endif %}><![endif]-->
+<!--[if gt IE 8]><html class="no-js"{% if lang is not empty %} lang="{{ lang }}"{% endif %}><![endif]-->
+<html{% if lang is not empty %} lang="{{ lang }}"{% endif %}>
     <head>
         {% block head %}
             <meta name="viewport" content="initial-scale=1.0">
             <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+            <meta name="referrer" content="strict-origin-when-cross-origin">
             <!--[if IE]>
             <meta http-equiv="X-UA-Compatible" content="IE=10">
             <![endif]-->
@@ -42,6 +44,9 @@
 
             {% block css %}
             {% endblock %}
+            {% 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>