File size: 4,651 Bytes
1404692
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}Telegram Stremio{% endblock %}</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" />
    
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '{{ theme.colors.primary }}',
                        secondary: '{{ theme.colors.secondary }}',
                        accent: '{{ theme.colors.accent }}',
                        background: '{{ theme.colors.background }}',
                        card: '{{ theme.colors.card }}',
                        text: '{{ theme.colors.text }}',
                        'text-secondary': '{{ theme.colors.text_secondary }}'
                    }
                }
            }
        }
    </script>
    <style>
        body { background-color: {{ theme.colors.background }}; color: {{ theme.colors.text }}; }
        .theme-card { background-color: {{ theme.colors.card }}; }
        .theme-primary { background-color: {{ theme.colors.primary }}; }
        .theme-secondary { background-color: {{ theme.colors.secondary }}; }
        .theme-accent { background-color: {{ theme.colors.accent }}; }
        .theme-text-secondary { color: {{ theme.colors.text_secondary }}; }
    </style>
</head>
<body class="min-h-screen">
    <!-- Navigation -->
    <nav class="theme-card shadow-lg border-b">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between items-center h-16">
                <div class="flex items-center space-x-4">
                    <h1 class="text-2xl font-bold text-primary">Telegram Stremio</h1>
                    {% if current_user %}
                    <div class="hidden md:flex space-x-4">
                        <a href="/" class="text-text hover:text-primary px-3 py-2 rounded-md transition-colors">Dashboard</a>
                        <a href="/media/manage" class="text-text hover:text-primary px-3 py-2 rounded-md transition-colors">Media</a>
                    </div>
                    {% endif %}
                </div>
                
                <div class="flex items-center space-x-4">
                    <!-- Theme Selector -->
                    <div class="relative">
                        <form method="post" action="/set-theme" id="theme-form">
                            <select name="theme" onchange="document.getElementById('theme-form').submit()" class="theme-card border border-gray-300 rounded-md px-3 py-2 text-sm">
                                {% for theme_key, theme_data in themes.items() %}
                                <option value="{{ theme_key }}" {% if current_theme == theme_key %}selected{% endif %}>
                                    {{ theme_data.name }}
                                </option>
                                {% endfor %}
                            </select>
                        </form>
                    </div>
                    
                    {% if current_user %}
                    <div class="flex items-center space-x-4">
                        <span class="text-sm theme-text-secondary">{{ current_user }}</span>
                        <a href="/logout" class="bg-red-600 text-white px-4 py-2 rounded-md hover:bg-red-700 transition-colors">Logout</a>
                    </div>
                    {% else %}
                    <a href="/login" class="theme-primary text-white px-4 py-2 rounded-md hover:opacity-90 transition-opacity">Login</a>
                    {% endif %}
                </div>
            </div>
        </div>
    </nav>

    <!-- Main Content -->
    <main class="flex-1">
        {% block content %}{% endblock %}
    </main>

    <!-- Footer -->
    <footer class="theme-card border-t mt-auto">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
            <div class="flex justify-between items-center">
                <p class="theme-text-secondary text-sm">© 2025 Telegram Stremio. All rights reserved.</p>
                <div class="flex space-x-4">
                    <a href="/status" class="theme-text-secondary hover:text-primary text-sm transition-colors">Status</a>
                    <a href="/stremio" class="theme-text-secondary hover:text-primary text-sm transition-colors">Stremio Guide</a>
                </div>
            </div>
        </div>
    </footer>
</body>
</html>