@app.route("/")
def index():
- users = [row["username"] for row in query_db("select username from users")]
+ users = [row["username"] for row in query_db("select username from users order by username asc")]
songs = Song.get_latest(50)
song_list = render_template("song-list.html", songs=songs)
return render_template("index.html", users=users, song_list=song_list)
margin: 10px;
}
+.profile-link {
+ font-weight: bold;
+ color: var(--pink);
+}
+
+.user-list-entry {
+ padding: 5px;
+}
+
/* Navbar */
div.navbar {
display: flex;
<!-- TODO: Show song title, artist -->
<span id="player-title">Not Playing</span>
<span id="player-info-sep" hidden>-</span>
- <a id="player-artist" hidden></a>
+ <a id="player-artist" class="profile-link" hidden></a>
</div>
<div class="player-controls">
<a href="javascript:songPrevious()" class="player-button">
<p>Hello, and welcome!</p>
<p>
-I created this website because I wanted a little place where a few friends can
+I created this website because I wanted a little place where a few friends could
share songs with each other. There are lots of <em>big</em> places for this
-already of course, but they all feel too cold and impersonal to me. I figure
-maybe some of you also feel the same way, so I made this little song place just
-for us.
+already of course, but they all feel so noisy and cold and impersonal to me. I
+figure maybe some of you also feel the same way, so I made this little song
+place just for us.
</p>
<p>
</p>
<h2>Profiles</h2>
-<p>Check out the music of the fine folks below! If you create an account, you'll show up here too.</p>
+<p>Check out the music of the fine folks below!{% if not session["userid"] %} If you create an account, you'll show up here too.{% endif %}</p>
{% for user in users %}
-<a href="/users/{{ user }}">{{ user }}</a><br>
+<a href="/users/{{ user }}" class="profile-link user-list-entry">{{ user }}</a>
+
{% endfor %}
<h2>Recently Uploaded Songs</h2>
-
<!-- Song Artist -->
- <a href="/users/{{ song.username }}" class="song-username">{{ song.username }}</a>
+ <a href="/users/{{ song.username }}" class="profile-link">{{ song.username }}</a>
<!-- Song Collaborators -->
<div class="song-collabs">
{% for collab in song.collaborators %}
{% if collab.startswith("@") %}
- <a href="/users/{{ collab[1:] }}" class="collab-link">{{ collab }}</a>
+ <a href="/users/{{ collab[1:] }}" class="profile-link">{{ collab[1:] }}</a>
{% else %}
<span class="collab-name">{{ collab }}</span>
{% endif %}
- Shuffle all
- Homepage activity log
- Admin accounts
+- Song downloads
- AJAX pages so songs can play during navigation
- Play Queue:
- Add songs