From a7c7022b53798d5e6c569d2b15bb72415609d8ac Mon Sep 17 00:00:00 2001
From: Jeroen Hermans
Date: Wed, 14 Oct 2020 13:28:24 +0200
Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20update:=20rebrand=20the=20applic?=
=?UTF-8?q?ation?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 10 +-
src/components/Alert.module.scss | 27 ++--
src/components/Alert.tsx | 7 +-
src/components/App/index.module.scss | 20 +--
src/components/Button.module.scss | 121 +++++++-----------
src/components/Button.tsx | 15 +--
src/components/Footer.module.scss | 8 +-
src/components/Footer.tsx | 10 +-
src/components/Placeholder.module.scss | 9 +-
src/components/Placeholder.tsx | 7 +-
src/components/RestartSessionButton.tsx | 6 +-
.../__snapshots__/Button.spec.tsx.snap | 2 +-
.../__snapshots__/Footer.spec.tsx.snap | 2 +-
.../__snapshots__/Placeholder.spec.tsx.snap | 4 +-
.../RestartSessionButton.spec.tsx.snap | 2 +-
src/containers/BackendStatus.tsx | 4 -
src/images/datacamp-logo.svg | 20 ++-
src/images/github-icon.svg | 9 +-
src/styles/golden-layout/light.css | 16 +--
src/styles/variables.scss | 64 +++------
.../@datacamp/ui-backend-status/lib/style.css | 6 +-
21 files changed, 156 insertions(+), 213 deletions(-)
diff --git a/README.md b/README.md
index 252e9e2..f75f35a 100644
--- a/README.md
+++ b/README.md
@@ -7,10 +7,7 @@
-*This is the all-new DataCamp Light. To access the old
-version, click [here](https://github.com/datacamp/datacamp-light/tree/d0c7ae4afc50b590bbf34bfffaba8fb1a0d929f5)*
-
-[](https://cdn.datacamp.com/dcl-react-prod/example.html)
+[](https://cdn.datacamp.com/dcl-react-prod/example.html)
Table of Contents
@@ -21,7 +18,7 @@ version, click [here](https://github.com/datacamp/datacamp-light/tree/d0c7ae4afc
- [Features](#features)
- [How to run the app](#how-to-run-the-app)
- * [Writing the HTML block](#writing-the-html-block)
+- [Writing the HTML block](#writing-the-html-block)
* [Pre-Exercise Code](#pre-exercise-code)
* [Sample Code](#sample-code)
* [Solution](#solution)
@@ -95,7 +92,7 @@ including the exercise and script tag as a snippet.**
-### Writing the HTML block
+## Writing the HTML block
After including the JavaScript library, you can start writing HTML blocks in the
format below. These will be dynamically converted to exercises.
@@ -141,7 +138,6 @@ height is `300px`) or set the size according to the amount of sample code lines:
`data-height="auto"`.
-
### Pre-Exercise Code
Pre-exercise code is executed when the R/Python session is initialized. You can
diff --git a/src/components/Alert.module.scss b/src/components/Alert.module.scss
index 95a80d0..192d293 100644
--- a/src/components/Alert.module.scss
+++ b/src/components/Alert.module.scss
@@ -36,6 +36,7 @@
code {
@include preventive-overrides;
+ background-color: rgba($white, 0.4);
}
}
@@ -46,7 +47,7 @@
border: 0;
-webkit-appearance: none;
opacity: 1;
- top: -4px;
+ margin-top: -4px;
float: right;
font-size: 24px;
font-weight: bold;
@@ -61,12 +62,12 @@
}
}
-@mixin color-alert ($bg) {
+@mixin color-alert($bg, $textColor) {
background-color: $bg;
- color: rgba(0, 0, 0, 0.65);
+ color: $textColor;
.close {
- color: rgba(0, 0, 0, 0.2);
+ color: $textColor;
}
p,
@@ -78,25 +79,13 @@
}
.alert.danger {
- @include color-alert($error-light);
-
- code {
- background-color: rgba(255, 255, 255, 0.4);
- }
+ @include color-alert($red-light, $white);
}
.alert.success {
- @include color-alert($success-light);
-
- code {
- background-color: $success-light;
- }
+ @include color-alert($green-light, $navy);
}
.alert.info {
- @include color-alert($primary-lighter);
-
- code {
- background-color: $primary-extra-light;
- }
+ @include color-alert($purple-light, $white);
}
diff --git a/src/components/Alert.tsx b/src/components/Alert.tsx
index d026321..316d3ce 100644
--- a/src/components/Alert.tsx
+++ b/src/components/Alert.tsx
@@ -56,7 +56,12 @@ export class Alert extends React.Component {
if (closable) {
closeButton = (
-