templates/layout.html.twig line 1

Open in your IDE?
  1. {%- set app_logo_lg_src = app_logo_lg_src|default(asset('bundles/emprelewftemplate/assets/static/images/logo_pcr_lg.png', 'ewftemplate')) -%}
  2. {%- set app_logo2_lg_src = app_logo2_lg_src|default(asset('images/logo.svg')) -%}
  3. {%- set app_logo_mini_src = app_logo_mini_src|default(asset('bundles/emprelewftemplate/assets/static/images/logo_pcr_mini.png', 'ewftemplate')) -%}
  4. {%- set app_logo_alt = app_logo_alt|default('Logomarca da Prefeitura da Cidade do Recife') -%}
  5. {%- set favicon_href = favicon_href|default(asset('bundles/emprelewftemplate/assets/static/images/favicon.ico', 'ewftemplate')) -%}
  6. {%- set has_manifest = has_manifest is defined ? has_manifest : false -%}
  7. {%- set has_authentication = has_authentication is defined ? has_authentication : true -%}
  8. {%- set manifest_href = manifest_href|default('') -%}
  9. {%- set has_service_worker = has_service_worker is defined ? has_service_worker : false -%}
  10. {%- set service_worker_href = service_worker_href|default('') -%}
  11. {%- set app_name = app_name|default('EWF-HTML') -%}
  12. {%- set app_home_href = app_home_href|default('#') -%}
  13. {%- set is_authenticated = is_authenticated is defined ? is_authenticated : false -%}
  14. {%- set authenticated_name = authenticated_name|default('Usuário') -%}
  15. {%- set authenticated_username = authenticated_username|default('') -%}
  16. {%- set authenticated_profile_href = authenticated_profile_href|default(null) -%}
  17. {%- set authenticated_profile_image_src = authenticated_profile_image_src|default(asset('bundles/emprelewftemplate/assets/static/images/user.png', 'ewftemplate')) -%}
  18. {%- set authenticated_login_href = authenticated_login_href|default('#') -%}
  19. {%- set authenticated_logout_href = authenticated_logout_href|default('#') -%}
  20. {%- set can_login = can_login is defined ? can_login : false -%}
  21. {%- set has_control_sidebar = has_control_sidebar is defined ? has_control_sidebar : false -%}
  22. {%- set show_preload = show_preload is defined ? show_preload : false -%}
  23. {%- set is_error_page = is_error_page is defined ? is_error_page : false -%}
  24. {%- set wpa_title = wpa_title|default(app_name) -%}
  25. {%- set prepend_javascripts = prepend_javascripts is defined ? prepend_javascripts : false -%}
  26. <!DOCTYPE html>
  27. <html class="no-js">
  28.     <head>
  29.         <meta charset="utf-8">
  30.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  31.         <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  32.         <link rel="icon" href="{{- favicon_href|e('html_attr') -}}"/>
  33.         {% block manifest %}
  34.             {% if has_manifest %}
  35.                 <link rel="manifest" href="{{- manifest_href|e('html_attr') -}}">
  36.             {% endif %}
  37.         {% endblock %}
  38.         
  39.         {% block manifest_icons_meta %}
  40.             {% if has_manifest %}
  41.                 <!-- iPhone(first generation or 2G), iPhone 3G, iPhone 3GS -->
  42.                 <link rel="apple-touch-icon" sizes="57x57" href="{{ asset('bundles/emprelewftemplate/assets/static/images/touch-icon-iphone.png', 'ewftemplate') }}">
  43.                 <!-- iPad and iPad mini @1x -->
  44.                 <link rel="apple-touch-icon" sizes="76x76" href="{{ asset('bundles/emprelewftemplate/assets/static/images/touch-icon-ipad.png', 'ewftemplate') }}">
  45.                 <!-- iPhone 4, iPhone 4s, iPhone 5, iPhone 5c, iPhone 5s, iPhone 6, iPhone 6s, iPhone 7, iPhone 7s, iPhone8 -->
  46.                 <link rel="apple-touch-icon" sizes="120x120" href="{{ asset('bundles/emprelewftemplate/assets/static/images/touch-icon-iphone-retina.png', 'ewftemplate') }}">
  47.                 <!-- iPad and iPad mini @2x -->
  48.                 <link rel="apple-touch-icon" sizes="152x152" href="{{ asset('bundles/emprelewftemplate/assets/static/images/touch-icon-ipad-retina.png', 'ewftemplate') }}">
  49.                 <!-- iPad Pro -->
  50.                 <link rel="apple-touch-icon" sizes="167x167" href="{{ asset('bundles/emprelewftemplate/assets/static/images/touch-icon-ipad-pro.png', 'ewftemplate') }}">
  51.                 <!-- iPhone X, iPhone 8 Plus, iPhone 7 Plus, iPhone 6s Plus, iPhone 6 Plus -->
  52.                 <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('bundles/emprelewftemplate/assets/static/images/touch-icon-iphone-6-plus.png', 'ewftemplate') }}">
  53.                 <meta name="mobile-web-app-capable" content="yes" />
  54.                 <meta name="apple-touch-fullscreen" content="yes" />
  55.                 <meta name="apple-mobile-web-app-title" content="{{ wpa_title|e('html_attr') }}" />
  56.                 <meta name="apple-mobile-web-app-capable" content="yes" />
  57.                 <meta name="apple-mobile-web-app-status-bar-style" content="default" />
  58.                 <link href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_2048.png', 'ewftemplate') }}" sizes="2048x2732" rel="apple-touch-startup-image" />
  59.                 <link href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1668.png', 'ewftemplate') }}" sizes="1668x2224" rel="apple-touch-startup-image" />
  60.                 <link href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1536.png', 'ewftemplate') }}" sizes="1536x2048" rel="apple-touch-startup-image" />
  61.                 <link href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1125.png', 'ewftemplate') }}" sizes="1125x2436" rel="apple-touch-startup-image" />
  62.                 <link href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1242.png', 'ewftemplate') }}" sizes="1242x2208" rel="apple-touch-startup-image" />
  63.                 <link href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_750.png', 'ewftemplate') }}" sizes="750x1334" rel="apple-touch-startup-image" />
  64.                 <link href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_640.png', 'ewftemplate') }}" sizes="640x1136" rel="apple-touch-startup-image" />
  65.                 <link
  66.                         rel="apple-touch-startup-image"
  67.                         media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)"
  68.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_828x1792.png', 'ewftemplate') }}"
  69.                 />
  70.                 <link
  71.                         rel="apple-touch-startup-image"
  72.                         media="screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)"
  73.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1242x2688.png', 'ewftemplate') }}"
  74.                 />
  75.                 <link
  76.                         rel="apple-touch-startup-image"
  77.                         media="screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)"
  78.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1125x2436.png', 'ewftemplate') }}"
  79.                 />
  80.                 <link
  81.                         rel="apple-touch-startup-image"
  82.                         media="screen and (device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)"
  83.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1242x2208.png', 'ewftemplate') }}"
  84.                 />
  85.                 <link
  86.                         rel="apple-touch-startup-image"
  87.                         media="screen and (device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)"
  88.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_750x1334.png', 'ewftemplate') }}"
  89.                 />
  90.                 <link
  91.                         rel="apple-touch-startup-image"
  92.                         media="screen and (device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)"
  93.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_2048x2732.png', 'ewftemplate') }}"
  94.                 />
  95.                 <link
  96.                         rel="apple-touch-startup-image"
  97.                         media="screen and (device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)"
  98.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1668x2224.png', 'ewftemplate') }}"
  99.                 />
  100.                 <link
  101.                         rel="apple-touch-startup-image"
  102.                         media="screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"
  103.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_640x1136.png', 'ewftemplate') }}"
  104.                 />
  105.                 <link
  106.                         rel="apple-touch-startup-image"
  107.                         media="screen and (device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)"
  108.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1668x2388.png', 'ewftemplate') }}"
  109.                 />
  110.                 <link
  111.                         rel="apple-touch-startup-image"
  112.                         media="screen and (device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)"
  113.                         href="{{ asset('bundles/emprelewftemplate/assets/static/images/apple_splash_1536x2048.png', 'ewftemplate') }}"
  114.                 />
  115.             {% endif %}
  116.         {% endblock %}
  117.         {% block meta_tags %}
  118.         {% endblock %}
  119.         <title>{% block page_title %}{% endblock %}</title>
  120.         {% block stylesheets %}
  121.             {% block stylesheets_preload %}
  122.                 {% if show_preload %}
  123.                     <style>
  124.                         #loader {
  125.                             transition: all 0.3s ease-in-out;
  126.                             opacity: 1;
  127.                             visibility: visible;
  128.                             position: fixed;
  129.                             height: 100vh;
  130.                             width: 100vw;
  131.                             background: #fff;
  132.                             z-index: 90000;
  133.                             left: 0;
  134.                             top: 0;
  135.                         }
  136.                         #loader.fadeOut {
  137.                             opacity: 0;
  138.                             visibility: hidden;
  139.                         }
  140.                         .spinner {
  141.                             width: 40px;
  142.                             height: 40px;
  143.                             position: absolute;
  144.                             top: calc(50% - 20px);
  145.                             left: calc(50% - 20px);
  146.                             background-color: #333;
  147.                             border-radius: 100%;
  148.                             -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
  149.                             animation: sk-scaleout 1.0s infinite ease-in-out;
  150.                         }
  151.                         @-webkit-keyframes sk-scaleout {
  152.                             0% { -webkit-transform: scale(0) }
  153.                             100% {
  154.                                 -webkit-transform: scale(1.0);
  155.                                 opacity: 0;
  156.                             }
  157.                         }
  158.                         @keyframes sk-scaleout {
  159.                             0% {
  160.                                 -webkit-transform: scale(0);
  161.                                 transform: scale(0);
  162.                             } 100% {
  163.                                   -webkit-transform: scale(1.0);
  164.                                   transform: scale(1.0);
  165.                                   opacity: 0;
  166.                               }
  167.                         }
  168.                     </style>
  169.                 {% endif %}
  170.             {% endblock %}
  171.             {% block stylesheets_template %}
  172.                 <link type="text/css" rel="stylesheet" href="{{ asset('bundles/emprelewftemplate/css/app.css', 'ewftemplate') }}">
  173.             {% endblock %}
  174.         {% endblock %}
  175.         {% block javascripts_fix %}
  176.             <!--[if lt IE 9]>
  177.                 <script src="{{ asset('bundles/emprelewftemplate/js/html5shiv.js', 'ewftemplate') }}"></script>
  178.                 <script src="{{ asset('bundles/emprelewftemplate/js/respond.js', 'ewftemplate') }}"></script>
  179.             <![endif]-->
  180.         {% endblock %}
  181.         {% if prepend_javascripts %}
  182.             {{ block('javascripts') }}
  183.         {% endif %}
  184.     </head>
  185.     <body class="hold-transition skin-pcr fixed sidebar-mini
  186.                 {% if app.request.cookies.get('sonata_sidebar_hide') -%}
  187.                     sidebar-collapse
  188.                 {%- endif -%}">
  189.         {% block preload %}
  190.             {% if show_preload %}
  191.                 <div id='loader'>
  192.                     <div class="spinner"></div>
  193.                 </div>
  194.             {% endif %}
  195.         {% endblock %}
  196.         <div class="wrapper">
  197.             <header class="main-header">
  198.                 <!-- Logo -->
  199.                 <a href="{{- app_home_href|e('html_attr') -}}" class="logo hidden-xs">
  200.                     <!-- mini logo for sidebar mini 50x50 pixels -->
  201.                     <img class="logo-mini" alt="{{- app_logo_alt|e('html_attr') -}}" src="{{- app_logo_mini_src|e('html_attr') -}}">
  202.                     <!-- logo for regular state and mobile devices -->
  203.                     <img class="logo-lg hidden-xs" alt="{{- app_logo_alt|e('html_attr') -}}" src="{{- app_logo_lg_src|e('html_attr') -}}">
  204.                     <span class="logo-lg-title visible-xs">
  205.                         <img height="45px" src="{{ app_logo2_lg_src}}" alt="Assinador Digital" />
  206.                     </span>
  207.                 </a>
  208.                 <!-- Header Navbar: style can be found in header.less -->
  209.                 <nav class="navbar navbar-static-top">
  210.                     <!-- Sidebar toggle button-->
  211.                     <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
  212.                         <span class="sr-only">Toggle navigation</span>
  213.                         <span class="icon-bar"></span>
  214.                         <span class="icon-bar"></span>
  215.                         <span class="icon-bar"></span>
  216.                     </a>
  217.                     <span class="logo-lg-title visible-xs" style="text-align:center">
  218.                         <img height="45px" src="{{ app_logo2_lg_src}}" alt="Assinador Digital" />
  219.                     </span>
  220.                     <div class="navbar-custom-menu">
  221.                         <ul class="nav navbar-nav">
  222.                             {% block navbar_custom_menu_inner %}
  223.                             {% endblock %}
  224.                             {%  if has_authentication %}
  225.                                 {%  if is_authenticated %}
  226.                                     <li class="dropdown user user-menu hidden-xs">
  227.                                         <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  228.                                             <img src="{{- authenticated_profile_image_src|e('html_attr') -}}" class="user-image" alt="User Image">
  229.                                             <span class="hidden-xs hidden-sm user-name">{{- authenticated_name -}}</span>
  230.                                         </a>
  231.                                         <ul class="dropdown-menu">
  232.                                             <li class="user-header">
  233.                                                 <img src="{{- authenticated_profile_image_src|e('html_attr') -}}" class="img-circle" alt="User Image">
  234.                                                 <p>
  235.                                                     {{- authenticated_name -}}
  236.                                                     <small>{{- authenticated_username -}}</small>
  237.                                                 </p>
  238.                                             </li>
  239.                                             <li class="user-footer">
  240.                                                 {% if authenticated_profile_href is not empty %}
  241.                                                     <div class="pull-left">
  242.                                                         <a href="{{- authenticated_profile_href|e('html_attr') -}}" class="btn btn-primary btn-flat">Conta</a>
  243.                                                     </div>
  244.                                                 {% endif %}
  245.                                                 <div class="pull-right">
  246.                                                     <a href="{{- authenticated_logout_href|e('html_attr') -}}" class="btn btn-default btn-flat">Sair</a>
  247.                                                 </div>
  248.                                             </li>
  249.                                         </ul>
  250.                                     </li>
  251.                                 {% elseif not is_error_page %}
  252.                                     <li class="dropdown user user-menu hidden-xs">
  253.                                         <a href="{{- authenticated_login_href|e('html_attr') -}}">
  254.                                             <i class="fa fa-sign-in"></i> Entrar
  255.                                         </a>
  256.                                     </li>
  257.                                 {% endif %}
  258.                             {% endif %}
  259.                             {%  if has_control_sidebar %}
  260.                                 {% block control_sidebar_menu %}
  261.                                     <li>
  262.                                         <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
  263.                                     </li>
  264.                                 {% endblock %}
  265.                             {% endif %}
  266.                         </ul>
  267.                     </div>
  268.                     <span class="logo-lg-title hidden-xs">
  269.                         <img height="45px" src="{{ app_logo2_lg_src}}" alt="Assinador Digital" />
  270.                      </span>                     
  271.                 </nav>
  272.             </header>
  273.             <aside class="main-sidebar">
  274.                 <section class="sidebar">
  275.                     {% block sidebar_user %}
  276.                         {%  if is_authenticated %}
  277.                             <div class="user-panel visible-xs">
  278.                                 <div class="pull-left image">
  279.                                     <img src="{{- authenticated_profile_image_src|e('html_attr') -}}" class="img-circle" alt="User Image">
  280.                                 </div>
  281.                                 <div class="pull-left info">
  282.                                     <p class="user-name">{{- authenticated_name -}}</p>
  283.                                     <small>{{- authenticated_username -}}</small>
  284.                                 </div>
  285.                             </div>
  286.                             <div class="bg-danger visible-xs"><a class="p-10 d-b" href="{{- authenticated_logout_href|e('html_attr') -}}">
  287.                                     <i class="fa fa-sign-out text-danger"></i> <span>Sair</span></a>
  288.                             </div>
  289.                         {% elseif not is_error_page %}
  290.                             <div class="bg-success visible-xs"><a class="p-10 d-b" href="{{- authenticated_login_href|e('html_attr') -}}">
  291.                                     <i class="fa fa-sign-in text-success"></i> <span>Entrar</span></a>
  292.                             </div>
  293.                         {% endif %}
  294.                     {% endblock %}
  295.                     {% block sidebar_menu %}
  296.                         <ul class="sidebar-menu" data-widget="tree">
  297.                             {% block sidebar_menu_inner %}
  298.                             {% endblock %}
  299.                         </ul>
  300.                     {% endblock %}
  301.                 </section>
  302.             </aside>
  303.             <div class="content-wrapper">
  304.                 {% block body %}
  305.                     <section class="content-header">
  306.                         {% block body_header %}
  307.                         {% endblock %}
  308.                     </section>
  309.                     {% block flashes %}
  310.                         {% for label, messages in app.flashes %}
  311.                             {% for message in messages %}
  312.                                 <div class="m-10 alert alert-{{- label == 'error' ? 'danger' : label -}}">
  313.                                     {{- message|trans|raw -}}
  314.                                     <button type="button" class="close" data-dismiss="alert" aria-label="Fechar">
  315.                                         <span aria-hidden="true">&times;</span>
  316.                                     </button>
  317.                                 </div>
  318.                             {% endfor %}
  319.                         {% endfor %}
  320.                     {% endblock %}
  321.                     <section class="content">
  322.                         {% block body_content %}
  323.                         {% endblock %}
  324.                     </section>
  325.                 {% endblock %}
  326.             </div>
  327.             {% block footer %}
  328.                 <footer class="main-footer justify-content">
  329.                     {% block footer_inner %}
  330.                         <strong>Desenvolvido pela
  331.                             <a href="http://www.emprel.gov.br" title="Emprel" target="_blank">
  332.                                 <img class="logo-emprel" src="https://statics.recife.pe.gov.br/images/dynamics/emprel.png" alt="Logomarca da Emprel">
  333.                             </a>
  334.                         </strong>
  335.                     {% endblock %}
  336.                 </footer>
  337.             {% endblock %}
  338.             {%  if has_control_sidebar %}
  339.                 {% block control_sidebar %}
  340.                     <aside class="control-sidebar control-sidebar-light">
  341.                         {% block control_sidebar_inner %}
  342.                         {% endblock %}
  343.                     </aside>
  344.                 {% endblock %}
  345.                 <div class="control-sidebar-bg"></div>
  346.             {% endif %}
  347.         </div>
  348.         {% block body_aux %}
  349.             <div class="device-xs visible-xs"></div>
  350.             <div class="device-sm visible-sm"></div>
  351.             <div class="device-md visible-md"></div>
  352.             <div class="device-lg visible-lg"></div>
  353.             <div class="modal-sidabar-backdrop"></div>
  354.         {% endblock %}
  355.         {% if not prepend_javascripts %}
  356.             {% block javascripts %}
  357.                 {% if has_service_worker %}
  358.                     <script>
  359.                         if ('serviceWorker' in navigator) {
  360.                             navigator.serviceWorker.register('{{- service_worker_href|e('js') -}}');
  361.                         }
  362.                     </script>
  363.                 {% endif %}
  364.                 {% block javascripts_preload %}
  365.                     {% if show_preload %}
  366.                         <script>
  367.                             window.addEventListener('load', function load() {
  368.                                 const loader = document.getElementById('loader');
  369.                                 setTimeout(function() {
  370.                                     loader.classList.add('fadeOut');
  371.                                 }, 300);
  372.                             });
  373.                         </script>
  374.                     {% endif %}
  375.                 {% endblock %}
  376.                 {% block javascripts_template %}
  377.                     <script src="{{ asset('bundles/emprelewftemplate/js/app.js', 'ewftemplate') }}"></script>
  378.                 {% endblock %}
  379.             {% endblock %}
  380.         {% endif %}
  381.         {% block body_end %}
  382.         {% endblock %}
  383.     </body>
  384. </html>