diff --git a/src/features/sicp/SourceTheme.ts b/src/features/sicp/SourceTheme.ts index fe2cd04dcd..89d1d69fa4 100644 --- a/src/features/sicp/SourceTheme.ts +++ b/src/features/sicp/SourceTheme.ts @@ -7,7 +7,7 @@ const SourceThemeBackground = '#2c3e50'; export const SourceTheme = { 'code[class*="language-"]': { color: 'white', - background: SourceThemeBackground, + background: 'transparent', fontFamily: "'Inconsolata', 'Consolas', monospace", textAlign: 'left', whiteSpace: 'pre', @@ -47,7 +47,7 @@ export const SourceTheme = { borderRadius: '0.3em' }, ':not(pre) > code[class*="language-"]': { - background: SourceThemeBackground, + background: 'transparent', padding: '0.1em', borderRadius: '0.3em', whiteSpace: 'normal' diff --git a/src/pages/sicp/subcomponents/CodeSnippet.tsx b/src/pages/sicp/subcomponents/CodeSnippet.tsx index 645377113f..9bfc01e147 100644 --- a/src/pages/sicp/subcomponents/CodeSnippet.tsx +++ b/src/pages/sicp/subcomponents/CodeSnippet.tsx @@ -1,4 +1,4 @@ -import { Pre } from '@blueprintjs/core'; +import { Card, Elevation, Pre } from '@blueprintjs/core'; import { HighlightRulesSelector, ModeSelector } from 'js-slang/dist/editors/ace/modes/source'; import { Resizable } from 're-resizable'; import * as React from 'react'; @@ -113,9 +113,11 @@ const CodeSnippet: React.FC = props => { )} ) : ( - - {body} - + + + {body} + + )} {output &&
{output}
} diff --git a/src/pages/sicp/subcomponents/SicpIndexPage.tsx b/src/pages/sicp/subcomponents/SicpIndexPage.tsx index a0e6ceb429..13b9642237 100644 --- a/src/pages/sicp/subcomponents/SicpIndexPage.tsx +++ b/src/pages/sicp/subcomponents/SicpIndexPage.tsx @@ -11,19 +11,16 @@ const developers = 'Samuel Fang'; const authors = (
-

{originalAuthors}

{originalWithAuthors} — original authors

-

{adaptedAuthors}

{adaptedWithAuthors} — adapters to JavaScript

-

{developers}

— designer and developer of Interactive SICP diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap index 1c19375f15..f0a6442b9b 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/CodeSnippet.tsx.snap @@ -2,9 +2,11 @@ exports[`Sicp Code Snippet renders correctly 1`] = ` "

- - 1+1; - + + + 1+1; + + 2 diff --git a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap index db492ecaf3..70b2f8b012 100644 --- a/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap +++ b/src/pages/sicp/subcomponents/__tests__/__snapshots__/SicpIndexPage.tsx.snap @@ -19,7 +19,6 @@ exports[`Sicp index page 1`] = `
-

Harold Abelson and Gerald Jay Sussman @@ -31,7 +30,6 @@ exports[`Sicp index page 1`] = ` — original authors

-

Martin Henz and Tobias Wrigstad @@ -43,7 +41,6 @@ exports[`Sicp index page 1`] = ` — adapters to JavaScript

-

Samuel Fang diff --git a/src/styles/_sicp.scss b/src/styles/_sicp.scss index 35d9649f60..972e33ce13 100644 --- a/src/styles/_sicp.scss +++ b/src/styles/_sicp.scss @@ -19,6 +19,10 @@ $sicp-background-color: #ffffff; overflow-x: scroll; } + .bp3-blockquote { + margin: 10px 0; + } + .bp3-heading { margin-top: 10px; } @@ -69,6 +73,10 @@ $sicp-background-color: #ffffff; text-align: right; } + h4 { + margin-top: 15px; + } + > h2, > .sicp-licenses { text-align: center; @@ -173,6 +181,11 @@ $sicp-background-color: #ffffff; width: 100vw; } } + + .sicp-code-snippet-closed { + padding: 0; + margin: 0; + } } .sicp-footnote { @@ -227,6 +240,16 @@ $sicp-background-color: #ffffff; .sicp-toc { overflow-y: auto; + text-align: left; + + .bp3-tree-node-caret { + color: #777777 !important; + scale: 1.25; + } + + .bp3-tree-node-caret:hover { + color: $sicp-text-color !important; + } } .sicp-toc-drawer {