Skip to content

Commit

Permalink
Add Redux.dev course banners
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Nov 7, 2024
1 parent 56dbf28 commit 36de4ea
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
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 36de4ea

Please sign in to comment.