video_detail.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {% extends "base_list.html" %}
  2. {% load static %}
  3. {% block title %}{{object.title}}{% endblock %}
  4. {% block head_extra %}
  5. <style>
  6. .cover {float:left; width:412px; margin-right:10px; padding-bottom:15px;}
  7. .summary {float:left; width:600px; margin-left:10px;}
  8. .header {padding-bottom:15px;}
  9. .image-wrapper { contain: content; }
  10. .caption {
  11. position: fixed;
  12. top: 15px;
  13. left: 30px;
  14. padding: 5px;
  15. font-size: 110%;
  16. font-weight: bold;
  17. color:white;
  18. background:rgba(0,0,0,0.4);
  19. }
  20. .caption-footer {
  21. position: fixed;
  22. bottom: 30px;
  23. left: 30px;
  24. padding: 5px;
  25. font-size: 110%;
  26. font-weight: bold;
  27. color:white;
  28. background:rgba(0,0,0,0.4);
  29. }
  30. dl {
  31. display: flex;
  32. flex-flow: row wrap;
  33. padding-right:20px;
  34. border:none;
  35. }
  36. dt {
  37. flex-basis: 20%;
  38. padding: 5px;
  39. background: #3cf;
  40. text-align: right;
  41. color: #fff;
  42. }
  43. dd {
  44. flex-basis: 70%;
  45. flex-grow: 1;
  46. margin: 0;
  47. padding: 5px;
  48. border:none;
  49. }
  50. </style>
  51. {% endblock %}
  52. {% block lists %}
  53. <div class="row header">
  54. <div class="cover image-wrapper">
  55. {% if object.imdb_rating %}<div class="caption">{{object.imdb_rating}}</div>{% endif %}
  56. <img src="{% if object.cover_image %}{{object.cover_image.url}}{% else %}{% static 'images/no-video-cover.jpg' %}{% endif %}" width="400px" />
  57. <div class="caption-footer">{{object.year}}{% if object.tv_series %} | <b>S</b>{{object.season_number}} <b>E</b>{{object.episode_number}}{% endif %}</div>
  58. </div>
  59. <div class="summary">
  60. {% if object.tv_series %}<h4><a href="{{object.tv_series.get_absolute_url}}">{{object.tv_series}}</a> - S{{object.season_number}}E{{object.episode_number}}</h4>{% endif %}
  61. {% if object.overview %}<p><em>{{object.overview}}</em></p>{% endif %}
  62. {% if object.plot%}<p>{{object.plot|safe|linebreaks|truncatewords:160}}</p>{% endif %}
  63. <hr />
  64. <p style="float:right;">
  65. <a href="{{object.imdb_link}}"><img src="{% static " images/imdb_logo.png" %}" width=35></a>
  66. </p>
  67. </div>
  68. <div class="deets">
  69. </div>
  70. </div>
  71. <div class="row">
  72. <div class="col-md">
  73. <h3>Last scrobbles</h3>
  74. <div class="table-responsive">
  75. <table class="table table-striped table-sm">
  76. <thead>
  77. <tr>
  78. <th scope="col">Date</th>
  79. </tr>
  80. </thead>
  81. <tbody>
  82. {% for scrobble in object.scrobble_set.all %}
  83. <tr>
  84. <td>{{scrobble.timestamp}}</td>
  85. </tr>
  86. {% endfor %}
  87. </tbody>
  88. </table>
  89. </div>
  90. </div>
  91. </div>
  92. {% endblock %}