Skip to content

Commit

Permalink
Links to Baseplate Cloud hosting (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldenning authored Dec 14, 2023
1 parent 3956519 commit 455f1c3
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
1 change: 1 addition & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ module.exports = {
{ href: 'https://opencollective.com/single-spa', label: 'Donate' },
{ href: 'https://github.com/single-spa/single-spa', label: 'GitHub' },
{ to: 'languages', label: '简Жहि Languages' },
{ to: "https://baseplate.cloud", label: "Deploy", position: "right" }
],
},
prismTheme: require('prism-react-renderer/themes/vsDark'),
Expand Down
4 changes: 2 additions & 2 deletions src/components/HomeSplash/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const HomeSplash = () => {

<Link
className="button"
to="https://single-spa-workshop.com">
Official Courses
to="https://baseplate.cloud">
Baseplate Hosting
</Link>

<Link
Expand Down
20 changes: 10 additions & 10 deletions src/theme/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ function Footer() {
const { siteConfig = {} } = context;
const { themeConfig = {} } = siteConfig;
const { footer } = themeConfig;
const [showWorkshopBanner, setShowWorkspaceBanner] = useState(() => typeof localStorage !== 'undefined' ? localStorage.getItem("hide-workshop-banner") !== "true" : false)
const [showBaseplateBanner, setShowBaseplateBanner] = useState(() => typeof localStorage !== 'undefined' ? localStorage.getItem("hide-baseplate-banner") !== "true" : false)

if (!footer) {
return null;
}

useEffect(() => {
if (showWorkshopBanner) {
localStorage.removeItem('hide-workshop-banner')
if (showBaseplateBanner) {
localStorage.removeItem('hide-baseplate-banner')
} else {
localStorage.setItem('hide-workshop-banner', true)
localStorage.setItem('hide-baseplate-banner', true)
}
}, [showWorkshopBanner])
}, [showBaseplateBanner])

const { copyright, links = [], logo } = footer;

Expand Down Expand Up @@ -108,17 +108,17 @@ function Footer() {
Originally developed at <a href='https://getcanopy.com'>Canopy</a>
</div>
{copyright && copyright}
{showWorkshopBanner &&
{showBaseplateBanner &&
<div className="footer__banner">
<div>
Learn microfrontends from the single-spa core team at single-spa-workshop.com!
Try Baseplate Cloud's official single-spa hosting!
</div>
<div className="footer__banner--actions">
<div role="button" tabIndex={0} onClick={() => setShowWorkspaceBanner(false)}>
<div role="button" tabIndex={0} onClick={() => setShowBaseplateBanner(false)}>
Dismiss
</div>
<a href="https://single-spa-workshop.com" target="_blank" rel="noopener">
View Courses
<a href="https://baseplate.cloud" target="_blank" rel="noopener">
Baseplate Hosting
</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ blockquote p:nth-child(2n) {
}

.footer__banner .footer__banner--actions a {
background-color: var(--single-spa-link-color) !important;
background-color: #2a467b !important;
color: white !important;
font-weight: bold;
font-size: 18px;
Expand Down
11 changes: 11 additions & 0 deletions versioned_sidebars/version-6.x-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@
}
]
},
{
"type": "category",
"label": "Hosting",
"items": [
{
"type": "link",
"label": "Baseplate Cloud hosting",
"href": "https://baseplate.cloud"
}
]
},
{
"type": "category",
"label": "CLI",
Expand Down

0 comments on commit 455f1c3

Please sign in to comment.