2024-10-29 10:53:46 -04:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<title>Pyrite</title>
|
2024-10-30 12:53:42 -04:00
|
|
|
<link rel="stylesheet" type="text/css" href="./static/pyrite.css">
|
2024-10-29 10:53:46 -04:00
|
|
|
<script type="text/javascript" src="./static/pyrite.js"></script>
|
|
|
|
<script>window.onload = init;</script>
|
2024-10-30 12:53:42 -04:00
|
|
|
<link rel="manifest" href="./static/pyrite.webmanifest">
|
2024-10-29 10:53:46 -04:00
|
|
|
</head>
|
|
|
|
<body>
|
2024-10-30 12:53:42 -04:00
|
|
|
<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>
|
2024-11-12 13:49:35 -05:00
|
|
|
<button id="prev-track-btn" class="btn" onclick="prevTrack()">
|
|
|
|
<img id="prev" src="./static/prev.svg"></img>
|
|
|
|
</button>
|
|
|
|
<button id="play-btn" class="btn" onclick="playTrack()">
|
|
|
|
<img id="prev" src="./static/play.svg"></img>
|
|
|
|
</button>
|
|
|
|
<button id="pause-btn" class="btn" onclick="pauseTrack()" style="display:none">
|
|
|
|
<img id="prev" src="./static/pause.svg"></img>
|
|
|
|
</button>
|
|
|
|
<button id="next-track-btn" class="btn" onclick="nextTrack()">
|
|
|
|
<img id="prev" src="./static/prev.svg"></img>
|
|
|
|
</button>
|
|
|
|
<input type="range" id="seek-slider" max="100" value="0">
|
2024-10-30 12:53:42 -04:00
|
|
|
</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>
|
2024-10-29 10:53:46 -04:00
|
|
|
</html>
|