Skip to content

Commit e385cdc

Browse files
authored
Adding support for dark mode (#31)
1 parent 99bd0b9 commit e385cdc

File tree

3 files changed

+67
-8
lines changed

3 files changed

+67
-8
lines changed

_includes/page_title.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ <h1>{%- if page.url != '/' -%}
33
{%- endif -%}
44
{{- include.title -}}
55
<div class="github-buttons">
6-
<a class="github-button" href="https://github.com/LOLBAS-Project/LOLBAS" data-icon="octicon-star" data-show-count="true" aria-label="Star LOLBAS-Project/LOLBAS on GitHub">Star</a>
6+
<a class="github-button" href="https://github.com/LOLBAS-Project/LOLBAS" data-icon="octicon-star" data-show-count="true" data-size="large" data-color-scheme="no-preference: light; light: light; dark: dark;" aria-label="Star LOLBAS-Project/LOLBAS on GitHub">Star</a>
77
</div>
88
</h1>

assets/style.scss

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
---
33
$accent: #2fc0f0;
4+
$bg-dark: #212830;
45
$lighter: lighten($accent, 40%);
6+
$darker: mix($accent, $bg-dark, 20%);
57
$hover: #0d89b3;
68

79
// layout
@@ -216,12 +218,7 @@ h3 {
216218
// other classes
217219

218220
.logo {
219-
$margin: 20px;
220-
float: right;
221-
width: 100px;
222-
height: 100px;
223-
margin-left: $margin;
224-
margin-bottom: $margin;
221+
margin-right: 10px;
225222
}
226223

227224
.bin-name {
@@ -261,6 +258,8 @@ ul {
261258
.external-favicon {
262259
width: 16px;
263260
vertical-align: middle;
261+
font-size: 0;
262+
display: inline-flex;
264263
}
265264

266265
#contributors {
@@ -481,3 +480,63 @@ $xy-border: (
481480
opacity: 1;
482481
}
483482
}
483+
484+
@media (prefers-color-scheme: dark) {
485+
body {
486+
background: $bg-dark;
487+
color: white;
488+
}
489+
490+
input {
491+
color: white;
492+
background: lighten($bg-dark, 10%);
493+
border: 1px solid lighten($bg-dark, 40%);
494+
}
495+
496+
input::placeholder {
497+
color: lighten($bg-dark, 40%);
498+
}
499+
500+
code,
501+
pre {
502+
background: $darker;
503+
color: inherit;
504+
}
505+
506+
#bin-table tbody tr:hover {
507+
background: $darker;
508+
}
509+
510+
.tag {
511+
background-color: $darker;
512+
}
513+
514+
.github-corner svg {
515+
fill: #585858!important;
516+
}
517+
518+
code .path {
519+
color: lighten($accent, 10%);
520+
border-bottom: 1px dashed #ccc;
521+
}
522+
523+
img.logo {
524+
filter: drop-shadow(0 0 3px rgb(255, 255, 255));
525+
}
526+
527+
.function-list div {
528+
border: 1px solid $darker;
529+
background-color: lighten($bg-dark, 2%);
530+
531+
a:link,
532+
a:visited {
533+
color: $accent;
534+
}
535+
536+
&:hover,
537+
a:hover {
538+
color: $hover;
539+
border-color: $hover;
540+
}
541+
}
542+
}

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ title: LOLBAS
1212
</script>
1313

1414
<div class="header-box">
15-
<a href="https://github.com/LOLBAS-Project/LOLBAS/blob/master/README.md"><img src="{{ '/assets/logo.png' | relative_url }}" height="150" alt="{{site.title}} Logo" style="margin-right: 10px;"></a>
15+
<a href="https://github.com/LOLBAS-Project/LOLBAS/blob/master/README.md"><img src="{{ '/assets/logo.png' | relative_url }}" height="150" alt="{{site.title}} Logo" class="logo"></a>
1616
<div>
1717
<h2 style="margin-top: 0">Living Off The Land Binaries, Scripts and Libraries</h2>
1818

0 commit comments

Comments
 (0)