Add back button, update filename display

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2024-03-15 00:10:12 +03:00
parent dc596e70ae
commit e30f1a8478
Signed by: mctaylors
GPG key ID: 68BA5E8A5D6D8744
4 changed files with 17 additions and 3 deletions

View file

@ -52,4 +52,9 @@ a.card {
text-align: center;
background-color: #000a;
backdrop-filter: blur(8px);
}
img.svg {
/* #eee, loss: 0.0 */
filter: invert(99%) sepia(4%) saturate(173%) hue-rotate(88deg) brightness(114%) contrast(87%);
}

View file

@ -15,6 +15,12 @@ body {
border-radius: 12px;
}
.card > .button {
width: 32px;
height: 32px;
margin: 12px auto;
}
.content > .title {
font-weight: bold;
}

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"/></svg>

After

Width:  |  Height:  |  Size: 170 B

View file

@ -7,14 +7,16 @@
<meta name="viewport" content="initial-scale=0.75 user-scalable=no" />
</head>
<body>
<a class="card" href="..">
<img src="/assets/svg/arrow_back.svg" alt="" class="svg button" />
</a>
<?php
$request_uri = $_SERVER['REQUEST_URI'];
$filtered_request = urldecode(strtok(substr($request_uri, 1), '?'));
$filtered_request = urldecode(strtok(substr($_SERVER['REQUEST_URI'], 1), '?'));
foreach(glob($filtered_request . '*.mp3') as $file) {
echo '<a class="card" href="/' . $file . '">
<img src="artwork.jpg" alt="" />
<div class="content">
<span class="title">' . $file . '</span>
<span class="title">' . str_replace($filtered_request, '', $file) . '</span>
</div>
</a>';
}