]> Raphaël G. Git Repositories - blogbundle/commitdiff
Switch to custom stylesheet and javascript twig extension
authorRaphaël Gertz <git@rapsys.eu>
Sun, 25 Feb 2018 05:24:24 +0000 (06:24 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Sun, 25 Feb 2018 05:24:24 +0000 (06:24 +0100)
Fix title
Fix favicon
Add alternative version

Resources/views/base.html.twig

index 0a405308f4eb5c9987543e67c2d80e2b2cc2e713..37ec4a1b18c0e2f6d1faf3876abf95d85d8e255e 100644 (file)
@@ -2,19 +2,24 @@
 <html>
        <head>
                <meta charset="UTF-8" />
-               <title>{% block title %}Welcome!{% endblock %} - Devlog</title>
+               <title>{% block title %}{{ title }}{% endblock %}</title>
                <meta name="viewport" content="width=device-width, initial-scale=1" />
-               {% block stylesheets %}
-                       {% stylesheets '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/Resources/public/css/{reset,screen}.css' filter='toto' %}
+               {% block stylesheet %}
+                       {% stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysBlogBundle/Resources/public/css/{reset,screen}.css' %}
                                <link href="{{ asset_url }}" type="text/css" rel="stylesheet" />
-                       {% endstylesheets %}
+                       {% endstylesheet %}
                {% endblock %}
-               {% block javascripts %}
-                       {% javascripts '@RapsysBlogBundle/Resources/js/*.js' output='js/compiled/main.js' %}
+               <!--{% block javascript %}
+                       {% javascript '@RapsysBlogBundle/Resources/public/js/*.js' %}
                                <script src="{{ asset_url }}"></script>
-                       {% endjavascripts %}
+                       {% endjavascript %}
+               {% endblock %}-->
+               <link rel="icon" type="image/png" href="{{ asset('bundles/rapsysblog/png/favicon.png') }}" sizes="192x192" />
+               <link rel="shortcut icon" type="image/x-icon" href="{{ asset('bundles/rapsysblog/ico/favicon.ico') }}" />
+               {% block alternate %}
+                       <link rel="alternate" href="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge(app.request.query.all|merge({'_locale': 'en'}))) }}" hreflang="en"/>
+                       <link rel="alternate" href="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')|merge(app.request.query.all|merge({'_locale': 'fr'}))) }}" hreflang="fr"/>
                {% endblock %}
-               <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
        </head>
        {% block body %}<body></body>{% endblock %}
 </html>