123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- {% extends "base_list.html" %}
- {% load mathfilters %}
- {% load static %}
- {% load naturalduration %}
- {% block title %}{{object.title}}{% endblock %}
- {% block head_extra %}
- <style>
- .cover {float:left; width:412px; margin-right:10px; padding-bottom:15px;}
- .image-wrapper { contain: content; }
- .caption {
- position: fixed;
- top: 15px;
- left: 30px;
- padding: 5px;
- font-size: 110%;
- font-weight: bold;
- color:white;
- background:rgba(0,0,0,0.4);
- }
- .caption-footer {
- position: fixed;
- bottom: 30px;
- left: 30px;
- padding: 5px;
- font-size: 110%;
- font-weight: bold;
- color:white;
- background:rgba(0,0,0,0.4);
- }
- .summary {
- float: left;
- width: 600px;
- margin-left: 10px;
- }
- </style>
- {% endblock %}
- {% block lists %}
- <div class="row">
- {% if object.primary_image_url %}
- <div class="cover image-wrapper">
- {% if object.rating %}<div class="caption">{{object.rating}}</div>{% endif %}
- <img src="{{object.primary_image_url}}" />
- <div class="caption-footer">{{object.release_year}}</div>
- </div>
- {% endif %}
- <div class="summary">
- {% if object.summary %}
- <p>{{object.summary|safe|linebreaks|truncatewords:160}}</p>
- <hr />
- {% endif %}
- <p style="float:right;">
- <a href="{{object.igdb_link}}"><img src="{% static "images/igdb-logo.png" %}" width=35></a>
- <a href="{{object.hltb_link}}"><img style="background: black;" src="{% static "images/hltb.webp" %}" width=35></a>
- </p>
- </div>
- </div>
- <div class="row">
- <p>{{object.scrobble_set.count}} scrobbles</p>
- {% if object.scrobble_set.last.long_play_seconds %}
- <p>{{object.scrobble_set.last.long_play_seconds|natural_duration}}{% if object.scrobble_set.last.long_play_complete %} and completed{% else %} spent playing{% endif %}</p>
- {% endif %}
- <p>
- {% if object.scrobble_set.last.long_play_complete == True %}
- <a href="">Play again</a>
- {% else %}
- <a href="{{object.start_url}}">Resume playing</a>
- {% endif %}
- </p>
- </div>
- <div class="row">
- <div class="col-md">
- <h3>Last scrobbles</h3>
- <div class="table-responsive">
- <table class="table table-striped table-sm">
- <thead>
- <tr>
- <th scope="col">Date</th>
- <th scope="col">Completed</th>
- <th scope="col">Duration</th>
- <th scope="col">Platforms</th>
- <th scope="col">State file</th>
- </tr>
- </thead>
- <tbody>
- {% for scrobble in object.scrobble_set.all|dictsortreversed:"timestamp" %}
- <tr>
- <td>{{scrobble.local-timestamp}}</td>
- <td>{% if scrobble.long_play_complete == True %}Yes{% else %}Not yet{% endif %}</td>
- <td>{% if scrobble.in_progress %}Now playing{% else %}{{scrobble.playback_position_seconds|natural_duration}}{% endif %}</td>
- <td>{% for platform in scrobble.video_game.platforms.all %}<a href="{{platform.get_absolute_url}}">{{platform}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
- <td>{% if scrobble.videogame_save_data %}<a href="{{scrobble.videogame_save_data.url}}">Save data</a>{% else %}Not yet{% endif %}</td>
- <td>{% if scrobble.screenshot%}<img src="{{scrobble.screenshot.url}}" width=250 />{% endif %}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- {% endblock %}
|