Skip to content

Commit

Permalink
Allow overriding logo in dark themes (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi authored Aug 12, 2019
1 parent d5562a8 commit 0bb4b0f
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 16 deletions.
2 changes: 2 additions & 0 deletions assets/html/scss/documenter-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ $bulmaswatch-import-font: false;

@import "darkly/variables";

$documenter-is-dark-theme: true;

$family-sans-serif: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
$family-monospace: 'Roboto Mono', 'SFMono-Regular', 'Menlo', 'Consolas', 'Liberation Mono', 'DejaVu Sans Mono', monospace;

Expand Down
10 changes: 10 additions & 0 deletions assets/html/scss/documenter/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ h1, h2, h3, h4, h5, h6 {
visibility: visible;
}
}

@if $documenter-is-dark-theme {
.docs-light-only {
display: none !important;
}
} @else {
.docs-dark-only {
display: none !important;
}
}
2 changes: 2 additions & 0 deletions assets/html/scss/documenter/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ $code-background: rgba(0, 0, 0, 0.05);

$documenter-docstring-background: transparent !default;

$documenter-is-dark-theme: false !default;

// Helper functions
// ----------------
// Declares the amount of lightness modifier used in the darken-color and lighten-color
Expand Down
2 changes: 2 additions & 0 deletions assets/html/themes/documenter-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -7200,6 +7200,8 @@ html.theme--documenter-dark {
content: "\f0c1"; }
html.theme--documenter-dark h1:hover .docs-heading-anchor, html.theme--documenter-dark h2:hover .docs-heading-anchor, html.theme--documenter-dark h3:hover .docs-heading-anchor, html.theme--documenter-dark h4:hover .docs-heading-anchor, html.theme--documenter-dark h5:hover .docs-heading-anchor, html.theme--documenter-dark h6:hover .docs-heading-anchor {
visibility: visible; }
html.theme--documenter-dark .docs-light-only {
display: none !important; }
html.theme--documenter-dark .admonition {
background-color: #282f2f;
border-style: solid;
Expand Down
3 changes: 3 additions & 0 deletions assets/html/themes/documenter-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -7108,6 +7108,9 @@ h1 .docs-heading-anchor, h2 .docs-heading-anchor, h3 .docs-heading-anchor, h4 .d
h1:hover .docs-heading-anchor, h2:hover .docs-heading-anchor, h3:hover .docs-heading-anchor, h4:hover .docs-heading-anchor, h5:hover .docs-heading-anchor, h6:hover .docs-heading-anchor {
visibility: visible; }

.docs-dark-only {
display: none !important; }

.admonition {
background-color: #b5b5b5;
border-style: solid;
Expand Down
77 changes: 77 additions & 0 deletions docs/src/assets/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0bb4b0f

Please sign in to comment.