favorites.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {% extends 'base.html' %}
  2. {% load humanize %}
  3. {% block content %}
  4. <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
  5. <h1 class="h2" id="favorite-playlists"><a href="#favorite-videos" style="color: rebeccapurple" class="mt-1 me-3"><i class="fas fa-angle-double-down"></i></a>Favorite Playlists
  6. <span class="badge bg-primary rounded-pill">{{ playlists.count|default:"0" }}</span>
  7. </h1>
  8. {% if playlists %}
  9. <form method="get" action="{% url 'search' %}" >
  10. <input size="50" class="form-control border border-secondary" type="text"
  11. name="query" placeholder="Search your favorite playlists...">
  12. <input type="text" class="visually-hidden" name="mode" value="playlists">
  13. <input type="text" class="visually-hidden" name="type" value="favorites">
  14. <button type="submit" class="visually-hidden"></button>
  15. </form>
  16. {% endif %}
  17. </div>
  18. <div>
  19. <div class="row row-cols-1 row-cols-md-4 g-4">
  20. {% if playlists %}
  21. {% include 'intercooler/playlists.html' with playlists=playlists %}
  22. {% else %}
  23. <h5 class="text-dark align-content-center">No playlists marked favorite :(</h5>
  24. {% endif %}
  25. </div>
  26. </div>
  27. <br>
  28. <br>
  29. <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
  30. <h1 class="h2" id="favorite-videos"><a href="#favorite-playlists" style="color: rebeccapurple" class="mt-1 me-3"><i class="fas fa-angle-double-up"></i></a>Favorite Videos
  31. <span class="badge bg-primary rounded-pill">{{ videos.count }}</span>
  32. </h1>
  33. {% if videos %}
  34. <form method="get" action="{% url 'search' %}" >
  35. <input size="50" class="form-control border border-secondary" type="text"
  36. name="query" placeholder="Search your favorite videos...">
  37. <input type="text" class="visually-hidden" name="mode" value="videos">
  38. <input type="text" class="visually-hidden" name="type" value="favorite">
  39. <button type="submit" class="visually-hidden"></button>
  40. </form>
  41. {% endif %}
  42. </div>
  43. <div id="favorite-videos">
  44. <div class="row row-cols-1 row-cols-md-3 g-4">
  45. {% if videos %}
  46. {% include 'intercooler/video_cards.html' with videos=videos %}
  47. {% else %}
  48. <h5 class="text-dark align-content-center">No videos marked favorite :(</h5>
  49. {% endif %}
  50. </div>
  51. </div>
  52. <button class="scrollToTopBtn sticky-top bg-danger">
  53. <i class="fa fa-angle-double-up fa-lg"></i></button>
  54. {% endblock %}