<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.4.2/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" id="theme" href="/static/white.css">

<script>
$(document).ready(function() {
    const themeFromLocal = localStorage.getItem("theme");
    const themes = ["white", "dark", "ocean"];
    const currentTheme = themes.includes(themeFromLocal) ? themeFromLocal : "white";
    $("#theme").attr("href", `/static/${currentTheme}.css`);
});
</script>