File size: 8,479 Bytes
1404692 b2b72aa 1404692 b2b72aa 1404692 b2b72aa f697c3b b8fe50f 1404692 b8fe50f b2b72aa b8fe50f f697c3b b8fe50f f697c3b b8fe50f f697c3b 15fea8d f697c3b 1404692 f697c3b b8fe50f 15fea8d b8fe50f 15fea8d f946b58 15fea8d f946b58 15fea8d b8fe50f 1404692 15fea8d 1404692 15fea8d 1404692 15fea8d b8fe50f 15fea8d | 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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | <!DOCTYPE html>
<html lang="en" class="dark">
<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>
</script>
<style>
body {
background-color: {{ theme.colors.background }};
color: {{ theme.colors.text }};
}
.theme-card {
background-color: {{ theme.colors.card }};
}
.active-link {
background-color: rgba(255,255,255,0.08);
color: var(--tw-color-primary);
}
</style>
</head>
<body class="min-h-screen flex flex-col">
<!-- NAVBAR -->
<nav class="theme-card border-b shadow-sm sticky top-0 z-50 backdrop-blur">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center h-16">
<!-- LEFT -->
<div class="flex items-center gap-6">
<h1 class="text-xl md:text-2xl font-bold text-primary flex items-center gap-2">
<i class="fas fa-paper-plane"></i>
Telegram Stremio
</h1>
{% if current_user %}
<div class="hidden md:flex items-center gap-2">
<a href="/" class="nav-link {% if request.url.path == '/' %}active-link{% endif %}">
<i class="fas fa-home"></i> Dashboard
</a>
<a href="/media/manage" class="nav-link {% if '/media' in request.url.path %}active-link{% endif %}">
<i class="fas fa-photo-film"></i> Media
</a>
<a href="/admin/dashboard" class="nav-link {% if '/admin/dashboard' in request.url.path %}active-link{% endif %}">
<i class="fas fa-chart-line"></i> Admin
</a>
<a href="/admin/subscriptions" class="nav-link {% if '/subscriptions' in request.url.path %}active-link{% endif %}">
<i class="fas fa-credit-card"></i> Subscriptions
</a>
<a href="/admin/access" class="nav-link {% if '/access' in request.url.path %}active-link{% endif %}">
<i class="fas fa-user-shield"></i> Access
</a>
</div>
{% endif %}
</div>
<!-- RIGHT -->
<div class="flex items-center gap-3 relative">
<!-- THEME -->
<form method="post" action="/set-theme" id="theme-form">
<select name="theme" onchange="this.form.submit()"
class="theme-card border rounded-md px-2 py-1 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>
{% if current_user %}
<!-- PROFILE DROPDOWN -->
<div class="relative">
<button id="profile-btn" class="flex items-center gap-2 text-sm">
<i class="fas fa-user-circle text-lg"></i>
<span class="hidden sm:block">{{ current_user }}</span>
<i class="fas fa-chevron-down text-xs"></i>
</button>
<div id="profile-menu" class="hidden absolute right-0 mt-2 w-40 theme-card border rounded-lg shadow-lg py-2">
<a href="/logout" class="dropdown-link text-red-500">Logout</a>
</div>
</div>
{% else %}
<a href="/login"
class="bg-blue-600 text-white px-3 py-1.5 rounded-md hover:bg-blue-700 text-sm transition">
Login
</a>
{% endif %}
<!-- MOBILE BUTTON -->
<button id="menu-btn" class="md:hidden text-xl">
<i class="fas fa-bars"></i>
</button>
</div>
</div>
</div>
<!-- MOBILE MENU -->
{% if current_user %}
<div id="mobile-menu" class="hidden md:hidden px-4 pb-4 animate-slideDown">
<div class="flex flex-col gap-2">
<a href="/" class="mobile-link">Dashboard</a>
<a href="/media/manage" class="mobile-link">Media</a>
<a href="/admin/dashboard" class="mobile-link">Admin</a>
<a href="/admin/subscriptions" class="mobile-link">Subscriptions</a>
<a href="/admin/access" class="mobile-link">Access</a>
</div>
</div>
{% endif %}
</nav>
<!-- MAIN -->
<main class="flex-1">
{% block content %}{% endblock %}
</main>
<!-- FOOTER -->
<footer class="theme-card border-t mt-auto text-text">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
<div class="flex flex-col md:flex-row justify-between items-center gap-3">
<p class="theme-text-secondary text-sm">© 2026 Telegram Stremio. All rights reserved.</p>
<div class="flex gap-4">
<a href="/status" class="footer-link">Status</a>
<a href="/stremio" class="footer-link">Stremio Guide</a>
</div>
</div>
</div>
</footer>
<!-- STYLES -->
<style>
.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 }}; }
.nav-link {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
border-radius: 6px;
font-size: 14px;
transition: 0.2s;
}
.nav-link:hover {
background-color: rgba(255,255,255,0.05);
color: var(--tw-color-primary);
}
.mobile-link {
padding: 10px;
border-radius: 6px;
font-size: 14px;
}
.mobile-link:hover {
background-color: rgba(255,255,255,0.05);
}
.dropdown-link {
display: block;
padding: 8px 12px;
font-size: 14px;
}
.dropdown-link:hover {
background-color: rgba(255,255,255,0.05);
}
.footer-link {
font-size: 14px;
transition: 0.2s;
}
.footer-link:hover {
color: var(--tw-color-primary);
}
@keyframes slideDown {
from { opacity: 0; transform: translateY(-10px); }
to { opacity: 1; transform: translateY(0); }
}
.animate-slideDown {
animation: slideDown 0.25s ease;
}
</style>
<!-- SCRIPT -->
<script>
const btn = document.getElementById('menu-btn');
const menu = document.getElementById('mobile-menu');
const profileBtn = document.getElementById('profile-btn');
const profileMenu = document.getElementById('profile-menu');
if (btn) {
btn.addEventListener('click', () => {
menu.classList.toggle('hidden');
});
}
if (profileBtn) {
profileBtn.addEventListener('click', () => {
profileMenu.classList.toggle('hidden');
});
}
document.addEventListener('click', (e) => {
if (profileBtn && !profileBtn.contains(e.target) && !profileMenu.contains(e.target)) {
profileMenu.classList.add('hidden');
}
});
</script>
</body>
</html>
|