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

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-zoom=user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <title>Be my Anchor - {{ url }} </title>
    <link rel="stylesheet" href="{{ prefix }}/{{ url_for('static', filename='css/main.css') }}">
    <script>
        // 定义全局路径前缀
        window.prefix = "{{ prefix }}";
        // 初始化音频源
        window.audioSource = "{{ prefix }}/{{ url_for('static', filename='test.mp3') }}";
    </script>
    <script src="{{ prefix }}/{{ url_for('static', filename='js/main.js') }}"></script>

</head>

<body>
    <header>
        <!-- 左侧历史按钮 -->
        <button class="history-button" onclick="toggleHistory()">
            <img src="{{ prefix }}/{{ url_for('static', filename='icons/clock.png') }}" alt="History">
        </button>

        <!-- 中间Logo和标题 -->
        <div class="branding">
            <img src="{{ prefix }}/{{ url_for('static', filename='logo.png') }}" alt="Logo" class="brand-logo">
            <span class="site-name">Be my Anchor</span>
        </div>

        <!-- 右侧菜单组 -->
        <div class="nav-group">
            <div class="menu">
                <button class="menu-button" onclick="toggleMenu(event)">
                    <img src="{{ prefix }}/{{ url_for('static', filename='icons/people.png') }}" alt="Menu">
                </button>
                <!-- 菜单下拉内容 -->
                <div class="menu-dropdown" id="mainMenu">
                    <a href="{{ prefix }}/" class="menu-item">Home</a>
                    <a href="{{ prefix }}/report" class="menu-item">Report Issue</a>
                    <a href="{{ prefix }}/login" class="menu-item" id="loginItem">Login</a>
                </div>
            </div>
        </div>
    </header>

    <!-- 历史记录面板结构 -->
    <div class="history-panel" id="historyPanel">
        <button class="history-close" onclick="toggleHistory()">
            <img src="{{ prefix }}/{{ url_for('static', filename='icons/play-pause.png') }}" alt="Close">
        </button>

        <div class="history-content">
            <div class="history-item">
                <span class="timestamp">10:30</span>
                <span class="title">文章标题示例 1</span>
            </div>
            <!-- 更多历史记录项... -->
            <div class="history-item">
                <span class="timestamp">11:45</span>
                <span class="title">文章标题示例 20</span>
            </div>
        </div>
    </div>

    <main>
        <div class="image-container">
            <img src="{{ prefix }}/{{ url_for('static', filename='logo.png') }}" alt="Cover">
        </div>

        <!-- 独立文字容器 -->
        <div class="text-content">
            <div class="url">{{url}}</div>
            <div class="summary">{{summary}}</div>
        </div>
    </main>

    <!-- page.html 修改后的按钮部分 -->
<footer>
    <button class="control-button jump-back">
        <img src="{{ prefix }}/static/icons/back.png" alt="-15s">
    </button>

    <button class="control-button" id="playButton">
        <img src="{{ prefix }}/static/icons/play.png" alt="Play/Pause">
    </button>

    <div class="progress-bar">
        <div class="progress-fill"></div>
    </div>

    <button class="control-button jump-forward">
        <img src="{{ prefix }}/static/icons/fast.png" alt="+15s">
    </button>
</footer>

    <audio id="audioPlayer" src="{{ prefix }}/{{ url_for('static', filename='test.mp3') }}"></audio>
</body>

</html>