73 lines
3.6 KiB
HTML
73 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Search with Ocásek</title>
|
|
<link rel="stylesheet" href="/static/css/style.css">
|
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
|
<link rel="search" type="application/opensearchdescription+xml" title="Ocásek" href="/opensearch.xml">
|
|
</head>
|
|
<body>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
const settingsIcon = document.querySelector('.settings-icon-link-search');
|
|
const searchMenu = document.querySelector('.search-menu');
|
|
|
|
settingsIcon.addEventListener('click', function () {
|
|
searchMenu.classList.toggle('settings-menu-hidden');
|
|
searchMenu.classList.toggle('settings-menu-visible');
|
|
});
|
|
|
|
// Theme change event listeners
|
|
document.getElementById('dark_theme').addEventListener('click', function () {
|
|
window.location.href = '/search?theme=dark';
|
|
});
|
|
document.getElementById('light_theme').addEventListener('click', function () {
|
|
window.location.href = '/search?theme=light';
|
|
});
|
|
});
|
|
</script>
|
|
<div class="settings-search-div settings-search-div-search">
|
|
<button class="material-icons-round clickable settings-icon-link settings-icon-link-search">menu</button>
|
|
</div>
|
|
<div class="search-menu settings-menu-hidden">
|
|
<h2>Settings</h2>
|
|
<div class="settings-content">
|
|
<button id="settingsButton" onclick="window.location.href='/settings'">All settings</button> <!-- Well its unessesary to use js here but this menu will not work without js anyway -->
|
|
<div class="theme-settings">
|
|
<p><span class="highlight">Theme: </span> <span id="theme_name">Default Theme</span></p>
|
|
<div class="themes-settings-menu">
|
|
<div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
|
|
<div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
|
|
</div>
|
|
</div>
|
|
<select class="lang" name="lang">
|
|
<option value="en" selected>English</option>
|
|
<option value="fr">Français</option>
|
|
<option value="es">Español</option>
|
|
<!-- Add other languages as needed -->
|
|
</select>
|
|
<select class="domain" name="safe">
|
|
<option value="active" selected>Safe search on</option>
|
|
<option value="">Safe search off</option>
|
|
<!-- Add other domains as needed -->
|
|
</select>
|
|
|
|
</div>
|
|
</div>
|
|
<form action="/search" class="search-container" method="post" autocomplete="off">
|
|
<h1>Ocásek</h1>
|
|
<div class="wrapper">
|
|
<input type="text" name="q" autofocus id="search-input" placeholder="Type to search..." />
|
|
<button id="search-wrapper-ico" class="material-icons-round" name="t" value="text" type="submit">search</button>
|
|
<!-- <a id="clearSearch" class="material-icons-round">close</a> -->
|
|
</div>
|
|
<div class="search-button-wrapper">
|
|
<input type="hidden" name="p" value="1">
|
|
<button name="t" value="text" type="submit">Search Text</button>
|
|
<button name="t" value="image" type="submit">Search Images</button>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html>
|