forked from degoog-org/degoog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyling.html
More file actions
572 lines (561 loc) · 18.8 KB
/
Copy pathstyling.html
File metadata and controls
572 lines (561 loc) · 18.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
<!doctype html>
<html lang="en" data-theme="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Styling — Degoog docs</title>
<script>
(function () {
try {
var t = localStorage.getItem("ade:theme");
if (t !== "light" && t !== "dark") {
t = window.matchMedia("(prefers-color-scheme: dark)").matches
? "dark"
: "light";
}
document.documentElement.setAttribute("data-theme", t);
} catch (e) {}
})();
</script>
<link
rel="icon"
href="https://github.com/fccview/degoog/raw/main/src/public/images/degoog-logo.png"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
/>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="ade-layout">
<header class="ade-mobile-header">
<button id="ade-burger" type="button" class="ade-btn ade-btn-burger">
<i class="fa-solid fa-bars"></i>
</button>
<span class="ade-mobile-title">Degoog Docs</span>
</header>
<div class="ade-content">
<aside class="ade-sidebar">
<div class="ade-sidebar-brand">
<img
src="https://github.com/fccview/degoog/raw/main/src/public/images/degoog-logo.png"
alt="degoog logo"
class="ade-brand-img"
onerror="this.style.display = 'none'"
/>
<a href="index.html" class="ade-brand-name">Degoog Docs</a>
</div>
<div class="ade-sidebar-search">
<div class="doc-search-wrap">
<input
type="search"
id="doc-search-input"
class="ade-input doc-search"
placeholder="Search docs..."
autocomplete="off"
/>
<button
type="button"
class="doc-search-clear ade-btn"
aria-label="Clear search"
style="display: none"
>
Clear
</button>
<span class="doc-search-count"></span>
</div>
</div>
<nav class="ade-nav" aria-label="Documentation">
<a href="index.html" class="ade-nav-item"
><i class="fa-solid fa-book-open fa-lg"></i></i
><span class="ade-nav-item-name">Overview</span></a
>
<a href="plugins.html" class="ade-nav-item"
><i class="fa-solid fa-puzzle-piece fa-lg"></i
><span class="ade-nav-item-name"> Plugins</span></a
>
<a href="themes.html" class="ade-nav-item"
><i class="fa-solid fa-palette fa-lg"></i
><span class="ade-nav-item-name"> Themes</span></a
>
<a href="engines.html" class="ade-nav-item"
><i class="fa-solid fa-bolt fa-lg"></i
><span class="ade-nav-item-name"> Search engines</span></a
>
<a href="transports.html" class="ade-nav-item"
><i class="fa-solid fa-network-wired fa-lg"></i
><span class="ade-nav-item-name"> Transports</span></a
>
<a href="store.html" class="ade-nav-item"
><i class="fa-solid fa-store fa-lg"></i
><span class="ade-nav-item-name"> Store</span></a
>
<a href="aliases.html" class="ade-nav-item"
><i class="fa-solid fa-link fa-lg"></i
><span class="ade-nav-item-name"> Aliases</span></a
>
<a href="env.html" class="ade-nav-item"
><i class="fa-solid fa-lock fa-lg"></i></i
><span class="ade-nav-item-name">ENV Variables</span></a
>
<a href="styling.html" class="ade-nav-item"
><i class="fa-solid fa-swatchbook fa-lg"></i></i
><span class="ade-nav-item-name"> Styling</span></a
>
<a href="translations.html" class="ade-nav-item"
><i class="fa-solid fa-language fa-lg"></i
><span class="ade-nav-item-name"> Translations</span></a
>
<a href="api.html" class="ade-nav-item"
><i class="fa-solid fa-code fa-lg"></i
><span class="ade-nav-item-name"> API</span></a
>
</nav>
<div class="ade-sidebar-actions">
<button
id="doc-theme-toggle"
type="button"
class="ade-btn"
aria-label="Toggle theme"
>
<i class="fa-solid fa-circle-half-stroke"></i>
</button>
</div>
</aside>
<main class="ade-main">
<div class="doc-page-header">
<h1><a href="index.html">Degoog</a> Styling</h1>
<p class="doc-page-desc">
CSS variables and key classes for your themes and plugin outputs.
</p>
</div>
<h2>CSS variables</h2>
<p>
The application exposes several CSS custom properties on the
<code>:root</code> element. You can use these in your themes and
plugin styles to ensure your colors automatically adapt to light or
dark modes (using <code>data-theme="light"</code> or
<code>data-theme="dark"</code> on the
<code><html></code> tag).
</p>
<table>
<thead>
<tr>
<th>Variable</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--primary</code></td>
<td>Primary accent for links and buttons</td>
</tr>
<tr>
<td><code>--primary-hover</code></td>
<td>Hover state for primary elements</td>
</tr>
<tr>
<td><code>--primary-rgb</code></td>
<td>Primary color as an RGB tuple</td>
</tr>
<tr>
<td><code>--danger</code></td>
<td>Danger or error color</td>
</tr>
<tr>
<td><code>--warning</code></td>
<td>Warning color</td>
</tr>
<tr>
<td><code>--success</code></td>
<td>Success color</td>
</tr>
<tr>
<td><code>--bg</code></td>
<td>Page background</td>
</tr>
<tr>
<td><code>--bg-light</code></td>
<td>Lighter background for cards and inputs</td>
</tr>
<tr>
<td><code>--bg-hover</code></td>
<td>Hover background</td>
</tr>
<tr>
<td><code>--border</code></td>
<td>Border color</td>
</tr>
<tr>
<td><code>--border-light</code></td>
<td>Lighter border</td>
</tr>
<tr>
<td><code>--text-primary</code></td>
<td>Main text color</td>
</tr>
<tr>
<td><code>--text-secondary</code></td>
<td>Secondary or muted text</td>
</tr>
<tr>
<td><code>--text-link</code></td>
<td>Link color</td>
</tr>
<tr>
<td><code>--text-link-visited</code></td>
<td>Visited link color</td>
</tr>
<tr>
<td><code>--text-cite</code></td>
<td>Citation or URL text</td>
</tr>
<tr>
<td><code>--text-snippet</code></td>
<td>Snippet or description text</td>
</tr>
<tr>
<td><code>--search-bar-bg</code></td>
<td>Search bar background</td>
</tr>
<tr>
<td><code>--search-bar-bg-hover</code></td>
<td>Search bar hover state</td>
</tr>
<tr>
<td><code>--btn-bg</code></td>
<td>Button background</td>
</tr>
<tr>
<td><code>--btn-text</code></td>
<td>Button text color</td>
</tr>
<tr>
<td><code>--overlay-bg</code></td>
<td>Overlay background for modals</td>
</tr>
<tr>
<td><code>--white</code></td>
<td>Pure white</td>
</tr>
</tbody>
</table>
<h2>Example theme or plugin CSS</h2>
<pre><code>.my-panel {
background: var(--bg-light);
color: var(--text-primary);
border: 1px solid var(--border);
}
.my-panel a {
color: var(--text-link);
}</code></pre>
<h2>Reusable classes</h2>
<p>
Try to reuse these built in classes in your plugin or theme HTML and
CSS. This makes sure your output matches the main UI and benefits
from the exact same layout structure. It is always better to use
these instead of inventing new classes when the meaning fits
perfectly.
</p>
<h3>Bang command and result output</h3>
<table>
<thead>
<tr>
<th>Class</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.command-result</code></td>
<td>Wrapper for bang command HTML injected into results</td>
</tr>
<tr>
<td><code>.result-item</code></td>
<td>Single result row like list items in a command</td>
</tr>
<tr>
<td><code>.result-item-inner</code></td>
<td>Inner wrapper of a result row</td>
</tr>
<tr>
<td><code>.result-body</code></td>
<td>Result text block</td>
</tr>
<tr>
<td><code>.result-title</code></td>
<td>Result title or link</td>
</tr>
<tr>
<td><code>.result-snippet</code></td>
<td>Result snippet or description</td>
</tr>
<tr>
<td><code>.result-cite</code></td>
<td>URL or citation line</td>
</tr>
<tr>
<td><code>.result-url-row</code></td>
<td>Row showing the URL and favicon</td>
</tr>
<tr>
<td><code>.result-thumbnail-wrap</code></td>
<td>Thumbnail container</td>
</tr>
</tbody>
</table>
<h3>At a glance and slot panels</h3>
<table>
<thead>
<tr>
<th>Class</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.glance-box</code></td>
<td>At a glance panel container</td>
</tr>
<tr>
<td><code>.glance-snippet</code></td>
<td>Glance content area</td>
</tr>
<tr>
<td><code>.glance-link</code></td>
<td>Link inside a glance panel</td>
</tr>
<tr>
<td><code>.results-slot</code></td>
<td>Slot wrapper within results</td>
</tr>
<tr>
<td><code>.results-slot--above-sidebar</code></td>
<td>Slot positioned above the main sidebar content</td>
</tr>
<tr>
<td><code>.results-slot--below-sidebar</code></td>
<td>Slot positioned below the main sidebar content</td>
</tr>
<tr>
<td><code>.results-slot-panel</code></td>
<td>Slot panel container</td>
</tr>
<tr>
<td><code>.results-slot-panel-title</code></td>
<td>Slot panel heading</td>
</tr>
<tr>
<td><code>.results-slot-panel-body</code></td>
<td>Slot panel content</td>
</tr>
</tbody>
</table>
<h3>Buttons</h3>
<table>
<thead>
<tr>
<th>Class</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.btn</code></td>
<td>Base button styling</td>
</tr>
<tr>
<td><code>.btn--primary</code></td>
<td>Primary action button</td>
</tr>
<tr>
<td><code>.btn--secondary</code></td>
<td>Secondary action button</td>
</tr>
<tr>
<td><code>.btn--danger</code></td>
<td>Destructive action button</td>
</tr>
</tbody>
</table>
<h3>Forms and extension settings</h3>
<p>
If you are rendering settings forms in your plugin UI, these classes
will align them perfectly with the standard Settings modals.
</p>
<table>
<thead>
<tr>
<th>Class</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.ext-field</code></td>
<td>Field wrapper</td>
</tr>
<tr>
<td><code>.ext-field-label</code></td>
<td>Field label</td>
</tr>
<tr>
<td><code>.ext-field-input</code></td>
<td>Text input</td>
</tr>
<tr>
<td><code>.ext-field-desc</code></td>
<td>Field description</td>
</tr>
<tr>
<td><code>.ext-modal</code></td>
<td>Modal container</td>
</tr>
<tr>
<td><code>.ext-modal-header</code></td>
<td>Modal header</td>
</tr>
<tr>
<td><code>.ext-modal-body</code></td>
<td>Modal body</td>
</tr>
<tr>
<td><code>.ext-modal-footer</code></td>
<td>Modal footer</td>
</tr>
</tbody>
</table>
<h3>Layout and chrome</h3>
<table>
<thead>
<tr>
<th>Class</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.header</code></td>
<td>Top header bar</td>
</tr>
<tr>
<td><code>.header-link</code></td>
<td>Header link</td>
</tr>
<tr>
<td><code>.search-bar</code></td>
<td>Search bar container</td>
</tr>
<tr>
<td><code>.search-bar-action-btn</code></td>
<td>Search bar action button</td>
</tr>
<tr>
<td><code>.sidebar-panel</code></td>
<td>Sidebar panel</td>
</tr>
</tbody>
</table>
<h3>Media elements</h3>
<p>
You can use these classes for plugins that display image or video
grids.
</p>
<table>
<thead>
<tr>
<th>Class</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.image-grid</code></td>
<td>Image grid container</td>
</tr>
<tr>
<td><code>.image-card</code></td>
<td>Single image card</td>
</tr>
<tr>
<td><code>.image-thumb-wrap</code></td>
<td>Thumbnail wrapper</td>
</tr>
<tr>
<td><code>.image-title</code></td>
<td>Image title</td>
</tr>
<tr>
<td><code>.video-grid</code></td>
<td>Video grid</td>
</tr>
<tr>
<td><code>.video-card</code></td>
<td>Single video card</td>
</tr>
<tr>
<td><code>.video-duration</code></td>
<td>Duration label</td>
</tr>
</tbody>
</table>
<h3>Help and tables</h3>
<table>
<thead>
<tr>
<th>Class</th>
<th>Use</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>.command-help-table</code></td>
<td>Table layout for help menus</td>
</tr>
<tr>
<td><code>.help-row</code></td>
<td>Row within a help list</td>
</tr>
<tr>
<td><code>.help-trigger</code></td>
<td>Trigger text element</td>
</tr>
<tr>
<td><code>.help-name</code></td>
<td>Command name</td>
</tr>
<tr>
<td><code>.pagination</code></td>
<td>Pagination wrapper</td>
</tr>
<tr>
<td><code>.pagination-link</code></td>
<td>Page link</td>
</tr>
</tbody>
</table>
<p>
Make sure to use <code>.command-result</code> as the outer wrapper
for your bang command HTML so the spacing matches the rest of the
results page perfectly. You can easily scope your own classes
underneath it to avoid any styling clashes.
</p>
</main>
</div>
<div id="ade-backdrop" class="ade-backdrop"></div>
</div>
<script
src="https://code.jquery.com/jquery-4.0.0.min.js"
crossorigin="anonymous"
></script>
<script src="docs.js"></script>
<script src="docs-ui.js"></script>
</body>
</html>