瀏覽代碼

[enh] category select warning message

Adam Tauber 10 年之前
父節點
當前提交
b8efd1214f
共有 3 個檔案被更改,包括 109 行新增2 行删除
  1. 86
    1
      searx/static/default/css/style.css
  2. 21
    0
      searx/static/default/less/style.less
  3. 2
    1
      searx/templates/default/categories.html

+ 86
- 1
searx/static/default/css/style.css
文件差異過大導致無法顯示
查看文件


+ 21
- 0
searx/static/default/less/style.less 查看文件

@@ -529,6 +529,10 @@ tr {
529 529
 	clear: both;
530 530
 }
531 531
 
532
+#categories_container {
533
+    position: relative;
534
+}
535
+
532 536
 @media screen and (max-width: @results-width) {
533 537
 
534 538
 	#results {
@@ -685,3 +689,20 @@ tr {
685 689
 		color: @color-settings-return-font;
686 690
 	}
687 691
 }
692
+
693
+.hidden {
694
+    opacity: 0;
695
+    overflow: hidden;
696
+    font-size: 0.8em;
697
+    position: absolute;
698
+    bottom: -20px;
699
+    width: 100%;
700
+    text-position: center;
701
+    background: white;
702
+    transition: opacity 1s ease;
703
+}
704
+
705
+#categories_container:hover .hidden {
706
+    transition: opacity 1s ease;
707
+    opacity: 0.8;
708
+}

+ 2
- 1
searx/templates/default/categories.html 查看文件

@@ -2,8 +2,9 @@
2 2
     <div id="categories_container">
3 3
 {% for category in categories %}
4 4
         <div class="checkbox_container">
5
-             <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}">{{ _(category) }}</label>
5
+             <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}" class="tooltips">{{ _(category) }}</label>
6 6
         </div>
7 7
 {% endfor %}
8
+    <div class="hidden">{{ _('Click on the magnifier to perform search') }}</div>
8 9
     </div>
9 10
 </div>