templates/lef-career/layout.html.twig line 1

Open in your IDE?
  1. <!doctype html>
  2. {%- block layoutCommonAttribute -%}
  3. {%- endblock -%}
  4. {%- set isDocument = document is instanceof('\\Pimcore\\Model\\Document\\Page') -%}
  5. {%- do layout_html_attribute_add('html', 'lang', app.request.locale) -%}
  6. {%- do layout_html_attribute_add_class('html', 'no-js') -%}
  7. <html {% block htmlAttributes -%}{{ layout_html_attribute_render('html')|raw }}{%- endblock -%}>
  8.     <head>
  9.         {{- include('lef-career/partials/head/meta.html.twig') -}}
  10.         {%- apply spaceless -%}
  11.             {%- if isDocument and document.title is not empty -%}
  12.                 {%- do pimcore_head_title().set(document.title) -%}
  13.             {%- else -%}
  14.                 {%- do pimcore_head_title().set('LEF Karriere') -%}
  15.             {%- endif -%}
  16.             {{- pimcore_head_title() -}}
  17.         {%- endapply -%}
  18.         {{- include('lef-career/partials/head/preloadLinks.html.twig') -}}
  19.         {{- include('lef-career/partials/head/asynchronousFontLoading.html.twig') -}}
  20.         <style>
  21.             {{- aw_web_file_include('/css/career-critical.css')|raw -}}
  22.         </style>
  23.         {%- block head_inline_stylesheets -%}
  24.             {{- pimcore_head_style() -}}
  25.         {%- endblock -%}
  26.         {%- block head_links -%}
  27.             {{- pimcore_head_link() -}}
  28.         {%- endblock -%}
  29.         {%- apply spaceless -%}
  30.             {%- if not document is defined or not document -%}
  31.                 {%- set document = pimcore_document(1) -%}
  32.             {%- endif -%}
  33.             {%- if document is instanceof('\\Pimcore\\Model\\Document\\Link') -%}
  34.                 {%- set document = document.getObject() -%}
  35.             {%- endif -%}
  36.             {%- if isDocument and document.description is not empty -%}
  37.                 {%- do pimcore_head_meta().setDescription(document.description) -%}
  38.             {%- endif -%}
  39.         {%- endapply -%}
  40.         {{- include('lef-career/partials/head/asynchronousStylesheetLoading.html.twig') -}}
  41.         {{- hreflang_init(document) -}}
  42.         {{- canonical_init(document) -}}
  43.         {%- block layout_head_meta_init -%}
  44.         {%- endblock -%}
  45.         {%- block layout_head_meta -%}
  46.             {{- pimcore_head_meta() -}}
  47.         {%- endblock -%}
  48.         {{- include('lef-career/partials/head/jsFeatureDetection.html.twig') -}}
  49.         {{- include('lef-career/partials/head/favicons.html.twig') -}}
  50.     </head>
  51.     {%- if editmode -%}
  52.         {{- layout_html_attribute_add_class('body', 'editmode') -}}
  53.     {%- endif -%}
  54.     {%- if not editmode -%}
  55.         {%- set navigation_root = document.getProperty('navigation_root') -%}
  56.         {%- if navigation_root.id == document.id -%}
  57.             {{- layout_html_attribute_add_class('body', 'home') -}}
  58.         {%- endif -%}
  59.     {%- endif -%}
  60.     <body {% block bodyAttributes -%}{{ layout_html_attribute_render('body')|raw }}{%- endblock -%}>
  61.         {{- include('lef-career/partials/svg-sprite.html.twig') -}}
  62.         {{- include('lef-career/partials/header.html.twig') -}}
  63.         <main id="main-content">
  64.             {{- block('content') -}}
  65.             {%- if not editmode and navigation_root.id == document.id -%}
  66.                 {%- set footer_snippet = document.getProperty('footer_snippet') -%}
  67.                 {%- if footer_snippet -%}
  68.                     {{- pimcore_inc(footer_snippet) -}}
  69.                 {%- endif -%}
  70.             {%- endif -%}
  71.         </main>
  72.         {%- if not editmode and navigation_root.id != document.id -%}
  73.             {%- set footer_snippet = document.getProperty('footer_snippet') -%}
  74.             {%- if footer_snippet -%}
  75.                 {{- pimcore_inc(footer_snippet) -}}
  76.             {%- endif -%}
  77.         {%- endif -%}
  78.         {%- block scripts -%}
  79.             {{ pimcore_head_script() }}
  80.         {%- endblock -%}
  81.         
  82.         {%- if not editmode -%}
  83.             <script id="accessible-toggle">
  84.                 {{- aw_web_file_include('/lef-career/js/accessible-toggle.js')|raw -}}
  85.             </script>
  86.         {%- endif -%}
  87.         {%- if not editmode and navigation_root.id == document.id -%}
  88.             <script src="/vendor/headroom.js/dist/headroom.min.js"></script>
  89.             <script id="header-toggle">
  90.                 {{- aw_web_file_include('/lef-career/js/toggle-header-visibility.js')|raw -}}
  91.             </script>
  92.         {%- endif -%}
  93.     </body>
  94. </html>