Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 81 additions & 1 deletion public/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
body {
margin: 0px;
font-family: Roboto;

}

.app-wrapper {
Expand Down Expand Up @@ -220,3 +219,84 @@ aside button {
width: 0px; /* remove scrollbar space */
background: transparent; /* optional: just make scrollbar invisible */
}

/* Dark Mode */

.dark-mode.app-wrapper {
color: #eeeeee;
background-color: #12141c;
}

.dark-mode header {
background-color: #333344;
}

.dark-mode .code {
background: #333333;
}

.dark-mode .lambda-input {
color: whitesmoke;
}

/* Dark mode REPL stuff */
.dark-mode .repl .info {
color: whitesmoke;
}

.dark-mode .repl .result {
color: whitesmoke;
}

.dark-mode .repl .command {
color: #999999;
}

.dark-mode .repl .error {
color: #ff3333;
}

.dark-mode .repl .caret {
color: #676767;
}

.dark-mode .repl .prompt-caret {
color: #eeeeee;
}

.dark-mode .result i {
color: #aaaadd;
}

.dark-mode .repl {
border-left: 1px solid #33333a;
}

.dark-mode aside {
border-left: 3px dashed #33333a;
}

.dark-mode footer {
background-color: #333344;
color: #eeeeee;
}

.dark-mode .metadata {
color: whitesmoke;
border-left: 5px solid #33333a;
}


.dark-mode .secret.secret {
background: whitesmoke;
color: transparent;
}

.dark-mode .secret.secret:hover {
color: whitesmoke;
background-color: #333333;
}

.dark-mode h1 {
font-weight: 300;
}
14 changes: 13 additions & 1 deletion src/components/App/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const defaultState = {
currentProblem: 0,
gameStarted: false,
shownProblem: 0,
darkMode: false,
};

class App extends React.Component {
Expand Down Expand Up @@ -79,14 +80,22 @@ class App extends React.Component {
);
}

_toggleDarkLight = () => {
this.setState({
darkMode: !this.state.darkMode,
});
}

render() {
const {
gameStarted,
shownProblem,
currentProblem,
darkMode,
} = this.state;

return (
<div className="app-wrapper">
<div className={'app-wrapper' + (darkMode ? ' dark-mode' : '')}>
<header>
<h1>Lambda Explorer</h1>
</header>
Expand Down Expand Up @@ -122,6 +131,9 @@ class App extends React.Component {
<a href="https://github.com/evinism/lambda-explorer">Github</a>
<a href="https://en.wikipedia.org/wiki/Lambda_calculus">Lambda Calculus Wiki</a>
<a href="https://github.com/evinism/lambda-explorer/issues">Something not right?</a>
<a href="javascript:;" onClick={this._toggleDarkLight}>
{darkMode ? 'Light Theme' : 'Dark Theme'}
</a>
</footer>
</div>
);
Expand Down