Skip to content

Commit 36de4ea

Browse files
committed
Add Redux.dev course banners
1 parent 56dbf28 commit 36de4ea

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

website/docusaurus.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,21 @@ const siteConfig = {
6767
theme: require('./static/scripts/monokaiTheme.js'),
6868
},
6969
image: 'img/redux-logo-landscape.png',
70+
announcementBar: {
71+
id: 'redux-dev-course',
72+
content: `
73+
<a href="https://redux.dev">
74+
<img
75+
src="/img/course-callout-wide.svg"
76+
alt="Redux.dev - a new course by Mark Erikson + ui.dev - Learn more"
77+
style="margin-top: 5px;"
78+
/>
79+
</a>
80+
`,
81+
backgroundColor: '#fafbfc',
82+
textColor: '#091E42',
83+
isCloseable: false,
84+
},
7085
navbar: {
7186
title: 'React Redux',
7287
logo: {

website/src/pages/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ function Home() {
156156
</div>
157157
</section>
158158
)}
159+
<section className="course-callout home-mid">
160+
<a href="https://redux.dev">
161+
<img
162+
src="/img/course-callout-mid.svg"
163+
alt="Redux.dev - a new course by Mark Erikson + ui.dev - Learn more"
164+
/>
165+
</a>
166+
</section>
159167
{otherLibraries && otherLibraries.length && (
160168
<section className={styles.features}>
161169
<div className="container">

website/static/css/custom.css

+12
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,15 @@ a:visited {
233233
fill: black;
234234
stroke: black;
235235
}
236+
237+
/* course callout on home page */
238+
.course-callout.home-mid {
239+
max-width: 900px;
240+
margin: 1rem auto 2rem;
241+
}
242+
243+
div[class*='announcementBar_'] {
244+
/* Intentionally override the theme behavior,
245+
so that the course banner image is effectively cropped*/
246+
z-index: calc(var(--ifm-z-index-fixed) -1) !important;
247+
}

website/static/img/course-callout-mid.svg

+1
Loading
Loading

website/static/img/course-callout-wide.svg

+1
Loading

0 commit comments

Comments
 (0)