<!DOCTYPE html>
<html lang="pl">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Lewandowski Stats{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
    <meta property="og:title" content="Robert Lewandowski Stats">
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://lewy.7o7.cx/">
    <meta property="og:description" content="Najnowsze informacje o meczach, golach, asystach i innych statystykach">
    <meta property="og:image" content="{{ url_for('static', filename='lewandowski.jpg') }}">
    <meta property="og:image:height" content="143">
    <meta property="og:image:width" content="100">
</head>

<body>
    <header class="base-header">
        <nav class="navbar">
            <a class="logo-link" href="/"><div class="logo-text">Robert Lewandowski</div></a>
            <ul class="nav-links">
                <li><a href="/">Strona główna</a></li>
                <li><a href="/mecze">Mecze</a></li>
                <li><a href="/statystyki">Statystyki</a></li>
                <li><a href="/club">Kluby</a></li> 
                <li><a href="/representation">Reprezentacja</a></li>
                <li><a href="/trophies">Trofea</a></li>
                <li><a href="/compare">Porównaj</a></li>
                <li><button id="theme-toggle" onclick="toggleTheme()"></button></li>
            </ul>
            <div class="hamburger">☰</div>
        </nav>

        <div class="header-content">
            <div class="profile-image">
                <img src="{{ url_for('static', filename='lewandowski_no_bg.png') }}" alt="Robert Lewandowski">
                <div class="profile-image-cover"></div>
            </div>
            <h1>Statystyki <br><span class="header-content-special"> Roberta <br> Lewandowskiego</span></h1>
        </div>
        <div></div>
    </header>

    <main>
        {% block content %}{% endblock %}
    </main>
    <script>
        const hamburger = document.querySelector('.hamburger');
        const navLinks = document.querySelector('.nav-links');
        hamburger.addEventListener('click', () => {
            navLinks.classList.toggle('show');
        });
    </script>
    <script>
        function toggleTheme() {
            const currentMode = document.body.classList.contains('poland-mode') ? 'poland' : 'fcb';
            const newMode = currentMode === 'fcb' ? 'poland' : 'fcb';
            document.body.classList.toggle('poland-mode');
            localStorage.setItem('theme', newMode);
        }

        window.onload = function () {
            const savedTheme = localStorage.getItem('theme');
            if (savedTheme === 'poland') {
                document.body.classList.add('poland-mode');
            }
        }
    </script>

    <!--!>Footer<-->
    <hr style='width: 50%' />
    {% block footer %}{% endblock %}

</body>

</html>