Browse Source

Merge remote-tracking branch 'upstream/main'

poesty 1 year ago
parent
commit
86e7e533e6
3 changed files with 24 additions and 3 deletions
  1. 13 1
      assets/style.css
  2. 2 0
      pages/index.php
  3. 9 2
      pages/release.php

+ 13 - 1
assets/style.css

@@ -21,7 +21,8 @@ body {
 }
 
 .wrapper > :first-child,
-.wrapper div > :first-child {
+.wrapper div > :first-child,
+.wrapper details:first-child summary {
   margin-top: 0;
 }
 
@@ -30,6 +31,11 @@ body {
   margin-bottom: 0;
 }
 
+.wrapper p a,
+.wrapper span a {
+  font-weight: bold;
+}
+
 header {
   border-bottom: 1px solid;
 }
@@ -118,6 +124,12 @@ main .wrapper table td:last-child {
   padding-left: 0.5em;
 }
 
+main .wrapper summary {
+  margin: 1em auto;
+  font-weight: bold;
+  cursor: pointer;
+}
+
 main .wrapper .results,
 main .wrapper .results a {
   display: grid;

+ 2 - 0
pages/index.php

@@ -5,6 +5,8 @@
 <p>
   <?= $config["title"] ?> is a simple alternative front-end for <a href="https://bandcamp.com/">Bandcamp</a>.
   <br>
+  It is free and open source software, with its code available on <a href="https://forgejo.sny.sh/sun/Tent">Forgejo</a>.
+  <br>
   It was inspired by <a href="https://invidious.io/">Invidious</a>, <a href="https://nitter.net/">Nitter</a> and the like.
 </p>
 

+ 9 - 2
pages/release.php

@@ -42,6 +42,8 @@
 
     echo "<div class=\"tracks\">";
 
+    echo "<details open>";
+    echo "<summary>Tracklist</summary>";
     echo "<table>";
 
     foreach ($json->trackinfo as $track) {
@@ -82,17 +84,21 @@
     };
 
     echo "</table>";
+    echo "</details>";
 
     $lyrics = $json->current->lyrics;
 
     if ($lyrics) {
-      echo "<p><b>Lyrics</b></p>";
+      echo "<details>";
+      echo "<summary>Lyrics</summary>";
       echo "<p>" . nl2br($json->current->lyrics) . "</p>";
+      echo "</details>";
     };
 
     $recommendations = $document->find(".recommended-album");
 
-    echo "<p><b>Recommendations</b></p>";
+    echo "<details>";
+    echo "<summary>Recommendations</summary>";
     echo "<div class=\"results\">";
 
     foreach ($recommendations as $recommendation) {
@@ -105,6 +111,7 @@
     };
 
     echo "</div>";
+    echo "</details>";
 
     echo "</div>";