base.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta
  6. name="viewport"
  7. content="width=device-width, initial-scale=1"
  8. >
  9. <!-- Boostrap CSS Localbase -->
  10. <link rel="stylesheet" href="static/css/bootstrap.min.css">
  11. <!-- Boostrap JS Localbase -->
  12. <script src="static/js/jquery-3.3.1.slim.min.js"></script>
  13. <script src="static/js/popper.min.js"></script>
  14. <script src="static/js/bootstrap.min.js"></script>
  15. <title>
  16. {% block title %}APP{% endblock %}
  17. </title>
  18. <link
  19. rel = "icon"
  20. href = "static/logo/hometag_logo.png"
  21. type = "image/x-icon"
  22. >
  23. </head>
  24. <style>
  25. .navbar-nav-right {
  26. position: absolute;
  27. top: 2px;
  28. right: 0px;
  29. list-style-type: none;
  30. }
  31. .navbar-nav-middle {
  32. position: absolute;
  33. top: 5px;
  34. right: 380px;
  35. list-style-type: none;
  36. }
  37. a {
  38. font-size: 18px;
  39. }
  40. .navbar-nav > li{
  41. padding-left:30px;
  42. }
  43. body {
  44. font: 400 15px/1.8 "Lato", sans-serif;
  45. }
  46. </style>
  47. <body>
  48. <nav class="navbar fixed-top navbar-expand-sm bg-dark navbar-dark">
  49. <a class="navbar-brand" href="/"><img src="static/logo/hometag_logo.png" alt="hometag_logo" id="logo" width="40"/></a></a>
  50. <!-- Search Function for search Art-->
  51. <ul class="navbar-nav">
  52. {% if user.is_authenticated %} <!-- shows only if user is logged in -->
  53. <li class="nav-item">
  54. <a class="nav-link" href="/">Market</a>
  55. <a class="nav-link" href="/create_art">Create Art</a>
  56. </li>
  57. </ul>
  58. <ul class="navbar-nav-right">
  59. <li class="nav-item">
  60. <a href="/profile">Profile</a>
  61. <a href="/logout"><img src="static/logo/logout_logo.gif" alt="logout_logo" id="logo" width="86"/></a>
  62. </li>
  63. </ul>
  64. {% else %}
  65. <li class="nav-item">
  66. <a class="nav-link" href="/">Market</a>
  67. </li>
  68. </ul>
  69. <ul class="navbar-nav-right">
  70. <li class="nav-item">
  71. <a href="/login">Login</a>
  72. <a href="/register">Register</a>
  73. </li>
  74. </ul>
  75. {% endif %}
  76. </ul>
  77. <form action="" method="POST" class="navbar-nav-middle">
  78. <input
  79. type="search_art"
  80. class="form-control"
  81. id="search_art"
  82. name="search_art"
  83. placeholder="Seach Art"
  84. />
  85. <label for="search_art"></label>
  86. </div>
  87. </form>
  88. </nav>
  89. <!-- For Flash Errors to User -->
  90. {% with messages = get_flashed_messages(with_categories=true) %}
  91. {% if messages %}
  92. {% for category, message in messages %}
  93. {% if category == 'error' %}
  94. <div class="alert alert-danger alter-dismissable fade show", role="alert" style="z-index:2;">
  95. {{ message }}
  96. <button type="button" class="close" data-dismiss="alert">
  97. <span aria-hidden="true">&times;</span> <!-- fancy button styling-->
  98. </button>
  99. </div>
  100. {% else %}
  101. <div class="alert alert-success alter-dismissable fade show", role="alert" style="z-index:2;">
  102. {{ message }}
  103. <button type="button" class="close" data-dismiss="alert">
  104. <span aria-hidden="true">&times;</span> <!-- fancy button styling-->
  105. </button>
  106. </div>
  107. {% endif %}
  108. {% endfor %}
  109. {% endif %}
  110. {% endwith %}
  111. <div class="container" style="position:relative; top:200px;"> <!-- added the style here for backend testing! -->
  112. {% block content %}
  113. {% endblock %}
  114. </div>
  115. {% block modal %}{% endblock %}
  116. {% block script %}{% endblock %}
  117. </body>
  118. </html>