<div id="sidebar-wrapper" class="inline-block">
	<div id="sidebar" class="inline-block">
		<aside>
			<div class="container" style="font-size: 14px;">
				<b style="font-size: 20px;">Theme</b>
				<br>
                <?php
                    // List of themes and a condition to test if it's deselected (!)
                    $themes = [
                        "auto" => $_COOKIE["theme"],
                        "light" => $_COOKIE["theme"] != "light",
                        "dark" => $_COOKIE["theme"] != "dark"
                    ];
                ?>
                <?php foreach ($themes as $name=>$condition): ?>
                    <a class="theme-btn <?= $condition ? "" : "selected" ?>" data-theme="<?= $name ?>" href="/api/set_theme/<?= $name ?>.php"><?= ucwords($name) . ($condition ? "" : " &#10003;") ?></a>
                    <br>
                <?php endforeach; ?>
			</div>
		</aside>
	</div>
</div>