Skip to content

Commit 794c562

Browse files
committed
Reintroduce dark/light theme toggle functionality with PJAX support and improved initialization
1 parent 125d2c6 commit 794c562

File tree

3 files changed

+93
-40
lines changed

3 files changed

+93
-40
lines changed

themes/icarus/include/style/dark-mode.styl

Lines changed: 10 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -415,52 +415,16 @@ html, body, .card, .navbar-main, .footer, a, .content, .title, p, h1, h2, h3, h4
415415
background: #30363d !important
416416
color: #58a6ff !important
417417

418-
/* Insight search in dark mode */
419-
.searchbox
420-
background: #161b22 !important
421-
border-color: #30363d !important
422-
423-
.searchbox-input
424-
background: #0d1117 !important
425-
color: #c9d1d9 !important
426-
border-color: #30363d !important
427-
428-
&::placeholder
429-
color: #8b949e !important
430-
431-
.searchbox-result-list
432-
background: #161b22 !important
433-
border-color: #30363d !important
434-
435-
.searchbox-result-item
436-
border-color: #30363d !important
437-
438-
&:hover
439-
background: #21262d !important
440-
441-
.searchbox-result-item-title
442-
color: #e6eef8 !important
443-
444-
.searchbox-result-item-snippet
445-
color: #8b949e !important
446-
418+
/* Insight search (alternative search UI) */
447419
.ins-search
448420
background: rgba(13, 17, 23, 0.95) !important
449421

450422
.ins-search-wrapper
451423
background: #161b22 !important
452424
border-color: #30363d !important
453425

454-
.ins-section-wrapper
455-
background: #161b22 !important
456-
457-
.ins-section-header
458-
background: #21262d !important
459-
color: #e6eef8 !important
460-
border-color: #30363d !important
461-
462426
.ins-input-wrapper
463-
background: #0d1117 !important
427+
background: #161b22 !important
464428
border-color: #30363d !important
465429

466430
.ins-input
@@ -470,10 +434,16 @@ html, body, .card, .navbar-main, .footer, a, .content, .title, p, h1, h2, h3, h4
470434
&::placeholder
471435
color: #8b949e !important
472436

473-
.ins-selectable
437+
.ins-section-wrapper
474438
background: #161b22 !important
475-
color: #c9d1d9 !important
439+
440+
.ins-section-header
441+
background: #21262d !important
442+
color: #e6eef8 !important
476443
border-color: #30363d !important
444+
445+
.ins-selectable
446+
color: #c9d1d9 !important
477447

478448
&:hover, &.active
479449
background: #21262d !important

themes/icarus/include/style/search.styl

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,3 +202,86 @@ $searchbox-bg-pagination-item-disabled ?= $searchbox-bg-container
202202
width: 100%
203203
height: 100%
204204
border-radius: 0
205+
206+
/* Dark mode overrides for search box */
207+
.dark-mode
208+
.searchbox
209+
background: rgba(13, 17, 23, 0.95)
210+
211+
.searchbox-container
212+
background: #161b22
213+
border-color: #30363d
214+
215+
.searchbox-header
216+
background: #161b22
217+
218+
.searchbox-input
219+
background: #161b22
220+
color: #c9d1d9
221+
222+
&::placeholder
223+
color: #8b949e
224+
225+
.searchbox-close
226+
color: #c9d1d9
227+
228+
&:hover
229+
background: #21262d
230+
color: #58a6ff
231+
232+
&:active
233+
background: #30363d
234+
235+
.searchbox-body
236+
background: #0d1117
237+
border-top-color: #30363d
238+
239+
.searchbox-result-section
240+
border-bottom-color: #30363d
241+
242+
header
243+
color: #8b949e
244+
background: #0d1117
245+
246+
.searchbox-result-item
247+
background: #0d1117
248+
color: #c9d1d9
249+
250+
&:not(.disabled):not(.active):not(:active):hover
251+
background: #161b22
252+
253+
&:active, &.active
254+
background: #238636
255+
color: #ffffff
256+
257+
em
258+
background: #6e7681
259+
color: #ffeb3b
260+
261+
.searchbox-result-title
262+
color: #e6eef8
263+
264+
.searchbox-result-title-secondary,
265+
.searchbox-result-preview
266+
color: #8b949e
267+
268+
.searchbox-footer
269+
background: #161b22
270+
border-top-color: #30363d
271+
272+
.searchbox-pagination-link
273+
background: #21262d
274+
color: #c9d1d9
275+
276+
&:hover
277+
background: #30363d
278+
279+
.searchbox-pagination-item.active
280+
.searchbox-pagination-link
281+
background: #238636
282+
color: #ffffff
283+
284+
.searchbox-pagination-item.disabled
285+
.searchbox-pagination-link
286+
background: #161b22
287+
color: #6e7681
File renamed without changes.

0 commit comments

Comments
 (0)