base-root.html.twig 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. {% if uri.extension() == 'json' %}{% include 'default.json.twig' %}{% else %}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. {% block head %}
  6. <meta charset="utf-8" />
  7. <title>{% if title %}{{ title|striptags|raw }} | {% else %}{% if header.title %}{{ header.title }} | {% endif %}{% endif %}{{ site.title }}</title>
  8. {% if header.description %}
  9. <meta name="description" content="{{ header.description }}">
  10. {% else %}
  11. <meta name="description" content="{{ site.description }}">
  12. {% endif %}
  13. {% if header.robots %}
  14. <meta name="robots" content="{{ header.robots }}">
  15. {% else %}
  16. <meta name="robots" content="noindex, nofollow">
  17. {% endif %}
  18. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  19. <link rel="icon" type="image/png" href="{{ base_url_simple }}{{ theme_url }}/images/favicon.png">
  20. {% block stylesheets %}
  21. {% include 'partials/stylesheets.html.twig' %}
  22. {% endblock %}
  23. {% include 'partials/javascript-config.html.twig' %}
  24. {% block javascripts %}
  25. {% include 'partials/javascripts.html.twig' %}
  26. {% endblock %}
  27. {% endblock %}
  28. {% block assets deferred %}
  29. {{ assets.css()|raw }}
  30. {{ assets.js()|raw }}
  31. {% endblock %}
  32. <noscript>
  33. <style>
  34. .simplebar-content-wrapper {
  35. overflow: auto;
  36. }
  37. </style>
  38. </noscript>
  39. </head>
  40. {% block body %}
  41. {% set sidebarStatus = get_cookie('grav-admin-sidebar') %}
  42. {% set sidebarStatus = (sidebarStatus is not null and sidebarStatus == 'false') or config.plugins.admin.sidebar.size == 'small' ? 'sidebar-closed' : '' %}
  43. <body class="ga-theme-17x {{ sidebarStatus }} {{ config.plugins.admin.body_classes }} {{ body_classes }}">
  44. {% if not authorize(['admin.login']) %}
  45. {% include 'partials/messages.html.twig' %}
  46. {% else %}
  47. {% block page %}
  48. <div class="remodal-bg">
  49. {% block navigation %}
  50. {% include 'partials/nav.html.twig' %}
  51. {% endblock %}
  52. <main id="admin-main" >
  53. {% include 'partials/nav-toggle.html.twig' %}
  54. <div id="titlebar" class="titlebar">
  55. {% block titlebar %}{% endblock %}
  56. </div>
  57. {% block content_wrapper %}
  58. <div data-simplebar class="content-wrapper">
  59. <div class="{% if config.plugins.admin.content_padding %}content-padding{% endif %}">
  60. {% block messages %}
  61. {% include 'partials/messages.html.twig' %}
  62. {% endblock %}
  63. {% block widgets %}{% endblock %}
  64. <div class="default-box-shadow">
  65. {% block content_top %}{% endblock %}
  66. <div class="admin-block">
  67. {%- block content %}{% endblock -%}
  68. </div>
  69. {% if config.plugins.admin.show_github_msg %}
  70. <div class="notice alert"><i class="fa fa-github"></i> <a href="https://github.com/getgrav/grav-plugin-admin/issues" target="_blank" rel="noopener noreferrer">{{ 'PLUGIN_ADMIN.ADMIN_REPORT_ISSUE'|t }}</a></div>
  71. {% endif %}
  72. {% block content_bottom %}{% endblock %}
  73. </div>
  74. {% block footer %}
  75. <footer id="footer">
  76. {% include 'partials/footer.html.twig' %}
  77. </footer>
  78. {% endblock %}
  79. </div>
  80. </div>
  81. {% endblock %}
  82. {% block modals %}
  83. <div class="remodal" data-remodal-id="generic" data-remodal-options="hashTracking: false">
  84. <form>
  85. <h1>{{ "PLUGIN_ADMIN.ERROR"|t }}</h1>
  86. <div class="error-content"></div>
  87. <div class="button-bar">
  88. <a class="button remodal-cancel" data-remodal-action="cancel" href="#">{{ "PLUGIN_ADMIN.CLOSE"|t }}</a>
  89. </div>
  90. </form>
  91. </div>
  92. <div class="remodal" data-remodal-id="metadata" data-remodal-options="hashTracking: false">
  93. <form>
  94. <h1><span>{{ "PLUGIN_ADMIN.METADATA"|t }} for</span> <strong></strong></h1>
  95. <div class="metadata-preview">
  96. <div class="meta-preview"></div>
  97. <div class="meta-content"></div>
  98. </div>
  99. <div class="button-bar">
  100. <a class="button remodal-cancel" data-remodal-action="cancel" href="#">{{ "PLUGIN_ADMIN.CLOSE"|t }}</a>
  101. </div>
  102. </form>
  103. </div>
  104. <div class="remodal" data-remodal-id="delete-media" data-remodal-options="hashTracking: false">
  105. <form>
  106. <h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_TITLE"|t }}</h1>
  107. <p class="bigger">
  108. {{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_DESC"|t }}
  109. </p>
  110. <br>
  111. <div class="button-bar">
  112. <button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
  113. <button data-remodal-action="confirm" class="button remodal-confirm disable-after-click"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
  114. </div>
  115. </form>
  116. </div>
  117. <div class="remodal" data-remodal-id="update-grav" data-remodal-options="hashTracking: false">
  118. <form>
  119. <h1>{{ "PLUGIN_ADMIN.MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_TITLE"|t }}</h1>
  120. <p class="bigger">
  121. {{ "PLUGIN_ADMIN.MODAL_UPDATE_GRAV_CONFIRMATION_REQUIRED_DESC"|t }}
  122. </p>
  123. <br>
  124. <div class="button-bar">
  125. <button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|t }}</button>
  126. <button data-remodal-action="confirm" class="button remodal-confirm disable-after-click"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|t }}</button>
  127. </div>
  128. </form>
  129. </div>
  130. {% endblock %}
  131. </main>
  132. <div id='overlay'></div>
  133. </div>
  134. {% endblock page %}
  135. {% endif %}
  136. {% block bottom %}
  137. {{ assets.js('bottom')|raw }}
  138. {% endblock %}
  139. </body>
  140. {% endblock body %}
  141. </html>
  142. {% endif %}