<!DOCTYPE html>
<html lang="{{ locale }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="description" content="Coin !">

    <title>Nathan Boiron</title>

    <link rel="icon" href="/favicon.ico">

    <link rel="stylesheet" href="/css/style.css">
</head>

{% block body %}{% endblock %}

{% block js %}{% endblock %}

<script type="text/javascript">
    (function () {
        if (localStorage.theme === 'dark' || (!'theme' in localStorage && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
            document.querySelector('html').classList.add('dark');
        } else if (localStorage.theme === 'dark') {
            document.querySelector('html').classList.add('dark');
        }
    })();
</script>
</html>

<!DOCTYPE html>
<html lang="{{ locale }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="description" content="Coin !">

    <title>Nathan Boiron</title>

    <link rel="icon" href="/favicon.ico">

    <link rel="stylesheet" href="/css/style.css">
</head>

{% block body %}{% endblock %}

{% block js %}{% endblock %}

<script type="text/javascript">
    (function () {
        if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
            document.querySelector('html').classList.add('dark');
        } else {
            document.querySelector('html').classList.remove('dark');
        }
    })();
</script>
</html>

Fix native dark mode detection
Fix native dark mode detection
