backend.j2 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Backend</title>
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. </head>
  7. <body>
  8. <nav class="navbar navbar-expand-md navbar-dark bg-dark">
  9. <div class="container">
  10. <a class="navbar-brand" href="/backend"><img src="/static/uploads/logo.png" style="height: 27px"></a>
  11. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsDefault" aria-controls="navbarsDefault" aria-expanded="false" aria-label="Toggle navigation">
  12. <span class="navbar-toggler-icon"></span>
  13. </button>
  14. <div class="collapse navbar-collapse" id="navbarsDefault">
  15. <ul class="navbar-nav mr-auto">
  16. {%- for item in current_menu.children recursive -%}
  17. <li class="nav-item {{ 'active' if item.active }}" data-toggle="tooltip" data-placement="right" title="{{ item.text }}">
  18. <a class="nav-link" href="{{ item.url}}">
  19. <span class="nav-link-text">{{ item.text }}</span>
  20. </a>
  21. </li>
  22. {%- endfor -%}
  23. </ul>
  24. <ul class="navbar-nav">
  25. <li class="nav-item text-nowrap">
  26. <a class="nav-link" href="/">Public</a>
  27. </li>
  28. <li class="nav-item text-nowrap">
  29. <a class="nav-link" href="/logout">Logout</a>
  30. </li>
  31. </ul>
  32. </div>
  33. </div>
  34. </nav>
  35. <main class="container mt-3">
  36. {% with messages = get_flashed_messages(with_categories=true) %}
  37. {% if messages %}
  38. {% for category, message in messages %}
  39. <div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
  40. {{ message }}
  41. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  42. <span aria-hidden="true">&times;</span>
  43. </button>
  44. </div>
  45. {% endfor %}
  46. {% endif %}
  47. {% endwith %}
  48. {% block content %}{% endblock %}
  49. </main>
  50. <script src="/static/js/main.js"></script>
  51. </body>