layout.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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() | preventXss }}">
  12. {{ getConfig('crowi', 'customize:header') | default('') }}
  13. {% include '../widget/headers/favicon.html' %}
  14. {{ cdnScriptTagsByGroup('basis') }}
  15. {% if local_config.env.MATHJAX %}
  16. {% include '../widget/headers/mathjax.html' %}
  17. {% endif %}
  18. {% include '../widget/headers/drawio.html' %}
  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. {% block theme_css_block %}
  35. {% set themeName = getConfig('crowi', 'customize:theme') %}
  36. {% include '../widget/headers/styles-theme.html' with {themeName: themeName} %}
  37. {% endblock %}
  38. {{ cdnStyleTagsByGroup('basis') }}
  39. {{ cdnHighlightJsStyleTag(getConfig('crowi', 'customize:highlightJsStyle')) }}
  40. {% block html_additional_headers %}{% endblock %}
  41. <style>
  42. {{ customizeService.getCustomCss() }}
  43. </style>
  44. </head>
  45. {% endblock %}
  46. {% block html_body %}
  47. {% set additionalBodyClasses = []; %}
  48. {% block html_additional_body_classes %}{% endblock %}
  49. {% if getConfig('crowi', 'customize:isContainerFluid') %}
  50. {% set additionalBodyClasses = additionalBodyClasses|push('growi-layout-fluid') %}
  51. {% endif %}
  52. <body
  53. class="{% block html_base_css %}{% endblock %} growi {{ additionalBodyClasses|join(' ') }}"
  54. data-plugin-enabled="{{ getConfig('crowi', 'plugin:isEnabledPlugins') }}"
  55. {% block html_base_attr %}{% endblock %}
  56. data-csrftoken="{{ csrf() }}"
  57. >
  58. <div id="growi-context-extractor"></div>
  59. <div id="wrapper">
  60. {% block layout_head_nav %}
  61. <nav id="grw-navbar" class="navbar grw-navbar navbar-expand navbar-dark sticky-top mb-0 px-0"></nav>
  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 d-print-block">
  65. {% block sidebar %}
  66. <div id="grw-sidebar-wrapper"></div>
  67. {% endblock %}
  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" data-testid="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. <div id="page-delete-modal"></div>
  82. <div id="empty-trash-modal"></div>
  83. <div id="page-duplicate-modal"></div>
  84. <div id="page-rename-modal"></div>
  85. <div id="page-presentation-modal"></div>
  86. <div id="page-accessories-modal"></div>
  87. <div id="descendants-page-list-modal"></div>
  88. <div id="page-put-back-modal"></div>
  89. {% include '../modal/shortcuts.html' %}
  90. {% block body_end %}
  91. {% endblock %}
  92. </body>
  93. {% endblock %}
  94. <script type="application/json" id="growi-context-hydrate">
  95. {{ local_config|json|safe|preventXss }}
  96. </script>
  97. {% if user != null %}
  98. <script type="application/json" id="growi-current-user">
  99. {{ user|json|safe|preventXss }}
  100. </script>
  101. {% endif %}
  102. {% if userUISettings != null %}
  103. <script type="application/json" id="growi-user-ui-settings">
  104. {{ userUISettings|json|safe }}
  105. </script>
  106. {% endif %}
  107. {% if targetAndAncestors != null %}
  108. <script type="application/json" id="growi-pagetree-target-and-ancestors">
  109. {{ targetAndAncestors|json|safe }}
  110. </script>
  111. {% endif %}
  112. {% block custom_script %}
  113. <script>
  114. {{ customizeService.getCustomScript() }}
  115. </script>
  116. {% endblock %}
  117. </html>