summaryrefslogtreecommitdiff
path: root/index.php
blob: 2e367b5d2ef0ca894b60621998013a978e4baa09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
require_once __DIR__ . '/lib/bbcnext.php';

stream_context_set_default(['http' => [
    'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36',
]]);
?>
<!doctype html>
<html lang="en-GB">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width,initial-scale=1"/>
        <title>sounds-retro</title>
        <script src="static/hls.light.min.js" defer></script>
        <?php foreach (array_diff(scandir(__DIR__ . '/theme'), ['.', '..']) as $theme): ?>
            <link rel="<?=$theme=='Default'?'':'alternate '?>stylesheet"
                  href="theme/<?=$theme?>/main.css"
                  title="<?=$theme?>"/>
        <?php endforeach; ?>
    </head>

    <body>
        <header>
            <a href="."><frontend-name>RMS Frontend</frontend-name></a>
            <form id="search-form" action="search.php">
                <input name="query" placeholder="Query…"/>
                <input type="submit" value="Search"/>
            </form>
        </header>

        <main>
            <?php next_renderFromRms($_GET['path'] ?? RMS_SOUNDS_HOME); ?>
        </main>
    </body>
</html>