profile.html 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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 }}" style="width:150px">
  13. {% else %}
  14. <img src="static/repository/website_photo/defaultprofileimg.png" style="width:150px">
  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 style="border: 3px solid rgb(177, 176, 176); width:327px; border-radius: 5px;">
  42. <p><b>Change Password</b></p><br>
  43. <div class="row">
  44. <div class="col-sm-3" style='position:relative; left:20px'>
  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" style='position:relative; left:20px'>
  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-info"></a>
  62. </div>
  63. </div>
  64. <hr style="border: 3px solid rgb(177, 176, 176); width:327px; border-radius: 5px;">
  65. <p><b>Security(Show 2FA and Email Confirmation. 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/repository/website_photo/tick_logo.jpg" alt="enable_logo" id="logo" width="12"/>
  70. <img src="static/repository/website_photo/cross_logo.jpg" alt="disable_logo" id="logo" width="12"/>
  71. <label for="Email_Verification">Email Address Verification</label>
  72. </h6>
  73. <br>
  74. <h6 class="mb-0">
  75. <img src="static/repository/website_photo/tick_logo.jpg" alt="enable_logo" id="logo" width="12"/>
  76. <img src="static/repository/website_photo/cross_logo.jpg" alt="disable_logo" id="logo" width="12"/>
  77. <label for="2FA">Two-Factor Authentication (2FA)</label>
  78. </h6>
  79. </div>
  80. </div>
  81. </div>
  82. </form>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <!------ List of bookmarks you have created ---------->
  88. <div class="col">
  89. <div class="card">
  90. <div class="container">
  91. <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
  92. <li class="nav-item">
  93. <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>
  94. </li>
  95. <li class="nav-item">
  96. <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>
  97. </li>
  98. <li class="nav-item">
  99. <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>
  100. </li>
  101. </ul>
  102. <div class="tab-content" id="myTabContent">
  103. <div class="tab-pane fade show active" id="art_by_me" role="tabpanel" aria-labelledby="art_by_me-tab">
  104. <div class="row row-cols-3">
  105. {%for art in my_art%}
  106. <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')}}'">
  107. <img style="width:200px; height:200px;" src="static/repository/{{art.dname}}">
  108. <div class="row" id="market_item_name_left">
  109. <b>{{art.name}}</b>
  110. </div>
  111. </div>
  112. {% endfor %}
  113. </div>
  114. </div>
  115. <div class="tab-pane fade" id="art_by_own" role="tabpanel" aria-labelledby="art_by_own-tab">.
  116. <div class="row row-cols-3">
  117. {%for art in my_creation%}
  118. <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')}}'">
  119. <img style="width:200px; height:200px;" src="static/repository/{{art.dname}}">
  120. <div class="row" id="market_item_name_left">
  121. <b>{{art.name}}</b>
  122. </div>
  123. </div>
  124. {% endfor %}
  125. </div>
  126. </div>
  127. <div class="tab-pane fade" id="bidding_record" role="tabpanel" aria-labelledby="bidding_record-tab">
  128. <table class="table">
  129. <thead class="thead-dark">
  130. <tr>
  131. <th>Bidding Art Item Name</th>
  132. <th>Bidding Time(Order by DESC)</th>
  133. <th>Bidding Price</th>
  134. </tr>
  135. </thead>
  136. <tr>
  137. <td>The Krusty Krab</td>
  138. <td>2022-4-3 15:30:00</td>
  139. <td>150</td>
  140. </tr>
  141. <tr>
  142. <td>Chum Bucket</td>
  143. <td>2022-4-2 10:00:00</td>
  144. <td>100</td>
  145. </tr>
  146. </table>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. {% block modal %}{% endblock %}
  156. {% block script %}{% endblock %}
  157. {% endblock %}