Skip to content

Commit

Permalink
Merge branch 'master' into P2Fancy
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-henz committed Jun 20, 2021
2 parents 706573b + a3f10aa commit f1cf705
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/pages/sicp/Sicp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,22 @@ const Sicp: React.FC<SicpProps> = props => {
}, [section]);

// Scroll to correct position
React.useLayoutEffect(() => {
React.useEffect(() => {
const hash = props.location.hash;

if (!hash) {
if (topRef.current) {
topRef.current.scrollIntoView();
topRef.current.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
}
return;
}

const ref = refs.current[hash];

if (ref) {
ref.scrollIntoView({ block: 'start' });
ref.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
}
}, [props.location.hash, data]);
}, [props.location.hash]);

// Close all active code snippet when new page is loaded
React.useEffect(() => {
Expand Down
1 change: 0 additions & 1 deletion src/styles/_sicp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ $sicp-background-color: #ffffff;
margin: 1em auto;
padding: 0 6em;
max-width: 1050px;

height: fit-content;
background-color: $sicp-background-color;

Expand Down
39 changes: 38 additions & 1 deletion src/styles/_workspaceGreen.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,25 @@ $pure-green: #00ff00;
$dark-green: #00e000;
.GreenScreen {
// Hide NavigationBar
position: absolute;
height: 100vh;
width: 100vw;
margin-top: -50px;
z-index: 1000;
z-index: 15;
background: $pure-green !important;

.workspace {
background: $pure-green !important;
}

#ace-editor {
background: $pure-green !important;
}

.side-content-tooltip {
background: $pure-green !important;
}

#brace-editor {
background: $pure-green !important;
}
Expand All @@ -18,6 +29,32 @@ $dark-green: #00e000;
background: $dark-green !important;
}

/* individual components */
.bp3-button {
background: $pure-green !important;
box-shadow: none !important;
}

.bp3-input {
background: $pure-green !important;
box-shadow: none !important;
}

.bp3-control-indicator {
background: $pure-green !important;
border: 0.1rem solid $dark-green !important;
}

.bp3-control-indicator::before {
background: $pure-green !important;
border: 0.1rem solid $dark-green !important;
box-shadow: none !important;
}

.ace_gutter-active-line {
background: $pure-green !important;
}

/* editor specific */
.editor-react-ace {
color: #222222;
Expand Down

0 comments on commit f1cf705

Please sign in to comment.