on master help sign in
oscar template: include typeahead.css into bootstrap.min.css
commit55b9b10d2e39fb52d566441d44c1c132b7ff06fe authorThomas Pointhuber <thomas.pointhuber@gmx.at> dateMon 29 Sep 2014, 15:47 (12 years ago) parentf4457da
5 files changed+176−190
searx/static/oscar/css/bootstrap.min.css+20 searx/static/oscar/css/typeahead.css−189 searx/static/oscar/less/bootstrap/bootstrap.less+3 searx/static/oscar/less/bootstrap/typeahead.less+153 searx/templates/oscar/base.html−1
searx/static/oscar/css/bootstrap.min.css+20
@@ -893,3 +893,23 @@ button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-ap
893893.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}
894894.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}
895895@media print{.hidden-print{display:none !important}}
896+.has-warning .twitter-typeahead .tt-input,.has-warning .twitter-typeahead .tt-hint{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .twitter-typeahead .tt-input:focus,.has-warning .twitter-typeahead .tt-hint:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}
897+.has-error .twitter-typeahead .tt-input,.has-error .twitter-typeahead .tt-hint{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .twitter-typeahead .tt-input:focus,.has-error .twitter-typeahead .tt-hint:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}
898+.has-success .twitter-typeahead .tt-input,.has-success .twitter-typeahead .tt-hint{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .twitter-typeahead .tt-input:focus,.has-success .twitter-typeahead .tt-hint:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}
899+.input-group .twitter-typeahead:first-child .tt-input,.input-group .twitter-typeahead:first-child .tt-hint{border-bottom-left-radius:4px;border-top-left-radius:4px}
900+.input-group .twitter-typeahead:last-child .tt-input,.input-group .twitter-typeahead:last-child .tt-hint{border-bottom-right-radius:4px;border-top-right-radius:4px}
901+.input-group.input-group-sm .twitter-typeahead .tt-input,.input-group.input-group-sm .twitter-typeahead .tt-hint{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group.input-group-sm .twitter-typeahead .tt-input,select.input-group.input-group-sm .twitter-typeahead .tt-hint{height:30px;line-height:30px}
902+textarea.input-group.input-group-sm .twitter-typeahead .tt-input,textarea.input-group.input-group-sm .twitter-typeahead .tt-hint,select[multiple].input-group.input-group-sm .twitter-typeahead .tt-input,select[multiple].input-group.input-group-sm .twitter-typeahead .tt-hint{height:auto}
903+.input-group.input-group-sm .twitter-typeahead:not(:first-child):not(:last-child) .tt-input,.input-group.input-group-sm .twitter-typeahead:not(:first-child):not(:last-child) .tt-hint{border-radius:0}
904+.input-group.input-group-sm .twitter-typeahead:first-child .tt-input,.input-group.input-group-sm .twitter-typeahead:first-child .tt-hint{border-bottom-left-radius:3px;border-top-left-radius:3px;border-bottom-right-radius:0;border-top-right-radius:0}
905+.input-group.input-group-sm .twitter-typeahead:last-child .tt-input,.input-group.input-group-sm .twitter-typeahead:last-child .tt-hint{border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-right-radius:3px;border-top-right-radius:3px}
906+.input-group.input-group-lg .twitter-typeahead .tt-input,.input-group.input-group-lg .twitter-typeahead .tt-hint{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group.input-group-lg .twitter-typeahead .tt-input,select.input-group.input-group-lg .twitter-typeahead .tt-hint{height:46px;line-height:46px}
907+textarea.input-group.input-group-lg .twitter-typeahead .tt-input,textarea.input-group.input-group-lg .twitter-typeahead .tt-hint,select[multiple].input-group.input-group-lg .twitter-typeahead .tt-input,select[multiple].input-group.input-group-lg .twitter-typeahead .tt-hint{height:auto}
908+.input-group.input-group-lg .twitter-typeahead:not(:first-child):not(:last-child) .tt-input,.input-group.input-group-lg .twitter-typeahead:not(:first-child):not(:last-child) .tt-hint{border-radius:0}
909+.input-group.input-group-lg .twitter-typeahead:first-child .tt-input,.input-group.input-group-lg .twitter-typeahead:first-child .tt-hint{border-bottom-left-radius:6px;border-top-left-radius:6px;border-bottom-right-radius:0;border-top-right-radius:0}
910+.input-group.input-group-lg .twitter-typeahead:last-child .tt-input,.input-group.input-group-lg .twitter-typeahead:last-child .tt-hint{border-bottom-left-radius:0;border-top-left-radius:0;border-bottom-right-radius:6px;border-top-right-radius:6px}
911+.twitter-typeahead{width:100%}.input-group .twitter-typeahead{display:table-cell !important;float:left}
912+.twitter-typeahead .tt-hint{color:#777}
913+.twitter-typeahead .tt-input{z-index:2}.twitter-typeahead .tt-input[disabled],.twitter-typeahead .tt-input[readonly],fieldset[disabled] .twitter-typeahead .tt-input{cursor:not-allowed;background-color:#eee !important}
914+.tt-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;min-width:160px;width:100%;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box;*border-right-width:2px;*border-bottom-width:2px}.tt-dropdown-menu .tt-suggestion{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap;text-align:left;cursor:pointer !important}.tt-dropdown-menu .tt-suggestion.tt-cursor{text-decoration:none;outline:0;background-color:#f5f5f5;color:#262626}.tt-dropdown-menu .tt-suggestion.tt-cursor a{color:#262626}
915+.tt-dropdown-menu .tt-suggestion p{margin:0}
searx/static/oscar/css/typeahead.cssdeleted−189
@@ -1,189 +0,0 @@
1−/*
2− * typehead.js-bootstrap3.less
3− * @version 0.2.3
4− * https://github.com/hyspace/typeahead.js-bootstrap3.less
5− *
6− * Licensed under the MIT license:
7− * http://www.opensource.org/licenses/MIT
8− */
9−.has-warning .twitter-typeahead .tt-input,
10−.has-warning .twitter-typeahead .tt-hint {
11− border-color: #8a6d3b;
12− -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
13− box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
14−}
15−.has-warning .twitter-typeahead .tt-input:focus,
16−.has-warning .twitter-typeahead .tt-hint:focus {
17− border-color: #66512c;
18− -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
19− box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
20−}
21−.has-error .twitter-typeahead .tt-input,
22−.has-error .twitter-typeahead .tt-hint {
23− border-color: #a94442;
24− -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
25− box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
26−}
27−.has-error .twitter-typeahead .tt-input:focus,
28−.has-error .twitter-typeahead .tt-hint:focus {
29− border-color: #843534;
30− -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
31− box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
32−}
33−.has-success .twitter-typeahead .tt-input,
34−.has-success .twitter-typeahead .tt-hint {
35− border-color: #3c763d;
36− -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
37− box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
38−}
39−.has-success .twitter-typeahead .tt-input:focus,
40−.has-success .twitter-typeahead .tt-hint:focus {
41− border-color: #2b542c;
42− -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
43− box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
44−}
45−.input-group .twitter-typeahead:first-child .tt-input,
46−.input-group .twitter-typeahead:first-child .tt-hint {
47− border-bottom-left-radius: 4px;
48− border-top-left-radius: 4px;
49−}
50−.input-group .twitter-typeahead:last-child .tt-input,
51−.input-group .twitter-typeahead:last-child .tt-hint {
52− border-bottom-right-radius: 4px;
53− border-top-right-radius: 4px;
54−}
55−.input-group.input-group-sm .twitter-typeahead .tt-input,
56−.input-group.input-group-sm .twitter-typeahead .tt-hint {
57− height: 30px;
58− padding: 5px 10px;
59− font-size: 12px;
60− line-height: 1.5;
61− border-radius: 3px;
62−}
63−select.input-group.input-group-sm .twitter-typeahead .tt-input,
64−select.input-group.input-group-sm .twitter-typeahead .tt-hint {
65− height: 30px;
66− line-height: 30px;
67−}
68−textarea.input-group.input-group-sm .twitter-typeahead .tt-input,
69−textarea.input-group.input-group-sm .twitter-typeahead .tt-hint,
70−select[multiple].input-group.input-group-sm .twitter-typeahead .tt-input,
71−select[multiple].input-group.input-group-sm .twitter-typeahead .tt-hint {
72− height: auto;
73−}
74−.input-group.input-group-sm .twitter-typeahead:not(:first-child):not(:last-child) .tt-input,
75−.input-group.input-group-sm .twitter-typeahead:not(:first-child):not(:last-child) .tt-hint {
76− border-radius: 0;
77−}
78−.input-group.input-group-sm .twitter-typeahead:first-child .tt-input,
79−.input-group.input-group-sm .twitter-typeahead:first-child .tt-hint {
80− border-bottom-left-radius: 3px;
81− border-top-left-radius: 3px;
82− border-bottom-right-radius: 0;
83− border-top-right-radius: 0;
84−}
85−.input-group.input-group-sm .twitter-typeahead:last-child .tt-input,
86−.input-group.input-group-sm .twitter-typeahead:last-child .tt-hint {
87− border-bottom-left-radius: 0;
88− border-top-left-radius: 0;
89− border-bottom-right-radius: 3px;
90− border-top-right-radius: 3px;
91−}
92−.input-group.input-group-lg .twitter-typeahead .tt-input,
93−.input-group.input-group-lg .twitter-typeahead .tt-hint {
94− height: 46px;
95− padding: 10px 16px;
96− font-size: 18px;
97− line-height: 1.33;
98− border-radius: 6px;
99−}
100−select.input-group.input-group-lg .twitter-typeahead .tt-input,
101−select.input-group.input-group-lg .twitter-typeahead .tt-hint {
102− height: 46px;
103− line-height: 46px;
104−}
105−textarea.input-group.input-group-lg .twitter-typeahead .tt-input,
106−textarea.input-group.input-group-lg .twitter-typeahead .tt-hint,
107−select[multiple].input-group.input-group-lg .twitter-typeahead .tt-input,
108−select[multiple].input-group.input-group-lg .twitter-typeahead .tt-hint {
109− height: auto;
110−}
111−.input-group.input-group-lg .twitter-typeahead:not(:first-child):not(:last-child) .tt-input,
112−.input-group.input-group-lg .twitter-typeahead:not(:first-child):not(:last-child) .tt-hint {
113− border-radius: 0;
114−}
115−.input-group.input-group-lg .twitter-typeahead:first-child .tt-input,
116−.input-group.input-group-lg .twitter-typeahead:first-child .tt-hint {
117− border-bottom-left-radius: 6px;
118− border-top-left-radius: 6px;
119− border-bottom-right-radius: 0;
120− border-top-right-radius: 0;
121−}
122−.input-group.input-group-lg .twitter-typeahead:last-child .tt-input,
123−.input-group.input-group-lg .twitter-typeahead:last-child .tt-hint {
124− border-bottom-left-radius: 0;
125− border-top-left-radius: 0;
126− border-bottom-right-radius: 6px;
127− border-top-right-radius: 6px;
128−}
129−.twitter-typeahead {
130− width: 100%;
131−}
132−.input-group .twitter-typeahead {
133− display: table-cell !important;
134− float: left;
135−}
136−.twitter-typeahead .tt-hint {
137− color: #999999;
138−}
139−.twitter-typeahead .tt-input {
140− z-index: 2;
141−}
142−.twitter-typeahead .tt-input[disabled],
143−.twitter-typeahead .tt-input[readonly],
144−fieldset[disabled] .twitter-typeahead .tt-input {
145− cursor: not-allowed;
146− background-color: #eeeeee !important;
147−}
148−.tt-dropdown-menu {
149− position: absolute;
150− top: 100%;
151− left: 0;
152− z-index: 1000;
153− min-width: 160px;
154− width: 100%;
155− padding: 5px 0;
156− margin: 2px 0 0;
157− list-style: none;
158− font-size: 14px;
159− background-color: #ffffff;
160− border: 1px solid #cccccc;
161− border: 1px solid rgba(0, 0, 0, 0.15);
162− border-radius: 4px;
163− -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
164− box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
165− background-clip: padding-box;
166− *border-right-width: 2px;
167− *border-bottom-width: 2px;
168−}
169−.tt-dropdown-menu .tt-suggestion {
170− display: block;
171− padding: 3px 20px;
172− clear: both;
173− font-weight: normal;
174− line-height: 1.42857143;
175− color: #333333;
176− white-space: nowrap;
177−}
178−.tt-dropdown-menu .tt-suggestion.tt-cursor {
179− text-decoration: none;
180− outline: 0;
181− background-color: #f5f5f5;
182− color: #262626;
183−}
184−.tt-dropdown-menu .tt-suggestion.tt-cursor a {
185− color: #262626;
186−}
187−.tt-dropdown-menu .tt-suggestion p {
188− margin: 0;
189−}
searx/static/oscar/less/bootstrap/bootstrap.less+3
@@ -48,3 +48,6 @@
4848// Utility classes
4949@import "utilities.less";
5050@import "responsive-utilities.less";
51+
52+// own additions
53+@import "typeahead.less";
searx/static/oscar/less/bootstrap/typeahead.lessnew file+153
@@ -0,0 +1,153 @@
1+/*
2+ * typehead.js-bootstrap3.less
3+ * @version 0.2.3
4+ * https://github.com/hyspace/typeahead.js-bootstrap3.less
5+ *
6+ * Licensed under the MIT license:
7+ * http://www.opensource.org/licenses/MIT
8+ */
9+
10+//custom mixin for .form-control-validation
11+.typeahead-form-control(@border-color: #ccc;) {
12+ border-color: @border-color;
13+ .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
14+ &:focus {
15+ border-color: darken(@border-color, 10%);
16+ @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
17+ .box-shadow(@shadow);
18+ }
19+}
20+
21+//main styles for control
22+.tt-input,
23+.tt-hint {
24+ .twitter-typeahead &{
25+ //validation states
26+ .has-warning &{
27+ .typeahead-form-control(@state-warning-text);
28+ }
29+ .has-error &{
30+ .typeahead-form-control(@state-danger-text);
31+ }
32+ .has-success &{
33+ .typeahead-form-control(@state-success-text);
34+ }
35+ }
36+
37+ //border
38+ .input-group .twitter-typeahead:first-child &{
39+ .border-left-radius(@border-radius-base);
40+ }
41+ .input-group .twitter-typeahead:last-child &{
42+ .border-right-radius(@border-radius-base);
43+ }
44+
45+ //sizing - small:size and border
46+ .input-group.input-group-sm .twitter-typeahead &{
47+ .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
48+ }
49+ .input-group.input-group-sm .twitter-typeahead:not(:first-child):not(:last-child) &{
50+ border-radius: 0;
51+ }
52+ .input-group.input-group-sm .twitter-typeahead:first-child &{
53+ .border-left-radius(@border-radius-small);
54+ .border-right-radius(0);
55+ }
56+ .input-group.input-group-sm .twitter-typeahead:last-child &{
57+ .border-left-radius(0);
58+ .border-right-radius(@border-radius-small);
59+ }
60+
61+ //sizing - large:size and border
62+ .input-group.input-group-lg .twitter-typeahead &{
63+ .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
64+ }
65+ .input-group.input-group-lg .twitter-typeahead:not(:first-child):not(:last-child) &{
66+ border-radius: 0;
67+ }
68+ .input-group.input-group-lg .twitter-typeahead:first-child &{
69+ .border-left-radius(@border-radius-large);
70+ .border-right-radius(0);
71+ }
72+ .input-group.input-group-lg .twitter-typeahead:last-child &{
73+ .border-left-radius(0);
74+ .border-right-radius(@border-radius-large);
75+ }
76+}
77+
78+//for wrapper
79+.twitter-typeahead {
80+ width: 100%;
81+ .input-group &{
82+ //overwrite `display:inline-block` style
83+ display: table-cell!important;
84+ float: left;
85+ }
86+}
87+
88+//particular style for each other
89+.twitter-typeahead .tt-hint {
90+ color: @text-muted;//color - hint
91+}
92+.twitter-typeahead .tt-input {
93+ z-index: 2;
94+ //disabled status
95+ //overwrite inline styles of .tt-query
96+ &[disabled],
97+ &[readonly],
98+ fieldset[disabled] & {
99+ cursor: not-allowed;
100+ //overwirte inline style
101+ background-color: @input-bg-disabled!important;
102+ }
103+}
104+
105+//dropdown styles
106+.tt-dropdown-menu {
107+ //dropdown menu
108+ position: absolute;
109+ top: 100%;
110+ left: 0;
111+ z-index: @zindex-dropdown;
112+ min-width: 160px;
113+ width: 100%;
114+ padding: 5px 0;
115+ margin: 2px 0 0;
116+ list-style: none;
117+ font-size: @font-size-base;
118+ background-color: @dropdown-bg;
119+ border: 1px solid @dropdown-fallback-border;
120+ border: 1px solid @dropdown-border;
121+ border-radius: @border-radius-base;
122+ .box-shadow(0 6px 12px rgba(0,0,0,.175));
123+ background-clip: padding-box;
124+ *border-right-width: 2px;
125+ *border-bottom-width: 2px;
126+
127+ .tt-suggestion {
128+ //item
129+ display: block;
130+ padding: 3px 20px;
131+ clear: both;
132+ font-weight: normal;
133+ line-height: @line-height-base;
134+ color: @dropdown-link-color;
135+ white-space: nowrap;
136+ text-align: left;
137+ cursor: pointer !important;
138+ &.tt-cursor {
139+ //item selected
140+ text-decoration: none;
141+ outline: 0;
142+ background-color: @dropdown-link-hover-bg;
143+ color: @dropdown-link-hover-color;
144+ a {
145+ //link in item selected
146+ color: @dropdown-link-hover-color;
147+ }
148+ }
149+ p {
150+ margin: 0;
151+ }
152+ }
153+}
searx/templates/oscar/base.html−1
@@ -9,7 +9,6 @@
99 <title>{% block title %}{% endblock %}searx</title>
1010
1111 <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" />
12− {% if autocomplete %}<link rel="stylesheet" href="{{ url_for('static', filename='css/typeahead.css') }}" type="text/css" />{% endif %}
1312 <link rel="stylesheet" href="{{ url_for('static', filename='css/oscar.min.css') }}" type="text/css" />
1413
1514 <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->