logo

searx

My custom branche(s) on searx, a meta-search engine git clone https://hacktivis.me/git/searx.git
commit: afcfa04e30af048c63d12bdbe3e281582a917b91
parent 8c6e63402ae304fc4aa889911ee20f48ea4d9a09
Author: Thomas Pointhuber <thomas.pointhuber@gmx.at>
Date:   Fri, 26 Sep 2014 21:18:45 +0200

oscar template: improve style for check and uncheck of engines

Diffstat:

Msearx/static/oscar/css/oscar.css8++++++++
Msearx/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 @@ -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 @@ -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>