main.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <title>{% block title %}{% endblock %} - PACC</title>
  10. {% block head%}{% endblock %}
  11. <!-- Bootstrap core CSS-->
  12. <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
  13. <!-- Custom fonts for this template-->
  14. <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  15. <!-- Custom styles for this template-->
  16. <link href="{{ url_for('static', filename='css/sb-admin.css') }}" rel="stylesheet">
  17. <link href="{{ url_for('static', filename='css/custom.css') }}" rel="stylesheet">
  18. </head>
  19. <body class="fixed-nav sticky-footer bg-dark {{ 'sidenav-toggled' if not current_user.is_authenticated }}" id="page-top">
  20. <!-- Navigation-->
  21. <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
  22. <a class="navbar-brand" href="/">PLA33 API</a>
  23. <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
  24. <span class="navbar-toggler-icon"></span>
  25. </button>
  26. <div class="collapse navbar-collapse" id="navbarResponsive">
  27. <ul class="navbar-nav navbar-sidenav">
  28. {%- for item in current_menu.children recursive -%}
  29. <li class="nav-item" data-toggle="tooltip" data-placement="right" title="{{ item.text }}">
  30. <a class="nav-link" href="{{ item.url}}">
  31. <span class="nav-link-text">{{ item.text }}</span>
  32. </a>
  33. </li>
  34. {%- endfor -%}
  35. </ul>
  36. <ul class="navbar-nav sidenav-toggler">
  37. <li class="nav-item">
  38. <a class="nav-link text-center" id="sidenavToggler">
  39. <i class="fa fa-fw fa-angle-left"></i>
  40. </a>
  41. </li>
  42. </ul>
  43. <ul class="navbar-nav ml-auto">
  44. {% if current_user.is_authenticated %}
  45. <li class="nav-item">
  46. <a class="nav-link" href="{{ url_for('user_overview', id=current_user.id) }}">{{ current_user.email }}</a>
  47. </li>
  48. <li class="nav-item">
  49. <a class="nav-link" data-toggle="modal" data-target="#logoutModal"><i class="fa fa-fw fa-sign-out"></i>Logout</a>
  50. </li>
  51. {% else %}
  52. <li class="nav-item">
  53. <a class="nav-link" href="{{ url_for('login') }}">Login</a>
  54. </li>
  55. {% endif %}
  56. </ul>
  57. </div>
  58. </nav>
  59. <div class="content-wrapper">
  60. <div class="container-fluid">
  61. <!-- Breadcrumbs-->
  62. <ol class="breadcrumb">
  63. {%- for breadcrumb in breadcrumbs -%}
  64. <li class="breadcrumb-item">
  65. <a href="{{ breadcrumb.url }}">{{ breadcrumb.text }}</a>
  66. </li>
  67. {%- endfor -%}
  68. </ol>
  69. <div id="content">
  70. {% with messages = get_flashed_messages(with_categories=true) %}
  71. {% if messages %}
  72. {% for category, message in messages %}
  73. <div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
  74. {{ message }}
  75. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  76. <span aria-hidden="true">&times;</span>
  77. </button>
  78. </div>
  79. {% endfor %}
  80. {% endif %}
  81. {% endwith %}
  82. <h1>{{ self.title() }}</h1>
  83. {% block content %}{% endblock %}
  84. </div>
  85. </div>
  86. <!-- /.container-fluid-->
  87. <!-- /.content-wrapper-->
  88. <footer class="sticky-footer">
  89. <div class="container">
  90. <div class="text-center">
  91. <small>Copyright © VBOO 2019</small>
  92. </div>
  93. </div>
  94. </footer>
  95. <!-- Scroll to Top Button-->
  96. <a class="scroll-to-top rounded" href="#page-top">
  97. <i class="fa fa-angle-up"></i>
  98. </a>
  99. <!-- Logout Modal-->
  100. <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="logoutModalLabel" aria-hidden="true">
  101. <div class="modal-dialog" role="document">
  102. <div class="modal-content">
  103. <div class="modal-header">
  104. <h5 class="modal-title" id="logoutModalLabel">Ready to Leave?</h5>
  105. <button class="close" type="button" data-dismiss="modal" aria-label="Close">
  106. <span aria-hidden="true">×</span>
  107. </button>
  108. </div>
  109. <div class="modal-body">Click the "logout" out button to logout</div>
  110. <div class="modal-footer">
  111. <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
  112. <a class="btn btn-primary" href="{{ url_for('logout') }}">Logout</a>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <script type='text/javascript' src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
  118. <script type='text/javascript' src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
  119. <script type='text/javascript' src="{{ url_for('static', filename='js/site/sb-admin.js') }}"></script>
  120. {% block javascript %}{% endblock %}
  121. </div>
  122. </body>
  123. </html>