playlist_watch_message.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {% load humanize %}
  2. {% with all_videos_unavailable=playlist.all_videos_unavailable percent_complete=playlist.get_percent_complete %}
  3. <div class="py-2 bg-light rounded-3">
  4. <div class="d-flex justify-content-center">
  5. <span class="h3 ms-3 {% if percent_complete == 0 or all_videos_unavailable %}w-75{% endif %}" style="color: #70777E">
  6. {% if percent_complete == 0 or all_videos_unavailable %}
  7. <i class="fas fa-sun fa-spin" style="color: {% if not all_videos_unavailable %}#d0bc0b{% else %}red{% endif %};"></i>
  8. Yay, you marked a playlist as watching! {% if all_videos_unavailable %}However, there's no videos in this playlist you can mark as 'watched' :({% else %}This message will keep updating as you mark videos as watched. Good luck!{% endif %}
  9. <i class="fas fa-sun fa-spin" style="color: {% if not all_videos_unavailable %}#d0bc0b{% else %}red{% endif %}"></i>
  10. {% else %}
  11. {% if percent_complete == 100 %}
  12. <i class="fas fa-flag-checkered" style="color: #2c9c6b"></i>
  13. {% endif %}
  14. <span style="color: #2c9c2c">{{ playlist.get_watched_videos_count }}</span>
  15. /
  16. <span {% if percent_complete == 100 %}style="color: #2c9c2c"{% endif %}>{{ playlist.get_watchable_videos_count }}</span> (<span style="color: #2c9c2c">{{ percent_complete }}%</span>) <span {% if percent_complete == 100 %}style="color: #2c9c2c"{% endif %}> watched!</span>
  17. {% if percent_complete != 100 %}<span class="text-dark" style="border-bottom: 3px #e760f1 dashed; {% if percent_complete >= 70 and percent_complete != 100 %}background: linear-gradient(-45deg, #AE876B, #ABA27B, #A7BC8A, #A3D69A);
  18. background-size: 400% 400%; animation: gradient 7s ease infinite;{% endif %}">{{ playlist.get_watch_time_left }}</span> left to go!{% endif %}
  19. {% if percent_complete == 100 %}
  20. <i class="fas fa-flag-checkered" style="color: #2c9c6b"></i>
  21. {% elif percent_complete >= 90 %}
  22. <i class="fas fa-glass-cheers" style="color: #9C2C42FF"></i>
  23. {% elif percent_complete >= 75 %}
  24. <i class="fas fa-cocktail" style="color: #9C2C42FF"></i>
  25. {% elif percent_complete >= 60 %}
  26. <i class="fas fa-glass-martini" style="color: #9C2C42FF"></i>
  27. {% elif percent_complete >= 40 %}
  28. <i class="fas fa-glass-martini-alt" style="color: #9C2C42FF"></i>
  29. {% elif percent_complete >= 20 %}
  30. <i class="fas fa-mug-hot" style="color: #9C2C42FF"></i>
  31. {% elif percent_complete >= 0 %}
  32. <i class="fas fa-coffee" style="color: #9C2C42FF"></i>
  33. {% endif %}
  34. {% endif %}
  35. </span>
  36. </div>
  37. {% if percent_complete == 100 %}
  38. <!--
  39. <div class="d-flex justify-content-center h5">
  40. Started {{ playlist.started_on|naturaltime }}
  41. </div>
  42. <div class="d-flex justify-content-center h5">
  43. Finished {{ playlist.last_watched|naturaltime }}
  44. </div>
  45. -->
  46. <div class="d-flex justify-content-center mt-2">
  47. <a class="btn btn-danger" href="{% url 'reset_watched' playlist.playlist_id %}">Reset</a>
  48. </div>
  49. {% endif %}
  50. </div>
  51. {% endwith %}