summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-09-26 21:18:45 +0200
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-10-05 14:40:46 +0200
commitafcfa04e30af048c63d12bdbe3e281582a917b91 (patch)
treeeb861d129242b7fdef1cd92e41169c631827959c /searx
parent8c6e63402ae304fc4aa889911ee20f48ea4d9a09 (diff)
downloadsearxng-afcfa04e30af048c63d12bdbe3e281582a917b91.tar.gz
searxng-afcfa04e30af048c63d12bdbe3e281582a917b91.zip
oscar template: improve style for check and uncheck of engines
Diffstat (limited to 'searx')
-rw-r--r--searx/static/oscar/css/oscar.css8
-rw-r--r--searx/templates/oscar/preferences.html6
2 files changed, 11 insertions, 3 deletions
diff --git a/searx/static/oscar/css/oscar.css b/searx/static/oscar/css/oscar.css
index 6ca390679..4ff475e89 100644
--- a/searx/static/oscar/css/oscar.css
+++ b/searx/static/oscar/css/oscar.css
@@ -17,3 +17,11 @@ body {
/* Set the fixed height of the footer here */
height: 40px;
}
+
+input[type=checkbox]:checked ~ .label_hide_if_checked {
+ display:none;
+}
+
+input[type=checkbox]:not(:checked) ~ .label_hide_if_not_checked {
+ display:none;
+}
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index d0bbbc820..38f874e51 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -97,9 +97,9 @@
<div class="col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</div>
<div class="col-sm-4 col-md-4">
<div class="checkbox">
- <input type="checkbox" id="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}"{% if search_engine.name in blocked_engines %} checked="checked"{% endif %} />
- <label class="allow btn btn-success" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
- <label class="deny btn btn-danger" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
+ <input class="hidden" type="checkbox" id="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}"{% if search_engine.name in blocked_engines %} checked="checked"{% endif %} />
+ <label class="btn btn-success label_hide_if_checked" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
+ <label class="btn btn-danger label_hide_if_not_checked" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
</div>
</div>
</div>