Skip to content

Commit

Permalink
Merge pull request #2208 from reduxjs/docs/course-banners
Browse files Browse the repository at this point in the history
Add Redux.dev course banners
  • Loading branch information
markerikson authored Nov 7, 2024
2 parents 56dbf28 + e5721ac commit 560ac02
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
- name: Run test suite
run: yarn test

- name: Collect coverage
run: yarn coverage

- name: Build
run: yarn build

Expand Down
15 changes: 15 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ const siteConfig = {
theme: require('./static/scripts/monokaiTheme.js'),
},
image: 'img/redux-logo-landscape.png',
announcementBar: {
id: 'redux-dev-course',
content: `
<a href="https://redux.dev">
<img
src="/img/course-callout-wide.svg"
alt="Redux.dev - a new course by Mark Erikson + ui.dev - Learn more"
style="margin-top: 5px;"
/>
</a>
`,
backgroundColor: '#fafbfc',
textColor: '#091E42',
isCloseable: false,
},
navbar: {
title: 'React Redux',
logo: {
Expand Down
8 changes: 8 additions & 0 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ function Home() {
</div>
</section>
)}
<section className="course-callout home-mid">
<a href="https://redux.dev">
<img
src="/img/course-callout-mid.svg"
alt="Redux.dev - a new course by Mark Erikson + ui.dev - Learn more"
/>
</a>
</section>
{otherLibraries && otherLibraries.length && (
<section className={styles.features}>
<div className="container">
Expand Down
12 changes: 12 additions & 0 deletions website/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
1 change: 1 addition & 0 deletions website/static/img/course-callout-mid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions website/static/img/course-callout-narrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions website/static/img/course-callout-wide.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 560ac02

Please sign in to comment.