]> littlesong.place Git - littlesongplace.git/commitdiff
Add dreams archive page
authorChris Fulljames <christianfulljames@gmail.com>
Sat, 21 Feb 2026 15:55:42 +0000 (10:55 -0500)
committerChris Fulljames <christianfulljames@gmail.com>
Sat, 21 Feb 2026 15:55:42 +0000 (10:55 -0500)
src/littlesongplace/__init__.py
src/littlesongplace/templates/base.html
src/littlesongplace/templates/dreams-archive.html [new file with mode: 0644]
src/littlesongplace/templates/edit-song.html

index abd9426ec51ce3337225c2740d27af2122662d97..546266b999bab86d9b0937c1f84317eee23583f9 100644 (file)
@@ -107,6 +107,11 @@ def about():
 def settings():
     return render_template("settings.html")
 
+@app.get("/dreams-archive")
+def dreams_archive():
+    page_songs = songs.get_all_for_tag("dreams_archive")
+    return render_template("dreams-archive.html", songs=page_songs)
+
 @app.get("/service.js")
 def service_worker():
     return send_from_directory("static", "service.js")
index 707af056af34102e19b4b60c92b64a342c23bbe7..7e17fa20da050c92f1a5ae6c92bc3138352d97e8 100644 (file)
@@ -52,6 +52,7 @@
                         <a href="/about">About</a>
                         <a href="/site-news">News</a>
                         <a href="/songs">Random</a>
+                        <a href="/dreams-archive">Dreams Archive</a>
                     </div>
 
                     <div class="navbar">
diff --git a/src/littlesongplace/templates/dreams-archive.html b/src/littlesongplace/templates/dreams-archive.html
new file mode 100644 (file)
index 0000000..be8f57e
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block title %}Songs{% endblock %}
+
+{% block body %}
+
+<h1>dreams archive</h1>
+
+<p>This music was made in <a href="https://indreams.me">Dreams</a> on PlayStation.</p>
+<p><small>To add a song to the archive, simply give it the <tt><b>dreams_archive</b></tt> tag.</small></p>
+
+{% from "song-macros.html" import song_list %}
+{{ song_list(songs, current_user_playlists) }}
+
+{% endblock %}
index ea01b9f84c6c6b58a664b4d2e2546e4e91e15ff7..fee4e5d6449a960e3ad560db427455f415c73dc4 100644 (file)
@@ -57,7 +57,8 @@
     </div>
     <div class="upload-form">
         <label for="tags">Tags</label><br>
-        <input type="text" name="tags" placeholder="country, extratone, vocals, ..." value="{{ ", ".join(song.tags) }}" maxlength="350">
+        <small>Made in Dreams? Use the <a href="/dreams-archive"><tt><b>dreams_archive</b></tt></a> tag!</small><br>
+        <input type="text" name="tags" id="tags" placeholder="dreams_archive, extratone, vocals, ..." value="{{ ", ".join(song.tags) }}" maxlength="350">
     </div>
     <div class="upload-form">
         <label for="collabs">Collaborators</label><br>
@@ -127,6 +128,8 @@ function selectUploadMethod() {
         document.getElementById("song-duration-container").required = true;
 
         document.getElementById("fade-out-container").hidden = false;
+
+        document.getElementById("tags").value = "dreams_archive, "
     }
 }