Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Redux.dev course banners #2208

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.