app/Resources/views/layout.html.twig line 84

Open in your IDE?
  1. {% import "macro.html.twig" as web_macro %}
  2. <!DOCTYPE html>
  3. <!--[if lt IE 7]>
  4. <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
  5. <!--[if IE 7]>
  6. <html class="lt-ie9 lt-ie8"> <![endif]-->
  7. <!--[if IE 8]>
  8. <html class="lt-ie9"> <![endif]-->
  9. <!--[if gt IE 8]><!-->
  10. <html> <!--<![endif]-->
  11. {% set lang = app.request.getLocale() %}
  12. {% set mobile = is_show_mobile_page() %}
  13. {% set currentTheme = current_theme() %}
  14. {% set themeConfig = app.request.get('themeEditing')|default(false) ? currentTheme.config  : currentTheme.confirmConfig %}
  15. {% set maincolor = themeConfig.maincolor|default('default') %}
  16. {% set navigationcolor = themeConfig.navigationcolor|default('default') %}
  17. <html lang="{{ lang }}" class="{% if lang == 'en' %}es-en{% endif %}">
  18. <head>
  19.   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  20.   <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
  21.   <meta name="renderer" content="webkit">
  22.   <meta name="viewport"
  23.     content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
  24.   <title>
  25.     {%- block title -%}
  26.       {{ setting('site.name', 'EduSoho') }}{% if setting('site.slogan') %} - {{ setting('site.slogan') }}{% endif %}{% if  setting('copyright.owned','0') != '1' or setting('copyright.thirdCopyright')|default(0) == 2 %} - Powered By EduSoho{% endif %}
  27.     {%- endblock -%}
  28.   </title>
  29.   {% block meta %}
  30.     <meta name="keywords"
  31.           content="
  32. {% spaceless %}{% block keywords %}{{ setting('site.seo_keywords') }}{% endblock %}{% endspaceless %}"/>
  33.     <meta name="description"
  34.           content="{% spaceless %}{% block description %}{{ setting('site.seo_description') }}{% endblock %}{% endspaceless %}"/>
  35.     <meta name="format-detection"
  36.           content="{% spaceless %}{% block format_detection %}{% endblock %}{% endspaceless %}"/>
  37.     <meta content="{{ csrf_token('site') }}" name="csrf-token"/>
  38.     <meta content="{{ app.user.isLogin()|default(0) }}" name="is-login"/>
  39.     <meta content="{{ wechat_login_bind_enabled()|default(0) }}" name="wechat_login_bind"/>
  40.   {% endblock %}
  41.   {{ setting('login_bind.verify_code', '')|raw }}
  42.   {% if setting('site.favicon') %}
  43.     <link rel="icon" href="{{ asset(setting('site.favicon')) }}" type="image/x-icon"/>
  44.     <link rel="shortcut icon" href="{{ asset(setting('site.favicon')) }}" type="image/x-icon" media="screen"/>
  45.   {% endif %}
  46.   <!--[if lt IE 9]>
  47.   <script src="{{ asset('static-dist/libs/html5shiv.js') }}"></script>
  48.   <script src="{{ asset('static-dist/es5-shim/es5-shim.js') }}"></script>
  49.   <script src="{{ asset('static-dist/es5-shim/es5-sham.js') }}"></script>
  50.   <![endif]-->
  51.   <script src="{{ asset('static-dist/libs/agent-web-sdk/agent-sdk.iife.js') }}"></script>
  52.   {% block stylesheets %}
  53.     {% include 'css_loader.html.twig' %}
  54.     {% include 'default/stylesheet-webpack.html.twig' %}
  55.   {% endblock %}
  56.   {% block head_scripts %}{% endblock %}
  57. </head>
  58. <body class="{% block bodyClass %}{{ 'es-main-' ~ maincolor }} {{ 'es-nav-' ~ navigationcolor }} {% if bodyClass|default('') %}{{ bodyClass }}{% endif %}{% endblock %}" {% block bodyStyle %}{% endblock %}>
  59. <!--[if lt IE 9]>
  60. <script src="{{ asset('static-dist/libs/fix-ie.js') }}"></script>
  61. {% include 'default/ie8-alert.html.twig' %}
  62. <![endif]-->
  63. {% block body %}
  64.   <div class="es-wrap">
  65.     {% block header %}
  66.       {% include 'site-hint.html.twig' %}
  67.       {% include 'default/header.html.twig' %}
  68.       {% include 'default/exception.html.twig' %}
  69.     {% endblock %}
  70.     {% block full_content %}
  71.       {% block top_content %}{% endblock %}
  72.       <div id="content-container" class="container">
  73.         {% block content %}{% endblock %}
  74.       </div>
  75.       {% block bottom_content %}{% endblock %}
  76.     {% endblock %}
  77.     {% block footer %}
  78.       {% include 'default/footer.html.twig' %}
  79.     {% endblock %}
  80.     {% block footer_mobile %}
  81.     {% endblock %}
  82.     {% block bottom %}{% endblock %}
  83.   </div>
  84.   {% block esBar %}
  85.     {% if setting('esBar.enabled', 0) and app.user.isLogin()|default(false) %}
  86.       {% include 'es-bar/index.html.twig' %}
  87.     {% endif %}
  88.   {% endblock %}
  89.   {% block wechatInform %}
  90.     {% if (siteNav|default() == '/') %}
  91.       {% if (is_mobile_client() == false or (is_mobile_client() and (app.request.headers.get('User-Agent') matches '/MicroMessenger/'))) and app.user.isLogin()|default(false) %}
  92.         {% include 'wechat-inform.html.twig' %}
  93.       {% endif %}
  94.     {% endif %}
  95.   {% endblock %}
  96.   {% block floatConsult %}
  97.     {% set cloudConsultPath = cloudConsultPath() %}
  98.     {% if cloudConsultPath|default() %}
  99.       {{ cloudConsultPath | raw }}
  100.     {% endif %}
  101.     {% if setting('consult.enabled', 0) and (consultDisplay|default(false) or siteNav|default() == '/' ) %}
  102.       {% if not setting('esBar.enabled',0) %}
  103.         {% include 'float-consult.html.twig' %}
  104.       {% endif %}
  105.     {% endif %}
  106.   {% endblock %}
  107.   <div id="login-modal" class="modal" data-url="{{ path('login_ajax') }}"></div>
  108.   <div id="modal" class="modal"></div>
  109.   <div id="attachment-modal" class="modal"></div>
  110.   {% set reward_notify = pop_reward_point_notify() %}
  111.   {% if reward_notify %}
  112.     <div class="hidden" id="rewardPointNotify">
  113.       {{ reward_notify }}
  114.     </div>
  115.   {% endif %}
  116. {% endblock %}
  117. {% block footer_script %}
  118.   {% include 'default/script-webpack.html.twig' %}
  119.   {% include 'script_boot.html.twig' %}
  120. {% endblock %}
  121. </body>
  122. </html>