layout.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <!DOCTYPE html>
  2. <html>
  3. {% block html_head %}
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>{% block html_title %}{{ customizeService.generateCustomTitle(page || path) }}{% endblock %}</title>
  8. <meta name="description" content="">
  9. <meta name="author" content="">
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <meta name="apple-mobile-web-app-title" content="{{ appService.getAppTitle() }}">
  12. {{ getConfig('crowi', 'customize:header') | default('') }}
  13. {% include '../widget/headers/favicon.html' %}
  14. {% include '../widget/headers/ie11-polyfills.html' %}
  15. {{ cdnScriptTagsByGroup('basis') }}
  16. {% if local_config.env.MATHJAX %}
  17. {% include '../widget/headers/mathjax.html' %}
  18. {% endif %}
  19. {% include '../widget/headers/scripts-for-dev.html' %}
  20. <script src="{{ webpack_asset('js/boot.js') }}"></script>
  21. <script src="{{ webpack_asset('js/vendors.js') }}" defer></script>
  22. <script src="{{ webpack_asset('js/commons.js') }}" defer></script>
  23. {% if getConfig('crowi', 'plugin:isEnabledPlugins') %}
  24. <script src="{{ webpack_asset('js/plugin.js') }}" defer></script>
  25. {% endif %}
  26. {% block html_head_loading_legacy %}
  27. <script src="{{ webpack_asset('js/legacy.js') }}" defer></script>
  28. {% endblock %}
  29. {% block html_head_loading_app %}
  30. <script src="{{ webpack_asset('js/app.js') }}" defer></script>
  31. {% endblock %}
  32. <!-- styles -->
  33. {% include '../widget/headers/styles-for-app.html' %}
  34. {% if 'kibela' === getConfig('crowi', 'customize:layout') %}
  35. {% include '../widget/headers/styles-theme-kibela.html' %}
  36. {% else %}
  37. {% block theme_css_block %}
  38. {% set themeName = getConfig('crowi', 'customize:theme') %}
  39. {% include '../widget/headers/styles-theme.html' with {themeName: themeName} %}
  40. {% endblock %}
  41. {% endif %}
  42. {{ cdnStyleTagsByGroup('basis') }}
  43. {{ cdnHighlightJsStyleTag(getConfig('crowi', 'customize:highlightJsStyle')) }}
  44. {% block html_additional_headers %}{% endblock %}
  45. <style>
  46. {{ customizeService.getCustomCss() }}
  47. </style>
  48. </head>
  49. {% endblock %}
  50. {% block html_body %}
  51. <body
  52. class="{% block html_base_css %}{% endblock %}
  53. {% if !getConfig('crowi', 'customize:layout') || 'crowi' === getConfig('crowi', 'customize:layout') %}crowi{% elseif !getConfig('crowi', 'customize:layout') || 'kibela' === getConfig('crowi', 'customize:layout') %}kibela{% else %}growi{% endif %}"
  54. data-is-admin="{{ user.admin }}"
  55. data-plugin-enabled="{{ getConfig('crowi', 'plugin:isEnabledPlugins') }}"
  56. {% block html_base_attr %}{% endblock %}
  57. data-csrftoken="{{ csrf() }}"
  58. >
  59. <div id="wrapper">
  60. {% block layout_head_nav %}
  61. <div id="grw-navbar"></div>
  62. {% endblock %} {# layout_head_nav #}
  63. {% block head_warn_breaking_changes %}{% include '../widget/alert_breaking_changes.html' %}{% endblock %}
  64. <div id="page-wrapper" class="page-wrapper d-flex">
  65. {# Sidebar #}
  66. <div id="grw-sidebar-wrapper"></div>
  67. <div class="flex-fill mw-0">
  68. {% block head_warn_alert_siteurl_undefined %}{% include '../widget/alert_siteurl_undefined.html' %}{% endblock %}
  69. {# Search #}
  70. {% if isSearchServiceConfigured() %}
  71. <div id="grw-search-top" class="search-top" role="search"></div>
  72. {% endif %}
  73. {% block layout_main %}{% endblock %}
  74. </div>
  75. </div>
  76. </div><!-- /#wrapper -->
  77. {% if user %}
  78. <div class="grw-fixed-controls-container d-md-none d-edit-none animated fadeInUp faster">
  79. <div class="grw-fixed-controls-button-container rounded-circle">
  80. <div id='create-page-button-icon'></div>
  81. </div>
  82. </div>
  83. {% endif %}
  84. <!-- /#staff-credit -->
  85. <div id="staff-credit"></div>
  86. <div id="page-create-modal"></div>
  87. {% include '../modal/shortcuts.html' %}
  88. {% block body_end %}
  89. {% endblock %}
  90. </body>
  91. {% endblock %}
  92. <script type="application/json" id="growi-context-hydrate">
  93. {{ local_config|json|safe|preventXss }}
  94. </script>
  95. {% if user != null %}
  96. <script type="application/json" id="growi-current-user">
  97. {{ user|json|safe|preventXss }}
  98. </script>
  99. {% endif %}
  100. {% block custom_script %}
  101. <script>
  102. {{ customizeService.getCustomScript() }}
  103. </script>
  104. {% endblock %}
  105. </html>