This was unfortunately a bit more complex than just adding an HTML reset button, since reset buttons only "reset" input content to its original value rather than clearing it. This doesn't work for Whoogle's needs, since inputs on search result pages are auto populated with the search content as their default value. A reset button was introduced anyways, but is controlled by a few lines of javascript to allow completely clearing the search input. The button will only appear on mobile searches. At the moment, it isn't particularly pretty, but is functional. It uses just a plain "x" character and is always visible on mobile search result pages. This leaves plenty of room for improvement moving forward. Fixes #291
30 lines
1.4 KiB
HTML
30 lines
1.4 KiB
HTML
<html>
|
|
<head>
|
|
<link rel="shortcut icon" href="static/img/favicon.ico" type="image/x-icon">
|
|
<link rel="icon" href="static/img/favicon.ico" type="image/x-icon">
|
|
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Whoogle Search">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="referrer" content="no-referrer">
|
|
<link rel="stylesheet" href="static/css/input.css">
|
|
<link rel="stylesheet" href="static/css/search.css">
|
|
<link rel="stylesheet" href="static/css/variables.css">
|
|
<link rel="stylesheet" href="static/css/header.css">
|
|
<link rel="stylesheet" href="static/css/{{ 'dark' if config.dark else 'light' }}-theme.css"/>
|
|
<style>{{ config.style }}</style>
|
|
<title>{{ query }} - Whoogle Search</title>
|
|
</head>
|
|
<body>
|
|
{{ search_header|safe }}
|
|
{{ response|safe }}
|
|
</body>
|
|
<footer>
|
|
<p style="color: {{ 'var(--whoogle-dark-text)' if config.dark else 'var(--whoogle-text)' }};">
|
|
Whoogle Search v{{ version_number }} ||
|
|
<a id="gh-link" href="https://github.com/benbusby/whoogle-search">View on GitHub</a>
|
|
</p>
|
|
</footer>
|
|
<script src="static/js/autocomplete.js"></script>
|
|
<script src="static/js/utils.js"></script>
|
|
<script src="static/js/keyboard.js"></script>
|
|
</html>
|