TelegramIndex-Fork/app/templates/header.html

50 lines
1.7 KiB
HTML

<!doctype html>
<html class="light" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.1.4/dist/tailwind-dark.min.css" rel="stylesheet">
<script src="https://cdn.fluidplayer.com/v3/current/fluidplayer.min.js">
</script>
<script>
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.className = 'dark';
} else {
document.documentElement.className = 'light';
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
* {
font-family: 'Roboto', sans-serif;
}
</style>
<title>
{% if title %} {{title}} {% else %} Telegram Index {% endif %}
</title>
</head>
<body class="bg-white text-black dark:bg-black dark:text-white">
<header class="bg-blue-300 dark:bg-red-500 text-white mb-2 p-2 w-full shadow">
<div class="flex mx-auto justify-between items-center max-w-screen-xl">
<a href="/" id="title-a" class="text-left font-bold text-xl lg:text-2xl xl:text-3xl"> Telegram index </a>
<div class="space-x-1">
<button onclick="toggleTheme()" class="rounded-full bg-white">
<img src="https://s3.imgcdn.dev/nW9YV.png" class="h-8" alt="Theme">
</button>
{% if authenticated %}
<button class="rounded-full bg-white"><a href="/logout">
<img src="https://s3.imgcdn.dev/ndsjh.png" class="h-8" alt="Logout">
</a>
</button>
{% else %} {% endif %}
</div>
</div>
</header>
<div class="m-auto w-full min-h-screen max-w-screen-xl">