Procházet zdrojové kódy

[enh] search input "design"

asciimoo před 11 roky
rodič
revize
fb6b918777
2 změnil soubory, kde provedl 34 přidání a 2 odebrání
  1. 30
    0
      searx/static/css/style.css
  2. 4
    2
      searx/templates/search.html

+ 30
- 0
searx/static/css/style.css Zobrazit soubor

97
 .percentage div { background: #444444; }
97
 .percentage div { background: #444444; }
98
 td { padding: 0 4px; }
98
 td { padding: 0 4px; }
99
 tr:hover td { background: #DDDDDD; }
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 Zobrazit soubor

1
-<form method="post" action="/">
1
+<form method="post" action="/" id="search_form">
2
+<div id="search_wrapper">
2
     <input type="text" class="q" name="q" tabindex="1" autocomplete="off" {% if q %}value="{{ q }}"{% endif %}/>
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
     <p>
6
     <p>
5
     {% for category in categories %}
7
     {% for category in categories %}
6
         <div class="checkbox_container">
8
         <div class="checkbox_container">