mirror of
https://github.com/parchlinuxB/Gitee.git
synced 2025-02-23 02:15:43 -05:00
Add theme settings to preferences page
- Create new theme.html template for theme selection - Update preferences page to include theme settings - Adjust CSS padding and add save button styling - Modify preferences template to support theme selection
This commit is contained in:
parent
d0e9ba73f5
commit
4798e9bea8
5 changed files with 54 additions and 8 deletions
|
@ -795,13 +795,20 @@ img, video {
|
|||
|
||||
#preferences #preferences_form .madules-container {
|
||||
grid-area: main;
|
||||
padding: 1rem;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
#preferences #preferences_form .madules-container select {
|
||||
background-color: var(--secondary-background-color);
|
||||
}
|
||||
|
||||
#preferences #preferences_form .madules-container .save-btn {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-top: 1rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#preferences #preferences_form .backup-container {
|
||||
grid-area: backup;
|
||||
}
|
||||
|
|
|
@ -741,13 +741,20 @@ img, video {
|
|||
|
||||
#preferences #preferences_form .madules-container {
|
||||
grid-area: main;
|
||||
padding: 1rem;
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
#preferences #preferences_form .madules-container select {
|
||||
background-color: var(--secondary-background-color);
|
||||
}
|
||||
|
||||
#preferences #preferences_form .madules-container .save-btn {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin-top: 1rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#preferences #preferences_form .backup-container {
|
||||
grid-area: backup;
|
||||
}
|
||||
|
|
|
@ -45,11 +45,18 @@
|
|||
|
||||
.madules-container {
|
||||
grid-area: main;
|
||||
padding: 1rem;
|
||||
padding: 1.5rem;
|
||||
|
||||
select {
|
||||
background-color: var(--secondary-background-color);
|
||||
}
|
||||
|
||||
.save-btn {
|
||||
margin-top: 1rem;
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.backup-container {
|
||||
|
|
16
searx/templates/smart/madules/settings/theme.html
Normal file
16
searx/templates/smart/madules/settings/theme.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<fieldset>
|
||||
<div class="container">
|
||||
<legend id="pref_theme">{{- _('Theme') -}}</legend>
|
||||
<select name="theme" aria-labelledby="pref_theme" aria-describedby="desc_theme">
|
||||
{%- for name in themes -%}
|
||||
<option value="{{ name }}"
|
||||
{%- if name == theme %} selected="selected"{%- endif -%}>
|
||||
{{- name | capitalize -}}
|
||||
</option>
|
||||
{%- endfor -%}
|
||||
</select>
|
||||
</div>
|
||||
<div class="description" id="desc_theme">
|
||||
{{- _('Change SearXNG layout') -}}
|
||||
</div>
|
||||
</fieldset>
|
|
@ -11,10 +11,17 @@
|
|||
autocomplete="off"
|
||||
>
|
||||
<div class="madules-container">
|
||||
{% if 'language' not in locked_preferences %} {%- include
|
||||
'smart/madules/settings/language.html' -%} {% endif %} {% if
|
||||
'autocomplete' not in locked_preferences %} {%- include
|
||||
'smart/madules/settings/autocomplete.html' -%} {% endif %} {% if
|
||||
{# TODO: add tabs after new theme variants settings and chat
|
||||
<div class="tabs">
|
||||
<label>{{ _('General') }}</label>
|
||||
<label>{{ _('Appearance') }}</label>
|
||||
<label>{{ _('Advanced') }}</label>
|
||||
</div>
|
||||
#} {% if 'language' not in locked_preferences %} {%- include
|
||||
'smart/madules/settings/language.html' -%}{% endif %} {% if 'theme' not
|
||||
in locked_preferences %} {%- include 'smart/madules/settings/theme.html'
|
||||
-%}{% endif %} {% if 'autocomplete' not in locked_preferences %} {%-
|
||||
include 'smart/madules/settings/autocomplete.html' -%} {% endif %} {% if
|
||||
'safesearch' not in locked_preferences %} {%- include
|
||||
'smart/madules/settings/safe_search.html' -%} {% endif %} {% if
|
||||
'ui_locale' not in locked_preferences %} {%- include
|
||||
|
@ -34,7 +41,9 @@
|
|||
'urlformatting' not in locked_preferences %} {%- include
|
||||
'smart/madules/settings/url_formatting.html' -%} {% endif %}
|
||||
|
||||
<button class="btn primary" type="submit">{{- _('Save') -}}</button>
|
||||
<button class="btn primary save-btn" type="submit">
|
||||
{{- _('Save') -}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="backup-container">
|
||||
|
|
Loading…
Add table
Reference in a new issue