mozhi/views/header.html

83 lines
2.7 KiB
HTML
Raw Permalink Normal View History

2023-06-25 00:10:57 +05:30
<!DOCTYPE html>
<html lang="en">
<head>
{{ if .title }}
2023-09-10 17:27:22 +05:30
<title>{{.title}} - Mozhi</title>
{{else}}
<title>Mozhi</title>
2023-09-10 17:27:22 +05:30
{{end}}
<link rel="shortcut icon" href="/favicon.ico" />
<meta
name="description"
content="Mozhi is an alternative-frontend for many translation engines."
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" />
<meta name="referrer" content="no-referrer" />
2024-07-17 17:56:14 +05:30
<script src="/js/nice-select2.js"></script>
<link rel="stylesheet" href="/css/nice-select2.css" />
2023-09-10 17:27:22 +05:30
<link rel="stylesheet" href="/css/style.css" />
2024-07-17 17:56:14 +05:30
<link rel="manifest" href="/manifest.json" />
2023-06-25 00:10:57 +05:30
</head>
2023-09-10 17:27:22 +05:30
2023-06-25 00:10:57 +05:30
<body>
2023-09-10 17:27:22 +05:30
<header>
2024-07-17 17:56:14 +05:30
<a href="/"
><img src="/assets/mozhi.png" alt="Mozhi Logo" class="navlogo"
/></a>
2023-09-10 17:27:22 +05:30
<nav>
<a href="/about">About</a>
<a href="/api/swagger">API</a>
2024-07-17 17:56:14 +05:30
<button onclick="toggleDarkMode()">
<svg
width="20px"
height="20px"
viewBox="0 0 24 24"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<g
id="🔍-Product-Icons"
stroke="none"
stroke-width="1"
fill="none"
fill-rule="evenodd"
>
<g
id="ic_fluent_dark_theme_24_regular"
fill="#212121"
fill-rule="nonzero"
>
<path
d="M12,22 C17.5228475,22 22,17.5228475 22,12 C22,6.4771525 17.5228475,2 12,2 C6.4771525,2 2,6.4771525 2,12 C2,17.5228475 6.4771525,22 12,22 Z M12,20.5 L12,3.5 C16.6944204,3.5 20.5,7.30557963 20.5,12 C20.5,16.6944204 16.6944204,20.5 12,20.5 Z"
id="🎨-Color"
></path>
</g>
</g>
</svg>
</button>
2023-09-10 17:27:22 +05:30
</nav>
</header>
2024-07-17 17:56:14 +05:30
<script>
function toggleDarkMode() {
if (document.documentElement.classList.contains("light")) {
document.documentElement.classList.remove("light");
document.documentElement.classList.add("dark");
} else if (document.documentElement.classList.contains("dark")) {
document.documentElement.classList.remove("dark");
document.documentElement.classList.add("light");
} else {
if (
window.matchMedia &&
window.matchMedia("(prefers-color-scheme: light)").matches
) {
document.documentElement.classList.add("dark");
} else {
document.documentElement.classList.add("light");
}
}
}
</script>
2023-09-10 17:27:22 +05:30
<br />