Skip to content

Commit

Permalink
feat: Copy over dark docs theming from osv.dev (#1245)
Browse files Browse the repository at this point in the history
  • Loading branch information
another-rex authored Sep 16, 2024
1 parent 3dceabd commit 84f1a96
Show file tree
Hide file tree
Showing 6 changed files with 379 additions and 47 deletions.
4 changes: 2 additions & 2 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ remote_theme: just-the-docs/just-the-docs
plugins:
- jekyll-feed

color_scheme: better_contrast
color_scheme: custom_dark
markdown: kramdown

kramdown:
toc_levels: 1..3

logo: "/assets/logo.png"
logo: "/assets/logo-dark.png"
favicon_ico: "/assets/icon.png"

callouts_level: quiet # or loud
Expand Down
36 changes: 36 additions & 0 deletions docs/_sass/color_schemes/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
$white: #fff !default;
$grey-dk-000: #959396 !default;
$grey-dk-100: #5c5962 !default;
$grey-dk-200: #44434d !default;
$grey-dk-250: #302d36 !default;
$grey-dk-300: #27262b !default;
$grey-lt-000: #f5f6fa !default;
$grey-lt-100: #eeebee !default;
$grey-lt-200: #ecebed !default;
$grey-lt-300: #e6e1e8 !default;
$purple-000: #7253ed !default;
$purple-100: #5e41d0 !default;
$purple-200: #4e26af !default;
$purple-300: #381885 !default;
$blue-000: #2c84fa !default;
$blue-100: #2869e6 !default;
$blue-200: #264caf !default;
$blue-300: #183385 !default;
$green-000: #41d693 !default;
$green-100: #11b584 !default;
$green-200: #009c7b !default;
$green-300: #026e57 !default;
$yellow-000: #ffeb82 !default;
$yellow-100: #fadf50 !default;
$yellow-200: #f7d12e !default;
$yellow-300: #e7af06 !default;
$red-000: #f77e7e !default;
$red-100: #f96e65 !default;
$red-200: #e94c4c !default;
$red-300: #dd2e2e !default;

$body-font-family:
"Overpass",
system-ui,
-apple-system,
sans-serif;
45 changes: 0 additions & 45 deletions docs/_sass/color_schemes/better_contrast.scss

This file was deleted.

26 changes: 26 additions & 0 deletions docs/_sass/color_schemes/custom_dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@import "./variables";
@import "../highlight/native.scss";
@import url("https://fonts.googleapis.com/css2?family=Overpass:ital,wght@0,100..900;1,100..900&display=swap");

$new-body-background-color: #292929;

// Overriding dark default for just-the-docs styles
$color-scheme: dark;
$body-background-color: $new-body-background-color; // Replacing default $grey-dk-300
$body-heading-color: $white; // Replacing default $grey-lt-000
$body-text-color: $white; //Replacing default $grey-lt-300
$link-color: #c9f5f7;
$nav-child-link-color: $white; // Replacing default $grey-dk-000
$sidebar-color: $new-body-background-color; //Replacing default $grey-dk-300
$base-button-color: $grey-dk-250;
$btn-primary-color: $blue-200;
$code-background-color: #202020; // Important to match with .highlight background and .highlight.err background-color
$code-linenumber-color: #447fcf; // Important to match with .highlight.nf color
$feedback-color: darken($sidebar-color, 3%);
$table-background-color: lighten(
$new-body-background-color,
5%
); // Replacing default $grey-dk-250
$search-background-color: $new-body-background-color; // Replacing default $grey-dk-250
$search-result-preview-color: $grey-dk-000;
$border-color: #6a6a6a; // Replacing default $grey-dk-200
Loading

0 comments on commit 84f1a96

Please sign in to comment.