Compare commits

...

4 Commits
0.1.4 ... 0.1.6

4 changed files with 58 additions and 30 deletions

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "vrobbler"
version = "0.1.4"
version = "0.1.6"
description = ""
authors = ["Colin Powell <colin@unbl.ink>"]

25
templates/base.html Normal file
View File

@ -0,0 +1,25 @@
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Untitled</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">
You are using an <strong>outdated</strong> browser. Please
<a href="http://browsehappy.com/">upgrade your browser</a> to improve
your experience.
</p>
<![endif]-->
</body>
</html>

View File

@ -16,12 +16,11 @@
dl {
display: flex;
flex-flow: column wrap;
max-height: 6em;
border: 1px solid #777;
}
dt {
padding: 2px 4px;
background: #777;
background: #000;
color: #fff;
}
dd {
@ -30,29 +29,25 @@
min-height: 3em;
border-right: 1px solid #777;
}
#library-update-status { margin-right:10px; }
.card img { width:18em; padding: 1em; }
.card-block { padding: 1em 0 1em 0; }
.system-badge { padding: 1em; font-size: normal; }
.updating { color:#aaa; margin-right: 8px; }
.high { color: green; }
.medium { color: #aaa;}
.low { color: red; }
.card {
height: auto;
display: flex;
.latest-scrobble {
width: 50%;
}
.card-columns{
display: grid;
overflow: hidden;
grid-template-columns: repeat(2, 1fr);
grid-auto-rows: 1fr;
grid-column-gap: 20px;
grid-row-gap: 10px;
.progress-bar {
width: 100%;
background-color: #e0e0e0;
padding: 3px;
border-radius: 3px;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2);
}
.progress-bar-fill {
display: block;
height: 22px;
background-color: #659cef;
border-radius: 3px;
transition: width 500ms ease-in-out;
}
{% for system in game_systems %}
.{{system.retropie_slug}} { background: #{{system.get_color}}; }
{% endfor %}
</style>
{% block head_extra %}{% endblock %}

View File

@ -5,16 +5,24 @@
{% block content %}
{% if now_playing_list %}
<h2>Now playing</h2>
<ul>
{% for scrobble in now_playing_list %}
<li>{{scrobble.timestamp|date:"D, M j Y"}}: <a href="https://www.imdb.com/title/{{scrobble.video.imdb_id}}">{{scrobble.video}}</a></li>
{% endfor %}
</ul>
{% for scrobble in now_playing_list %}
<dl class="latest-scrobble">
<dt>{{scrobble.video.title}} - {{scrobble.video}}</dt>
<dd>
{{scrobble.timestamp|date:"D, M j Y"}} |
<a href="https://www.imdb.com/title/{{scrobble.video.imdb_id}}">IMDB</a>
<div class="progress-bar">
<span class="progress-bar-fill" style="width: {{scrobble.percent_played}}%;"></span>
</div>
</dd>
</dl>
<br />
{% endfor %}
{% endif %}
<h2>Last scrobbles</h2>
<ul>
{% for scrobble in object_list %}
<li>{{scrobble.timestamp|date:"D, M j Y"}}: <a href="https://www.imdb.com/title/{{scrobble.video.imdb_id}}">{{scrobble.video}}</a></li>
<li>{{scrobble.timestamp|date:"D, M j Y"}}: <a href="https://www.imdb.com/title/{{scrobble.video.imdb_id}}">{{scrobble.video}}{% if scrobble.video.video_type == 'E' %} - {{scrobble.video.title}}{% endif %}</a></li>
{% endfor %}
</ul>
{% endblock %}