123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- {% load static %}
- {% load humanize %}
- <!doctype html>
- <html class="no-js" lang="">
- <head>
- <title>{% block page_title %}Scrobble all the things{% endblock %} @ Vrobbler</title>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="shortcut icon" type="image/png" href="{% static 'images/favicon.ico' %}"/>
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
- <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
- <script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.10/clipboard.min.js"></script>
- <style type="text/css">
- dl {
- display: flex;
- flex-flow: column wrap;
- border: 1px solid #777;
- }
- dt {
- padding: 2px 4px;
- background: #000;
- color: #fff;
- }
- dd {
- margin: 0;
- padding: 4px;
- min-height: 3em;
- border-right: 1px solid #777;
- }
- .now-playing { margin-right:20px;}
- .now-playing p { margin:0; }
- .now-playing .right { float:right; margin-right:10px; }
- .latest-scrobble {
- width: 50%;
- }
- .now-playing img { height:75px; width: 75px; object-fit: cover; }
- .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;
- }
- .bd-placeholder-img {
- font-size: 1.125rem;
- text-anchor: middle;
- -webkit-user-select: none;
- -moz-user-select: none;
- user-select: none;
- }
- @media (min-width: 768px) {
- .bd-placeholder-img-lg {
- font-size: 3.5rem;
- }
- }
- body {
- font-size: .875rem;
- }
- .feather {
- width: 16px;
- height: 16px;
- vertical-align: text-bottom;
- }
- /*
- * Sidebar
- */
- .sidebar {
- position: fixed;
- top: 0;
- /* rtl:raw:
- right: 0;
- */
- bottom: 0;
- /* rtl:remove */
- left: 0;
- z-index: 100; /* Behind the navbar */
- padding: 48px 0 0; /* Height of navbar */
- box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
- }
- @media (max-width: 767.98px) {
- .sidebar {
- top: 5rem;
- }
- }
- .sidebar-sticky {
- position: relative;
- top: 0;
- height: calc(100vh - 48px);
- padding-top: .5rem;
- overflow-x: hidden;
- overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
- }
- .sidebar .nav-link {
- font-weight: 500;
- color: #333;
- }
- .sidebar .nav-link .feather {
- margin-right: 4px;
- color: #727272;
- }
- .sidebar .nav-link.active {
- color: #2470dc;
- }
- .sidebar .nav-link:hover .feather,
- .sidebar .nav-link.active .feather {
- color: inherit;
- }
- .sidebar-heading {
- font-size: .75rem;
- text-transform: uppercase;
- }
- /*
- * Navbar
- */
- .navbar-brand {
- padding-top: .75rem;
- padding-bottom: .75rem;
- font-size: 1rem;
- background-color: rgba(0, 0, 0, .25);
- box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
- }
- .navbar .navbar-toggler {
- top: .25rem;
- right: 1rem;
- }
- .navbar .form-control {
- padding: .75rem 1rem;
- border-width: 0;
- border-radius: 0;
- }
- .form-control-dark {
- color: #fff;
- background-color: rgba(255, 255, 255, .1);
- border-color: rgba(255, 255, 255, .1);
- }
- .form-control-dark:focus {
- border-color: transparent;
- box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
- }
- #scrobble-form { width: 100% }
- </style>
- {% block head_extra %}{% endblock %}
- <link rel="apple-touch-icon" href="{% static 'images/apple-touch-icon.png' %}">
- </head>
- <body>
- <header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
- <a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="#">Vrobbler</a>
- <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- {% if user.is_authenticated %}
- <form id="scrobble-form" action="{% url 'scrobbles:lookup-manual-scrobble' %}" method="post">
- {% csrf_token %}
- {{ imdb_form }}
- </form>
- {% endif %}
- <div class="navbar-nav">
- <div class="nav-item text-nowrap">
- {% if user.is_authenticated %}
- <a class="nav-link px-3" href="{% url "account_logout" %}">Sign out</a>
- {% else %}
- <a class="nav-link px-3" href="{% url "account_login" %}">Sign in</a>
- {% endif %}
- </div>
- </div>
- </header>
- <div class="container-fluid">
- <div class="row">
- <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
- <div class="position-sticky pt-3">
- {% if messages %}
- <ul style="padding-right:10px;">
- {% for message in messages %}
- <li {% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
- {% endfor %}
- </ul>
- {% endif %}
- <ul class="nav flex-column">
- <li class="nav-item">
- <a class="nav-link active" aria-current="page" href="/">
- <span data-feather="music"></span>
- Dashboard
- </a>
- </li>
- {% if user.is_authenticated %}
- <li class="nav-item">
- <a class="nav-link" aria-current="page" href="/charts/">
- <span data-feather="bar-chart"></span>
- Charts
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" aria-current="page" href="/locations/">
- <span data-feather="map"></span>
- Locations
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/long-plays/">
- <span data-feather="playv"></span>
- Long plays
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/moods/">
- <span data-feather="smiley"></span>
- Moods
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/books/">
- <span data-feather="book"></span>
- Books
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/video-games/">
- <span data-feather="video"></span>
- Video games
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/board-games/">
- <span data-feather="board"></span>
- Board games
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/trails/">
- <span data-feather="trail"></span>
- Trails
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/beers/">
- <span data-feather="beer"></span>
- Beers
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/imports/">
- <span data-feather="log"></span>
- Imports
- </a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="/admin/">
- <span data-feather="key"></span>
- Admin
- </a>
- </li>
- {% endif %}
- </ul>
- {% block extra_nav %}
- {% endblock %}
- <hr/>
- {% if now_playing_list and user.is_authenticated %}
- <ul>
- <b>Now playing</b>
- {% for scrobble in now_playing_list %}
- <div class="now-playing">
- {% if scrobble.media_obj.primary_image_url %}<div style="float:left;padding-right:10px;padding-bottom:10px;"><img src="{{scrobble.media_obj.primary_image_url}}" /></div>{% endif %}
- <p><a href="{{scrobble.media_obj.get_absolute_url}}">{{scrobble.media_obj.title}}</a></p>
- {% if scrobble.media_obj.subtitle %}<p><em><a href="{{scrobble.media_obj.subtitle.get_absolute_url}}">{{scrobble.media_obj.subtitle}}</a></em></p>{% endif %}
- {% if scrobble.logdata %}{% if scrobble.logdata.description %}<p><em>{{scrobble.logdata.description}}</em></p>{% endif %}{% endif %}
- <p><small>{{scrobble.timestamp|naturaltime}} from {{scrobble.source}}</small></p>
- <div class="progress-bar" style="margin-right:5px;">
- <span class="progress-bar-fill" style="width: {{scrobble.percent_played}}%;"></span>
- </div>
- <p class="action-buttons">
- <a href="{% url "scrobbles:cancel" scrobble.uuid %}">Cancel</a>
- <a class="right" href="{% url "scrobbles:finish" scrobble.uuid %}">Finish</a>
- </p>
- {% if not forloop.last %}<hr/>{% endif %}
- </div>
- {% endfor %}
- </ul>
- {% if now_playing_list|length > 1 %}<hr/>{% endif %}
- {% endif %}
- {% if active_imports %}
- {% for import in active_imports %}
- <ul style="padding-right:10px;">
- <li>Import in progress ({{import.processing_started|naturaltime}})</li>
- </ul>
- {% endfor %}
- {% endif %}
- </div>
- </nav>
- {% block content %}
- {% endblock %}
- </div>
- </div>
- {% block extra_js %}{% endblock %}
- </body>
- </html>
|