Reformat view templates

main
Ben Busby 2021-10-27 12:30:55 -06:00
parent b96e3a0acb
commit 190b684469
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14
4 changed files with 311 additions and 288 deletions

View File

@ -1,5 +1,5 @@
<html> <html>
<head> <head>
<link rel="shortcut icon" href="static/img/favicon.ico" type="image/x-icon"> <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="icon" href="static/img/favicon.ico" type="image/x-icon">
<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Whoogle Search"> <link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Whoogle Search">
@ -22,24 +22,24 @@
{% endif %} {% endif %}
<style>{{ config.style }}</style> <style>{{ config.style }}</style>
<title>{{ clean_query(query) }} - Whoogle Search</title> <title>{{ clean_query(query) }} - Whoogle Search</title>
</head> </head>
<body> <body>
{{ search_header|safe }} {{ search_header|safe }}
{% if is_translation %} {% if is_translation %}
<iframe <iframe
id="lingva-iframe" id="lingva-iframe"
src="{{ lingva_url }}/auto/{{ translate_to }}/{{ translate_str }}"> src="{{ lingva_url }}/auto/{{ translate_to }}/{{ translate_str }}">
</iframe> </iframe>
{% endif %} {% endif %}
{{ response|safe }} {{ response|safe }}
</body> </body>
<footer> <footer>
<p class="footer"> <p class="footer">
Whoogle Search v{{ version_number }} || Whoogle Search v{{ version_number }} ||
<a id="gh-link" href="https://github.com/benbusby/whoogle-search">{{ translation['github-link'] }}</a> <a id="gh-link" href="https://github.com/benbusby/whoogle-search">{{ translation['github-link'] }}</a>
</p> </p>
</footer> </footer>
<script src="{{ cb_url('autocomplete.js') }}"></script> <script src="{{ cb_url('autocomplete.js') }}"></script>
<script src="{{ cb_url('utils.js') }}"></script> <script src="{{ cb_url('utils.js') }}"></script>
<script src="{{ cb_url('keyboard.js') }}"></script> <script src="{{ cb_url('keyboard.js') }}"></script>
</html> </html>

View File

@ -1,5 +1,5 @@
<html style="background: #000;"> <html style="background: #000;">
<head> <head>
<link rel="apple-touch-icon" sizes="57x57" href="static/img/favicon/apple-icon-57x57.png"> <link rel="apple-touch-icon" sizes="57x57" href="static/img/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="static/img/favicon/apple-icon-60x60.png"> <link rel="apple-touch-icon" sizes="60x60" href="static/img/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="static/img/favicon/apple-icon-72x72.png"> <link rel="apple-touch-icon" sizes="72x72" href="static/img/favicon/apple-icon-72x72.png">
@ -36,16 +36,26 @@
<link rel="stylesheet" href="{{ cb_url('main.css') }}"> <link rel="stylesheet" href="{{ cb_url('main.css') }}">
<noscript> <noscript>
<style> <style>
#main { display: inherit !important; } #main {
.content { max-height: 720px; padding: 18px; border-radius: 10px; } display: inherit !important;
.collapsible { display: none; } }
.content {
max-height: 720px;
padding: 18px;
border-radius: 10px;
}
.collapsible {
display: none;
}
</style> </style>
</noscript> </noscript>
<style>{{ config.style }}</style> <style>{{ config.style }}</style>
<title>Whoogle Search</title> <title>Whoogle Search</title>
</head> </head>
<body id="main"> <body id="main">
<div class="search-container"> <div class="search-container">
<div class="logo-container"> <div class="logo-container">
{{ logo|safe }} {{ logo|safe }}
</div> </div>
@ -115,19 +125,24 @@
</div> </div>
<div class="config-div config-div-near"> <div class="config-div config-div-near">
<label for="config-near">{{ translation['config-near'] }}: </label> <label for="config-near">{{ translation['config-near'] }}: </label>
<input type="text" name="near" id="config-near" placeholder="{{ translation['config-near-help'] }}" value="{{ config.near }}"> <input type="text" name="near" id="config-near"
placeholder="{{ translation['config-near-help'] }}" value="{{ config.near }}">
</div> </div>
<div class="config-div config-div-block"> <div class="config-div config-div-block">
<label for="config-block">{{ translation['config-block'] }}: </label> <label for="config-block">{{ translation['config-block'] }}: </label>
<input type="text" name="block" id="config-block" placeholder="{{ translation['config-block-help'] }}" value="{{ config.block }}"> <input type="text" name="block" id="config-block"
placeholder="{{ translation['config-block-help'] }}" value="{{ config.block }}">
</div> </div>
<div class="config-div config-div-block"> <div class="config-div config-div-block">
<label for="config-block-title">{{ translation['config-block-title'] }}: </label> <label for="config-block-title">{{ translation['config-block-title'] }}: </label>
<input type="text" name="block_title" id="config-block" placeholder="{{ translation['config-block-title-help'] }}" value="{{ config.block_title }}"> <input type="text" name="block_title" id="config-block"
placeholder="{{ translation['config-block-title-help'] }}"
value="{{ config.block_title }}">
</div> </div>
<div class="config-div config-div-block"> <div class="config-div config-div-block">
<label for="config-block-url">{{ translation['config-block-url'] }}: </label> <label for="config-block-url">{{ translation['config-block-url'] }}: </label>
<input type="text" name="block_url" id="config-block" placeholder="{{ translation['config-block-url-help'] }}" value="{{ config.block_url }}"> <input type="text" name="block_url" id="config-block"
placeholder="{{ translation['config-block-url-help'] }}" value="{{ config.block_url }}">
</div> </div>
<div class="config-div config-div-nojs"> <div class="config-div config-div-nojs">
<label for="config-nojs">{{ translation['config-nojs'] }}: </label> <label for="config-nojs">{{ translation['config-nojs'] }}: </label>
@ -162,24 +177,29 @@
</div> </div>
<div class="config-div config-div-new-tab"> <div class="config-div config-div-new-tab">
<label for="config-new-tab">{{ translation['config-new-tab'] }}: </label> <label for="config-new-tab">{{ translation['config-new-tab'] }}: </label>
<input type="checkbox" name="new_tab" id="config-new-tab" {{ 'checked' if config.new_tab else '' }}> <input type="checkbox" name="new_tab"
id="config-new-tab" {{ 'checked' if config.new_tab else '' }}>
</div> </div>
<div class="config-div config-div-view-image"> <div class="config-div config-div-view-image">
<label for="config-view-image">{{ translation['config-images'] }}: </label> <label for="config-view-image">{{ translation['config-images'] }}: </label>
<input type="checkbox" name="view_image" id="config-view-image" {{ 'checked' if config.view_image else '' }}> <input type="checkbox" name="view_image"
id="config-view-image" {{ 'checked' if config.view_image else '' }}>
<div><span class="info-text"> — {{ translation['config-images-help'] }}</span></div> <div><span class="info-text"> — {{ translation['config-images-help'] }}</span></div>
</div> </div>
<div class="config-div config-div-tor"> <div class="config-div config-div-tor">
<label for="config-tor">{{ translation['config-tor'] }}: {{ '' if tor_available else 'Unavailable' }}</label> <label for="config-tor">{{ translation['config-tor'] }}: {{ '' if tor_available else 'Unavailable' }}</label>
<input type="checkbox" name="tor" id="config-tor" {{ '' if tor_available else 'hidden' }} {{ 'checked' if config.tor else '' }}> <input type="checkbox" name="tor"
id="config-tor" {{ '' if tor_available else 'hidden' }} {{ 'checked' if config.tor else '' }}>
</div> </div>
<div class="config-div config-div-get-only"> <div class="config-div config-div-get-only">
<label for="config-get-only">{{ translation['config-get-only'] }}: </label> <label for="config-get-only">{{ translation['config-get-only'] }}: </label>
<input type="checkbox" name="get_only" id="config-get-only" {{ 'checked' if config.get_only else '' }}> <input type="checkbox" name="get_only"
id="config-get-only" {{ 'checked' if config.get_only else '' }}>
</div> </div>
<div class="config-div config-div-get-only"> <div class="config-div config-div-get-only">
<label for="config-accept-language">Set Accept-Language: </label> <label for="config-accept-language">Set Accept-Language: </label>
<input type="checkbox" name="accept_language" id="config-accept-language" {{ 'checked' if config.accept_language else '' }}> <input type="checkbox" name="accept_language"
id="config-accept-language" {{ 'checked' if config.accept_language else '' }}>
</div> </div>
<div class="config-div config-div-root-url"> <div class="config-div config-div-root-url">
<label for="config-url">{{ translation['config-url'] }}: </label> <label for="config-url">{{ translation['config-url'] }}: </label>
@ -210,12 +230,12 @@
</div> </div>
</div> </div>
{% endif %} {% endif %}
</div> </div>
<footer> <footer>
<p class="footer"> <p class="footer">
Whoogle Search v{{ version_number }} || Whoogle Search v{{ version_number }} ||
<a id="gh-link" href="https://github.com/benbusby/whoogle-search">{{ translation['github-link'] }}</a> <a id="gh-link" href="https://github.com/benbusby/whoogle-search">{{ translation['github-link'] }}</a>
</p> </p>
</footer> </footer>
</body> </body>
</html> </html>

File diff suppressed because one or more lines are too long