layout.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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/drawio.html' %}
  20. {% include '../widget/headers/scripts-for-dev.html' %}
  21. <script src="{{ webpack_asset('js/boot.js') }}"></script>
  22. <script src="{{ webpack_asset('js/vendors.js') }}" defer></script>
  23. <script src="{{ webpack_asset('js/commons.js') }}" defer></script>
  24. {% if getConfig('crowi', 'plugin:isEnabledPlugins') %}
  25. <script src="{{ webpack_asset('js/plugin.js') }}" defer></script>
  26. {% endif %}
  27. {% block html_head_loading_legacy %}
  28. <script src="{{ webpack_asset('js/legacy.js') }}" defer></script>
  29. {% endblock %}
  30. {% block html_head_loading_app %}
  31. <script src="{{ webpack_asset('js/app.js') }}" defer></script>
  32. {% endblock %}
  33. <!-- styles -->
  34. {% include '../widget/headers/styles-for-app.html' %}
  35. {% if 'kibela' === getConfig('crowi', 'customize:layout') %}
  36. {% include '../widget/headers/styles-theme-kibela.html' %}
  37. {% else %}
  38. {% block theme_css_block %}
  39. {% set themeName = getConfig('crowi', 'customize:theme') %}
  40. {% include '../widget/headers/styles-theme.html' with {themeName: themeName} %}
  41. {% endblock %}
  42. {% endif %}
  43. {{ cdnStyleTagsByGroup('basis') }}
  44. {{ cdnHighlightJsStyleTag(getConfig('crowi', 'customize:highlightJsStyle')) }}
  45. {% block html_additional_headers %}{% endblock %}
  46. <style>
  47. {{ customizeService.getCustomCss() }}
  48. </style>
  49. </head>
  50. {% endblock %}
  51. {% block html_body %}
  52. <body
  53. class="{% block html_base_css %}{% endblock %}
  54. {% 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 %}"
  55. data-is-admin="{{ user.admin }}"
  56. data-plugin-enabled="{{ getConfig('crowi', 'plugin:isEnabledPlugins') }}"
  57. {% block html_base_attr %}{% endblock %}
  58. data-csrftoken="{{ csrf() }}"
  59. >
  60. <div id="wrapper">
  61. {% block layout_head_nav %}
  62. <nav id="grw-navbar" class="navbar grw-navbar navbar-expand navbar-dark sticky-top mb-0 px-0"></nav>
  63. {% endblock %} {# layout_head_nav #}
  64. {% block head_warn_breaking_changes %}{% include '../widget/alert_breaking_changes.html' %}{% endblock %}
  65. <div id="page-wrapper" class="page-wrapper d-flex d-print-block">
  66. {# Sidebar #}
  67. <div id="grw-sidebar-wrapper"></div>
  68. <div class="flex-fill mw-0">
  69. {% block head_warn_alert_siteurl_undefined %}{% include '../widget/alert_siteurl_undefined.html' %}{% endblock %}
  70. {% block layout_main %}{% endblock %}
  71. </div>
  72. </div>
  73. <div id="grw-navbar-bottom-container"></div>
  74. </div><!-- /#wrapper -->
  75. {% block fixed-controls %}
  76. <div id="grw-fab-container"></div>
  77. {% endblock %}
  78. <div id="grw-hotkeys-manager"></div>
  79. {% include '../widget/system-version.html' %}
  80. <div id="page-create-modal"></div>
  81. {% include '../modal/shortcuts.html' %}
  82. {% block body_end %}
  83. {% endblock %}
  84. </body>
  85. {% endblock %}
  86. <script type="application/json" id="growi-context-hydrate">
  87. {{ local_config|json|safe|preventXss }}
  88. </script>
  89. {% if user != null %}
  90. <script type="application/json" id="growi-current-user">
  91. {{ user|json|safe|preventXss }}
  92. </script>
  93. {% endif %}
  94. {% block custom_script %}
  95. <script>
  96. {{ customizeService.getCustomScript() }}
  97. </script>
  98. {% endblock %}
  99. </html>