瀏覽代碼

[enh] search input "design"

asciimoo 11 年之前
父節點
當前提交
fb6b918777
共有 2 個文件被更改,包括 34 次插入2 次删除
  1. 30
    0
      searx/static/css/style.css
  2. 4
    2
      searx/templates/search.html

+ 30
- 0
searx/static/css/style.css 查看文件

@@ -97,3 +97,33 @@ a { text-decoration: none; }
97 97
 .percentage div { background: #444444; }
98 98
 td { padding: 0 4px; }
99 99
 tr:hover td { background: #DDDDDD; }
100
+
101
+
102
+#search_wrapper { position: relative; max-width: 600px; margin: 10px; }
103
+.center #search_wrapper { margin-left: auto; margin-right: auto; }
104
+.q {
105
+  -webkit-box-sizing: border-box;
106
+  -moz-box-sizing: border-box;
107
+  width: 100%;
108
+  box-sizing: border-box;
109
+  border: 1px solid #c8c8c8;
110
+  border-bottom-color: #d2e2e7;
111
+  -webkit-border-radius: 1px;
112
+  -moz-border-radius: 1px;
113
+  border-radius: 1px;
114
+  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.4), 0 0 0 4px #dddddd;
115
+  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.4), 0 0 0 4px #dddddd;
116
+  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4), 0 0 0 4px #dddddd;
117
+  -webkit-transition: all 0.4s linear;
118
+  -moz-transition: all 0.4s linear;
119
+  transition: all 0.4s linear;
120
+}
121
+.q:focus {
122
+  outline: none;
123
+  -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 0 0 4px #dddddd;
124
+  -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 0 0 4px #dddddd;
125
+  box-shadow: inset 0 1px 2px rgba(0,0,0,0.6), 0 0 0 4px #dddddd;
126
+}
127
+#search_submit { position: absolute; top: 3px; right: 3px; border: 0; padding: 6px; border-left: 4px solid #dddddd; }
128
+
129
+#results { margin-left: 10px; }

+ 4
- 2
searx/templates/search.html 查看文件

@@ -1,6 +1,8 @@
1
-<form method="post" action="/">
1
+<form method="post" action="/" id="search_form">
2
+<div id="search_wrapper">
2 3
     <input type="text" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
3
-    <input type="submit" value="search" />
4
+    <input type="submit" value="search" id="search_submit" />
5
+</div>
4 6
     <p>
5 7
     {% for category in categories %}
6 8
         <div class="checkbox_container">