profile.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <div class="mx-auto text-center">
  4. <!------ Profile Information ---------->
  5. <div class="container">
  6. <div class="row">
  7. <div class="col-md-4">
  8. <div class="card">
  9. <div class="card-body">
  10. <div class="d-flex flex-column align-items-center text-center">
  11. {% if user.profile_image %}
  12. <img src="static/uploads/{{ user.profile_image }}" class="user_profile_image_size">
  13. {% else %}
  14. <img src="static/templates/defaultprofileimg.png" class="user_profile_image_size">
  15. {% endif %}
  16. <div class="mt-3">
  17. <h4>{{ user.username }}</h4>
  18. <p class="text-secondary mb-1">{{ user.email }}</p>
  19. <hr>
  20. <!------ Upload Profile Image ---------->
  21. <div class="mt-3">
  22. <p><b>Upload Profile Image</b></p>
  23. <form action="" method="POST" enctype="multipart/form-data">
  24. <input
  25. class="input-UploadProfile-Browse"
  26. type="file"
  27. id="profile_image"
  28. name="profile_image"
  29. accept="image/png, image/jpeg"
  30. onchange="form.submit()"
  31. value="Upload"
  32. src="http://example.com/path/to/image.png"
  33. >
  34. <p>**Accept Only <b>PNG's</b>, <b>JPEG's</b>**</p>
  35. </form>
  36. </div>
  37. </div>
  38. <!------ Change Password ---------->
  39. <form method="POST">
  40. <div class="card-body">
  41. <hr class="hr_size">
  42. <p><b>Change Password</b></p><br>
  43. <div class="row">
  44. <div class="col-sm-3" class="change_password_location">
  45. <h6 class="mb-0"><label for="password">Password</label></h6><br>
  46. </div>
  47. <div class="col-sm-9 text-secondary">
  48. <input type="text" id="password" name="password"><br>
  49. </div>
  50. </div>
  51. <div class="row">
  52. <div class="col-sm-3" class="change_password_location">
  53. <h6 class="mb-0"><label for="password_confirm">Password<br>(Confirm)</label></h6><br>
  54. </div>
  55. <div class="col-sm-9 text-secondary">
  56. <input type="text" id="password_confirm" name="password_confirm">
  57. </div>
  58. </div>
  59. <div class="row">
  60. <div class="col-sm-12">
  61. <input type="submit" value="Submit" class="btn btn-grey update_password-form-btn"></a>
  62. </div>
  63. </div>
  64. <hr class="hr_size">
  65. <p><b>Security(Show 2FA. If the user turns on it, it will show a green tick. If not, it will show a red tick.)</b></p><br>
  66. <div class="row">
  67. <div class="col">
  68. <h6 class="mb-0">
  69. <img src="static/templates/tick_logo.jpg" alt="enable_logo" id="logo" width="12"/>
  70. <img src="static/templates/cross_logo.jpg" alt="disable_logo" id="logo" width="12"/>
  71. <label for="2FA">Two-Factor Authentication (2FA)</label>
  72. </h6>
  73. </div>
  74. </div>
  75. </div>
  76. </form>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <!------ List of bookmarks you have created ---------->
  82. <div class="col">
  83. <div class="card">
  84. <div class="container">
  85. <ul class="nav nav-pills mb-3 nav-tabs" id="pills-tab" role="tablist">
  86. <li class="nav-item">
  87. <a class="nav-link active" id="art_by_me-tab" data-toggle="tab" href="#art_by_me" role="tab" aria-controls="art_by_me" aria-selected="true">Art By Me</a>
  88. </li>
  89. <li class="nav-item">
  90. <a class="nav-link" id="art_by_own-tab" data-toggle="tab" href="#art_by_own" role="tab" aria-controls="art_by_own" aria-selected="false">Art By Own</a>
  91. </li>
  92. <li class="nav-item">
  93. <a class="nav-link" id="bidding_record-tab" data-toggle="tab" href="#bidding_record" role="tab" aria-controls="bidding_record" aria-selected="false">Bidding Record</a>
  94. </li>
  95. </ul>
  96. <div class="tab-content" id="myTabContent">
  97. <div class="tab-pane fade show active" id="art_by_me" role="tabpanel" aria-labelledby="art_by_me-tab">
  98. <div class="row row-cols-3">
  99. {%for art in my_art%}
  100. <div class="card col-md-4 shadow p-3 mb-5 bg-white rounded" type="button" onclick="window.location.href='{{ url_for('dashboards.modal_profile')}}'">
  101. <img class="image_bid_item_size" src="static/repository/{{art.dname}}">
  102. <div class="row" id="market_item_name_left">
  103. <b>{{art.name}}</b>
  104. </div>
  105. </div>
  106. {% endfor %}
  107. </div>
  108. </div>
  109. <div class="tab-pane fade" id="art_by_own" role="tabpanel" aria-labelledby="art_by_own-tab">.
  110. <div class="row row-cols-3">
  111. {%for art in my_creation%}
  112. <div class="card col-md-4 shadow p-3 mb-5 bg-white rounded" type="button" onclick="window.location.href='{{ url_for('dashboards.modal_profile')}}'">
  113. <img class="image_bid_item_size" src="static/repository/{{art.dname}}">
  114. <div class="row" id="market_item_name_left">
  115. <b>{{art.name}}</b>
  116. </div>
  117. </div>
  118. {% endfor %}
  119. </div>
  120. </div>
  121. <div class="tab-pane fade" id="bidding_record" role="tabpanel" aria-labelledby="bidding_record-tab">
  122. <table class="table">
  123. <thead class="thead-colour">
  124. <tr>
  125. <th>Bidding Art Item Name</th>
  126. <th>Bidding Time(Order by DESC)</th>
  127. <th>Bidding Price</th>
  128. </tr>
  129. </thead>
  130. <tr>
  131. <td>The Krusty Krab</td>
  132. <td>2022-4-3 15:30:00</td>
  133. <td>150</td>
  134. </tr>
  135. <tr>
  136. <td>Chum Bucket</td>
  137. <td>2022-4-2 10:00:00</td>
  138. <td>100</td>
  139. </tr>
  140. </table>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. {% block modal %}{% endblock %}
  150. {% block script %}{% endblock %}
  151. {% endblock %}