Skip to content

Commit ca4dfd9

Browse files
committed
add engines to preferences
1 parent ed6b5d8 commit ca4dfd9

File tree

11 files changed

+322
-5328
lines changed

11 files changed

+322
-5328
lines changed

searx/static/themes/smart/css/ltr-style.css

Lines changed: 1 addition & 2677 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

searx/static/themes/smart/css/rtl-style.css

Lines changed: 1 addition & 2625 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

searx/static/themes/smart/scripts/svg2jinja.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const svgList = {
2020
user: "node_modules/remixicon/icons/User & Faces/user-6-fill.svg",
2121
loader: "node_modules/remixicon/icons/System/loader-line.svg",
2222
information: "node_modules/remixicon/icons/System/information-fill.svg",
23+
check: "node_modules/remixicon/icons/System/check-line.svg",
2324
};
2425

2526
const ejs = require("ejs"),
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@use './mixins.scss' as mixin;
2+
3+
.bar-chart {
4+
display: flex;
5+
align-items: center;
6+
justify-content: start;
7+
@include mixin.rounded(full);
8+
height: .5rem;
9+
overflow: hidden;
10+
background-color: var(--secondary-border-color);
11+
12+
.bar {
13+
height: 100%;
14+
background-color: var(--secondary-text-color);
15+
transition: flex 100ms ease-in-out;
16+
}
17+
18+
.bar.l1 {
19+
background-color: var(--primary-color);
20+
}
21+
22+
.bar.l2 {
23+
background-color: #c41919;
24+
}
25+
}

searx/static/themes/smart/src/scss/_tooltip.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
padding: .25rem 1rem;
1616
@include mixin.rounded(sm);
1717
white-space: nowrap;
18-
z-index: 1;
18+
z-index: -1;
1919
opacity: 0;
2020
transition: opacity 250ms ease-in-out;
2121
}
@@ -27,7 +27,7 @@
2727
left: 50%;
2828
transform: translate(calc(-50% - 1rem), 40%);
2929
white-space: nowrap;
30-
z-index: 1;
30+
z-index: -1;
3131
opacity: 0;
3232
transition: opacity 250ms ease-in-out;
3333
border-width: 5px;
@@ -41,11 +41,13 @@
4141

4242

4343
*[tooltip]:hover::after {
44+
z-index: 1;
4445
opacity: 1;
4546
transition: opacity 250ms ease-in-out 500ms;
4647
}
4748

4849
*[tooltip]:hover::before {
50+
z-index: 1;
4951
opacity: 1;
5052
transition: opacity 250ms ease-in-out 500ms;
5153
}

searx/static/themes/smart/src/scss/preferences.scss

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,135 @@
9494

9595
.tab-id:target+div {
9696
display: block;
97+
98+
&.engines-tab {
99+
display: flex;
100+
}
101+
}
102+
103+
.engines-tab {
104+
padding-top: 1rem;
105+
flex-wrap: wrap;
106+
107+
.category-tab {
108+
display: none;
109+
}
110+
111+
.category-btn {
112+
padding: .5rem 1rem;
113+
order: 0;
114+
text-transform: capitalize;
115+
}
116+
117+
.category-radio {
118+
display: none;
119+
}
120+
121+
.category-radio:checked+.category-btn {
122+
font-weight: 600;
123+
text-decoration: wavy underline 1px var(--secondary-color);
124+
}
125+
126+
.category-radio:checked+.category-btn+.category-tab {
127+
display: grid;
128+
order: 10;
129+
}
130+
131+
.category-tab {
132+
grid-template-columns: min-content repeat(2, minmax(10rem, 1fr)) repeat(7, min-content);
133+
gap: .5rem;
134+
width: 100%;
135+
padding: 1rem mixin.bidiValue(1rem, .5rem) 1rem mixin.bidiValue(.5rem, 1rem);
136+
137+
.note {
138+
font-size: .8rem;
139+
text-align: justify;
140+
margin-bottom: 1rem;
141+
color: var(--secondary-text-color);
142+
grid-column: span 10;
143+
}
144+
145+
.group-header {
146+
background-color: var(--secondary-background-color);
147+
padding: .5rem 1rem;
148+
grid-column: span 10;
149+
display: flex;
150+
align-items: center;
151+
gap: 1rem;
152+
margin: 1rem 0 .5rem;
153+
@include mixin.rounded(sm);
154+
155+
.group-name {
156+
font-size: 1.1rem;
157+
font-weight: 700;
158+
text-transform: uppercase;
159+
160+
&.more {
161+
font-size: .8rem;
162+
font-weight: 400;
163+
opacity: .5;
164+
text-transform: capitalize;
165+
166+
&::after {
167+
content: "";
168+
}
169+
170+
&+.bang {
171+
display: none;
172+
}
173+
}
174+
}
175+
}
176+
177+
h3 {
178+
text-wrap: nowrap;
179+
font-weight: 600;
180+
181+
&:first-of-type {
182+
@include mixin.margin-left(.5rem);
183+
}
184+
185+
&.detail {
186+
font-size: .8rem;
187+
}
188+
}
189+
190+
h4 {
191+
font-weight: 500;
192+
text-transform: capitalize
193+
}
194+
195+
.switch {
196+
@include mixin.margin-left(.5rem);
197+
}
198+
199+
.bang {
200+
font-family: monospace;
201+
202+
background-color: var(--border-color);
203+
@include mixin.rounded(sm);
204+
padding: .25rem .5rem;
205+
}
206+
207+
.numbric {
208+
display: inline-block;
209+
width: 100%;
210+
text-align: center;
211+
padding: .25rem;
212+
text-wrap: nowrap;
213+
height: 1.75rem;
214+
215+
&:is(.danger, .error) {
216+
background-color: rgba(255, 0, 0, .2);
217+
}
218+
219+
&.success {
220+
background-color: rgba(0, 255, 0, .2);
221+
}
222+
}
223+
}
97224
}
225+
98226
}
99227

100228
.backup-container {

searx/static/themes/smart/src/scss/stats.scss

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,4 @@
124124
display: block;
125125
}
126126
}
127-
128-
.bar-chart {
129-
display: flex;
130-
align-items: center;
131-
justify-content: start;
132-
@include mixin.rounded(full);
133-
height: .5rem;
134-
overflow: hidden;
135-
background-color: var(--secondary-border-color);
136-
137-
.bar {
138-
height: 100%;
139-
background-color: var(--secondary-text-color);
140-
transition: flex 100ms ease-in-out;
141-
}
142-
143-
.bar.l1 {
144-
background-color: var(--primary-color);
145-
}
146-
}
147127
}

searx/static/themes/smart/src/scss/style.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ $dir: ltr !default;
1818
// Tooltip
1919
@use 'tooltip';
2020

21+
@use 'bar_chart';
22+
2123
@forward './infobox.scss';
2224

2325
@forward './results';

searx/templates/smart/icons.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
'user':'<svg viewBox="0 0 24 24" fill="currentColor" class="icon" aria-hidden="true"><path d="M11.9999 17C15.6623 17 18.8649 18.5751 20.607 20.9247L18.765 21.796C17.3473 20.1157 14.8473 19 11.9999 19C9.15248 19 6.65252 20.1157 5.23479 21.796L3.39355 20.9238C5.13576 18.5747 8.33796 17 11.9999 17ZM11.9999 2C14.7613 2 16.9999 4.23858 16.9999 7V10C16.9999 12.7614 14.7613 15 11.9999 15C9.23847 15 6.9999 12.7614 6.9999 10V7C6.9999 4.23858 9.23847 2 11.9999 2Z"/></svg>',
2222
'loader':'<svg viewBox="0 0 24 24" fill="currentColor" class="icon" aria-hidden="true"><path d="M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z"/></svg>',
2323
'information':'<svg viewBox="0 0 24 24" fill="currentColor" class="icon" aria-hidden="true"><path d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 11V17H13V11H11ZM11 7V9H13V7H11Z"/></svg>',
24+
'check':'<svg viewBox="0 0 24 24" fill="currentColor" class="icon" aria-hidden="true"><path d="M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"/></svg>',
2425

2526
}
2627
-%}

searx/templates/smart/madules/settings/engine.html

Whitespace-only changes.

0 commit comments

Comments
 (0)