templates/base.html.twig line 1

Open in your IDE?
  1. {#
  2.    This is the base template used as the application layout which contains the
  3.    common elements and decorates all the other templates.
  4.    See https://symfony.com/doc/current/templates.html#template-inheritance-and-layouts
  5. #}
  6. <!DOCTYPE html>
  7. <html lang="ru">
  8.     <head>
  9.         <meta charset="UTF-8" />
  10.         <meta name="viewport" content="width=device-width, initial-scale=1"/>
  11.         <title>{% block title %}QR-Fabric{% endblock %}</title>
  12.         {% block stylesheets %}
  13.             {{ encore_entry_link_tags('app') }}
  14.         {% endblock %}
  15.         <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
  16.     </head>
  17.     <body id="{% block body_id %}{% endblock %}">
  18.         {% block header %}
  19.             <header>
  20.                 <div class="navbar navbar-default navbar-static-top" role="navigation">
  21.                     <div class="container">
  22.                         <div class="navbar-header col-md-3 col-lg-2">
  23.                             <a class="navbar-brand" href="{{ path('homepage') }}">
  24.                                 Symfony Demo
  25.                             </a>
  26.                             <button type="button" class="navbar-toggle"
  27.                                     data-toggle="collapse"
  28.                                     data-target=".navbar-collapse">
  29.                                 <span class="sr-only">{{ 'menu.toggle_nav'|trans }}</span>
  30.                                 <span class="icon-bar"></span>
  31.                                 <span class="icon-bar"></span>
  32.                                 <span class="icon-bar"></span>
  33.                             </button>
  34.                         </div>
  35.                         <div class="navbar-collapse collapse">
  36.                             <ul class="nav navbar-nav navbar-right">
  37.                                 {% block header_navigation_links %}
  38.                                     <li>
  39.                                         <a href="{{ path('qrSettings') }}">
  40.                                             <i class="fa fa-home" aria-hidden="true"></i> {{ 'menu.homepage'|trans }}
  41.                                         </a>
  42.                                     </li>
  43.                                     {% if is_granted('ROLE_ADMIN') %}
  44.                                         <li>
  45.                                             <a href="{{ path('admin_index') }}">
  46.                                                 <i class="fa fa-lock" aria-hidden="true"></i> {{ 'menu.admin'|trans }}
  47.                                             </a>
  48.                                         </li>
  49.                                     {% endif %}
  50.                                 {% endblock %}
  51.                                 {% if app.user %}
  52.                                     <li class="dropdown">
  53.                                         <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" id="user">
  54.                                             <i class="fa fa-user" aria-hidden="true"></i>
  55.                                             <span class="caret"></span>
  56.                                             <span class="sr-only">{{ app.user.fullname }}</span>
  57.                                         </a>
  58.                                         <ul class="dropdown-menu user" role="menu" aria-labelledby="user">
  59.                                             <li>
  60.                                                 <a href="{{ path('user_edit') }}">
  61.                                                     <i class="fa fa-edit" aria-hidden="true"></i> {{ 'menu.user'|trans }}
  62.                                                 </a>
  63.                                             </li>
  64.                                             <li class="divider"></li>
  65.                                             <li>
  66.                                                 <a href="{{ path('security_logout') }}">
  67.                                                     <i class="fa fa-sign-out" aria-hidden="true"></i> {{ 'menu.logout'|trans }}
  68.                                                 </a>
  69.                                             </li>
  70.                                         </ul>
  71.                                     </li>
  72.                                 {% endif %}
  73.                                 <li class="dropdown">
  74.                                     <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" id="locales">
  75.                                         <i class="fa fa-globe" aria-hidden="true"></i>
  76.                                         <span class="caret"></span>
  77.                                         <span class="sr-only">{{ 'menu.choose_language'|trans }}</span>
  78.                                     </a>
  79.                                     <ul class="dropdown-menu locales" role="menu" aria-labelledby="locales">
  80.                                         {% for locale in locales() %}
  81.                                             <li {% if app.request.locale == locale.code %}aria-checked="true" class="active"{% else %}aria-checked="false"{% endif %} role="menuitem"><a href="{{ path(app.request.get('_route', 'blog_index'), app.request.get('_route_params', [])|merge({_locale: locale.code})) }}">{{ locale.name|capitalize }} <small>{{ locale.code[0:2] }}</small></a></li>
  82.                                         {% endfor %}
  83.                                     </ul>
  84.                                 </li>
  85.                             </ul>
  86.                         </div>
  87.                     </div>
  88.                 </div>
  89.             </header>
  90.         {% endblock %}
  91.         <div class="container body-container">
  92.             {% block body %}
  93.                 <div class="row">
  94.                     <div id="main" class="col-sm-9">
  95.                         {{ include('default/_flash_messages.html.twig') }}
  96.                         {% block main %}{% endblock %}
  97.                     </div>
  98.                     <div id="sidebar" class="col-sm-3">
  99.                         {% block sidebar %}
  100.                             {{ render_esi(controller('Symfony\\Bundle\\FrameworkBundle\\Controller\\TemplateController::templateAction', {
  101.                                 'template': 'blog/about.html.twig',
  102.                                 'sharedAge': 600,
  103.                                 '_locale': app.request.locale
  104.                             })) }}
  105.                         {% endblock %}
  106.                     </div>
  107.                 </div>
  108.             {% endblock %}
  109.         </div>
  110.         {% block footer %}
  111.             <footer>
  112.                 <div class="container">
  113.                     <div class="row">
  114.                         <div id="footer-copyright" class="col-md-6">
  115.                             <p>&copy; {{ 'now'|date('Y') }} - The Symfony Project</p>
  116.                             <p>{{ 'mit_license'|trans }}</p>
  117.                         </div>
  118.                         <div id="footer-resources" class="col-md-6">
  119.                             <p>
  120.                                 <a href="https://twitter.com/symfony" title="Symfony Twitter">
  121.                                     <i class="fa fa-twitter" aria-hidden="true"></i>
  122.                                 </a>
  123.                                 <a href="https://www.facebook.com/SensioLabs" title="SensioLabs Facebook">
  124.                                     <i class="fa fa-facebook" aria-hidden="true"></i>
  125.                                 </a>
  126.                                 <a href="https://symfony.com/blog/" title="Symfony Blog">
  127.                                     <i class="fa fa-rss" aria-hidden="true"></i>
  128.                                 </a>
  129.                             </p>
  130.                         </div>
  131.                     </div>
  132.                 </div>
  133.             </footer>
  134.         {% endblock %}
  135.         {% block javascripts %}
  136.             {{ encore_entry_script_tags('app') }}
  137.         {% endblock %}
  138.         {# it's not mandatory to set the timezone in localizeddate(). This is done to
  139.            avoid errors when the 'intl' PHP extension is not available and the application
  140.            is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
  141.         <!-- Page rendered on {{ 'now'|format_datetime('long', 'long', '', 'UTC') }} -->
  142.     </body>
  143. </html>