Skip to content

Commit

Permalink
Added solvers-dark files
Browse files Browse the repository at this point in the history
- Added css stylesheet in book.js, and dropdown menu in contributors.html page.
- Added solvers-dark support to all pages
  • Loading branch information
ArushYadlapati committed Jul 20, 2024
1 parent 201523a commit 659043e
Show file tree
Hide file tree
Showing 24 changed files with 656 additions and 8 deletions.
1 change: 1 addition & 0 deletions book/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
17 changes: 16 additions & 1 deletion book/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ function playground_text(playground, hidden = true) {
var stylesheets = {
ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"),
solversLightHighlight: document.querySelector("[href$='solvers-light-highlight.css']"),
solversDarkHighlight: document.querySelector("[href$='solvers-dark-highlight.css']"),
tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"),
highlight: document.querySelector("[href$='highlight.css']"),
};
Expand Down Expand Up @@ -333,13 +334,15 @@ function playground_text(playground, hidden = true) {
stylesheets.tomorrowNight.disabled = false;
stylesheets.highlight.disabled = true;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = true;

ace_theme = "ace/theme/tomorrow_night";
} else if (theme == 'ayu') {
stylesheets.ayuHighlight.disabled = false;
stylesheets.tomorrowNight.disabled = true;
stylesheets.highlight.disabled = true;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = true;
ace_theme = "ace/theme/tomorrow_night";

}
Expand All @@ -348,17 +351,29 @@ function playground_text(playground, hidden = true) {
stylesheets.tomorrowNight.disabled = true;
stylesheets.highlight.disabled = false;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = true;
ace_theme = "ace/theme/dawn";
}
else {
else if (theme == 'solvers-light') {
stylesheets.ayuHighlight.disabled = true;
stylesheets.tomorrowNight.disabled = true;
stylesheets.highlight.disabled = false;
stylesheets.solversLightHighlight.disabled = false;
stylesheets.solversDarkHighlight.disabled = true;
//ace_theme = "ace/theme/tomorrow_night";
ace_theme = "ace/theme/solvers-light";
}

else {
stylesheets.ayuHighlight.disabled = true;
stylesheets.tomorrowNight.disabled = false;
stylesheets.highlight.disabled = true;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = false;
//ace_theme = "ace/theme/tomorrow_night";
ace_theme = "ace/theme/solvers-dark";
}

setTimeout(function () {
themeColorMetaTag.content = getComputedStyle(document.documentElement).backgroundColor;
}, 1);
Expand Down
2 changes: 2 additions & 0 deletions book/contributors.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down Expand Up @@ -134,6 +135,7 @@
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="solvers-light">Solvers Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="solvers-dark">Solvers Dark</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
Expand Down
2 changes: 1 addition & 1 deletion book/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

--links: #7A622C;

--inline-code-color: #443200;
--inline-code-color: #0d9d88;

--theme-popup-bg: #F8DF95;;
--theme-popup-border: #705E13;
Expand Down
1 change: 1 addition & 0 deletions book/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions book/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions book/odometry/CombinedTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions book/odometry/OdometryTesting.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions book/odometry/SplineTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">
<!-- Custom theme stylesheets -->

<!-- MathJax -->
Expand Down
1 change: 1 addition & 0 deletions book/odometry/StraightTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
2 changes: 2 additions & 0 deletions book/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
4 changes: 2 additions & 2 deletions book/solvers-dark-highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
.hljs {
display: block;
overflow-x: auto;
background: #004052;
color: #000;
background: #004052;
color: #1eb5fc;
}

.hljs-emphasis {
Expand Down
1 change: 1 addition & 0 deletions src/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
17 changes: 16 additions & 1 deletion src/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ function playground_text(playground, hidden = true) {
var stylesheets = {
ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"),
solversLightHighlight: document.querySelector("[href$='solvers-light-highlight.css']"),
solversDarkHighlight: document.querySelector("[href$='solvers-dark-highlight.css']"),
tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"),
highlight: document.querySelector("[href$='highlight.css']"),
};
Expand Down Expand Up @@ -333,13 +334,15 @@ function playground_text(playground, hidden = true) {
stylesheets.tomorrowNight.disabled = false;
stylesheets.highlight.disabled = true;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = true;

ace_theme = "ace/theme/tomorrow_night";
} else if (theme == 'ayu') {
stylesheets.ayuHighlight.disabled = false;
stylesheets.tomorrowNight.disabled = true;
stylesheets.highlight.disabled = true;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = true;
ace_theme = "ace/theme/tomorrow_night";

}
Expand All @@ -348,17 +351,29 @@ function playground_text(playground, hidden = true) {
stylesheets.tomorrowNight.disabled = true;
stylesheets.highlight.disabled = false;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = true;
ace_theme = "ace/theme/dawn";
}
else {
else if (theme == 'solvers-light') {
stylesheets.ayuHighlight.disabled = true;
stylesheets.tomorrowNight.disabled = true;
stylesheets.highlight.disabled = false;
stylesheets.solversLightHighlight.disabled = false;
stylesheets.solversDarkHighlight.disabled = true;
//ace_theme = "ace/theme/tomorrow_night";
ace_theme = "ace/theme/solvers-light";
}

else {
stylesheets.ayuHighlight.disabled = true;
stylesheets.tomorrowNight.disabled = false;
stylesheets.highlight.disabled = true;
stylesheets.solversLightHighlight.disabled = true;
stylesheets.solversDarkHighlight.disabled = false;
//ace_theme = "ace/theme/tomorrow_night";
ace_theme = "ace/theme/solvers-dark";
}

setTimeout(function () {
themeColorMetaTag.content = getComputedStyle(document.documentElement).backgroundColor;
}, 1);
Expand Down
2 changes: 2 additions & 0 deletions src/contributors.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down Expand Up @@ -134,6 +135,7 @@
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="solvers-light">Solvers Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="solvers-dark">Solvers Dark</button></li>
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
Expand Down
2 changes: 1 addition & 1 deletion src/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@

--links: #7A622C;

--inline-code-color: #443200;
--inline-code-color: #0d9d88;

--theme-popup-bg: #F8DF95;;
--theme-popup-border: #705E13;
Expand Down
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions src/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<link rel="stylesheet" href="solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions src/odometry/CombinedTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions src/odometry/OdometryTesting.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
1 change: 1 addition & 0 deletions src/odometry/SplineTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">
<!-- Custom theme stylesheets -->

<!-- MathJax -->
Expand Down
1 change: 1 addition & 0 deletions src/odometry/StraightTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<link rel="stylesheet" href="../tomorrow-night.css">
<link rel="stylesheet" href="../ayu-highlight.css">
<link rel="stylesheet" href="../solvers-light-highlight.css">
<link rel="stylesheet" href="solvers-dark-highlight.css">

<!-- Custom theme stylesheets -->

Expand Down
Loading

0 comments on commit 659043e

Please sign in to comment.