From 36de4ea70af22c8a14f20a25f81ddf3063beffcd Mon Sep 17 00:00:00 2001 From: Mark Erikson Date: Wed, 6 Nov 2024 20:08:54 -0500 Subject: [PATCH 1/2] Add Redux.dev course banners --- website/docusaurus.config.js | 15 +++++++++++++++ website/src/pages/index.js | 8 ++++++++ website/static/css/custom.css | 12 ++++++++++++ website/static/img/course-callout-mid.svg | 1 + website/static/img/course-callout-narrow.svg | 1 + website/static/img/course-callout-wide.svg | 1 + 6 files changed, 38 insertions(+) create mode 100644 website/static/img/course-callout-mid.svg create mode 100644 website/static/img/course-callout-narrow.svg create mode 100644 website/static/img/course-callout-wide.svg diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 64bc05374..47a021dfb 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -67,6 +67,21 @@ const siteConfig = { theme: require('./static/scripts/monokaiTheme.js'), }, image: 'img/redux-logo-landscape.png', + announcementBar: { + id: 'redux-dev-course', + content: ` + + Redux.dev - a new course by Mark Erikson + ui.dev - Learn more + + `, + backgroundColor: '#fafbfc', + textColor: '#091E42', + isCloseable: false, + }, navbar: { title: 'React Redux', logo: { diff --git a/website/src/pages/index.js b/website/src/pages/index.js index c129c9e2c..58ba87203 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -156,6 +156,14 @@ function Home() { )} +
+ + Redux.dev - a new course by Mark Erikson + ui.dev - Learn more + +
{otherLibraries && otherLibraries.length && (
diff --git a/website/static/css/custom.css b/website/static/css/custom.css index 5c7f107d7..e1e6e2f57 100644 --- a/website/static/css/custom.css +++ b/website/static/css/custom.css @@ -233,3 +233,15 @@ a:visited { fill: black; stroke: black; } + +/* course callout on home page */ +.course-callout.home-mid { + max-width: 900px; + margin: 1rem auto 2rem; +} + +div[class*='announcementBar_'] { + /* Intentionally override the theme behavior, + so that the course banner image is effectively cropped*/ + z-index: calc(var(--ifm-z-index-fixed) -1) !important; +} \ No newline at end of file diff --git a/website/static/img/course-callout-mid.svg b/website/static/img/course-callout-mid.svg new file mode 100644 index 000000000..9273e4d92 --- /dev/null +++ b/website/static/img/course-callout-mid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/static/img/course-callout-narrow.svg b/website/static/img/course-callout-narrow.svg new file mode 100644 index 000000000..4fe12ad40 --- /dev/null +++ b/website/static/img/course-callout-narrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/website/static/img/course-callout-wide.svg b/website/static/img/course-callout-wide.svg new file mode 100644 index 000000000..111ed9c15 --- /dev/null +++ b/website/static/img/course-callout-wide.svg @@ -0,0 +1 @@ + \ No newline at end of file From e5721acf0d232583f744fc00b155c5d23dae0e7a Mon Sep 17 00:00:00 2001 From: Mark Erikson Date: Wed, 6 Nov 2024 20:11:29 -0500 Subject: [PATCH 2/2] Remove busted code coverage check --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c0e369d3..e981153c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,9 +26,6 @@ jobs: - name: Run test suite run: yarn test - - name: Collect coverage - run: yarn coverage - - name: Build run: yarn build