]> littlesong.place Git - littlesongplace.git/commitdiff
Minor profile link improvements
authorChris Fulljames <christianfulljames@gmail.com>
Mon, 20 Jan 2025 23:47:50 +0000 (18:47 -0500)
committerChris Fulljames <christianfulljames@gmail.com>
Mon, 20 Jan 2025 23:47:56 +0000 (18:47 -0500)
main.py
static/styles.css
templates/base.html
templates/index.html
templates/song-list.html
todo.txt

diff --git a/main.py b/main.py
index 1b8e9049a85fc5604915393dd47bbd9bebef19fa..925a04817beb6ef532d0df8eafc6fa735ca872a3 100644 (file)
--- a/main.py
+++ b/main.py
@@ -52,7 +52,7 @@ if "DATA_DIR" in os.environ:
 
 @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)
index 74b3f6ef7e8abfecfb260bdff5e3c4da7c706a89..1a3cae71da4587bd149df74f7da04b3f7cb4a419 100644 (file)
@@ -85,6 +85,15 @@ div.page-header {
     margin: 10px;
 }
 
+.profile-link {
+    font-weight: bold;
+    color: var(--pink);
+}
+
+.user-list-entry {
+    padding: 5px;
+}
+
 /* Navbar */
 div.navbar {
     display: flex;
index f745f3fe7dcb1136ceaabc97c7daf17c8aa8ccdf..79e3492e9c1e630b5a868dbeadb4ee646ac8f353 100644 (file)
@@ -58,7 +58,7 @@
                     <!-- 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">
index 5070de12b989f629c206f1d6caac8ef5de7f0d02..0014dd7deb3ee9132a9cde1684ba545bb3b6133d 100644 (file)
@@ -9,11 +9,11 @@
 <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>
@@ -25,10 +25,11 @@ feedback you might have!  Just send me (cfull) a message on Discord. :)
 </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>
index c445a8d96dac8dda5f95dab93c0f38b4f27fad3e..a6457a4f5ad839f70afe9b5f04065590d3c0e581 100644 (file)
                 -
 
                 <!-- 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 %}
index d9b0e8bf5ef7cdd72ea8dd0eb959c96892b7e4ca..33860ab707a34c1772788b62f2c9788d37a2b428 100644 (file)
--- a/todo.txt
+++ b/todo.txt
@@ -10,6 +10,7 @@ TODO (AFTER RELEASE)
 - Shuffle all
 - Homepage activity log
 - Admin accounts
+- Song downloads
 - AJAX pages so songs can play during navigation
 - Play Queue:
     - Add songs