74 lines
2.6 KiB
HTML
74 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Pyrite</title>
|
|
<link rel="stylesheet" type="text/css" href="./static/pyrite.css">
|
|
<script type="text/javascript" src="./static/pyrite.js"></script>
|
|
<script>window.onload = init;</script>
|
|
<link rel="manifest" href="./static/pyrite.webmanifest">
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<header>
|
|
<h1>Pyrite</h1>
|
|
</header>
|
|
<div id="artist_list" class="list">
|
|
{% for artist in artists %}
|
|
<label for="artist_{{ loop.index }}">
|
|
<input type="radio" id="artist_{{ loop.index }}" name="artist" value="{{ artist }}" onclick="select_artist(event)">
|
|
<div class="list_item artist">
|
|
<span class="artist_name">{{ artist }}</span>
|
|
</div>
|
|
</label>
|
|
{% endfor %}
|
|
</div>
|
|
<div id="album_list" class="list">
|
|
</div>
|
|
<div id="track_list" class="list">
|
|
</div>
|
|
<div id="player_container">
|
|
<span id="playlist_container">
|
|
<select id="playlist" onchange="select_playlist(event)">
|
|
{% for playlist in playlists %}
|
|
<option value="{{ playlist }}"{% if playlist == request.cookies.get('playlist') %} selected{% endif %}>{{ playlist }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</span>
|
|
<span id="cover_art"><img alt="Album cover art" src=""></span>
|
|
<span id="player_controls">
|
|
<h4><span id="now_playing_artist"></span> - <span id="now_playing_album"></span></h4>
|
|
<h3 id="now_playing_title"></h3>
|
|
<audio id="player" controls></audio>
|
|
<button id="play-btn" onclick="playTrack()">Play</button>
|
|
<button id="pause-btn" onclick="pauseTrack()">Pause</button>
|
|
</span>
|
|
</div>
|
|
</main>
|
|
<template id="artist_template">
|
|
<label for="artist_$n">
|
|
<input type="radio" id="artist_$n" name="artist" value="$artist_name" onclick="select_artist(event)">
|
|
<div class="list_item artist">
|
|
<span class="artist_name">$artist_name</span>
|
|
</div>
|
|
</label>
|
|
</template>
|
|
<template id="album_template">
|
|
<label for="album_$n">
|
|
<input type="radio" id="album_$n" name="album" value="$album_name" onclick="select_album(event)">
|
|
<div class="list_item album">
|
|
<img src="$cover_art_url"><span class="album_name">$album_name</span><span class="album_year">$album_year</span>
|
|
</div>
|
|
</label>
|
|
</template>
|
|
<template id="track_template">
|
|
<label for="track_$n">
|
|
<input type="radio" id="track_$n" name="track" value="$track_title" onclick="select_track(event)">
|
|
<div class="list_item track">
|
|
<span class="track_num">$disc_num.$track_num</span><span class="track_title">$track_title</span><span class="track_length">$track_len</span>
|
|
</div>
|
|
</label>
|
|
</template>
|
|
</body>
|
|
</body>
|
|
</html>
|