Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 635271f

Browse files
bdougieclaudenetlify[bot]netlify-coding[bot]
authored
Add Linux Foundation announcement banner and update redirects (#449)
* Add Linux Foundation announcement banner and update redirects - Created reusable AnnouncementBanner component with dismissible functionality - Added banner to PageLayout announcing OpenSauced joining Linux Foundation - Updated intro.opensauced.pizza redirect to point to learn.osscommunities.com - Banner features orange gradient, responsive design, and external link support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add .nvmrc to fix Netlify build Specify Node.js 18 to resolve compatibility with @netlify/plugin-lighthouse which requires <20 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Netlify Deploy Error: Node.js Version Mismatch with Plugin Requirements (68f1741d0dd5900a0b55bbb4) * Netlify Deploy Error: Node.js Version Mismatch with Plugin Requirements (68f1741d0dd5900a0b55bbb4) (#450) Co-authored-by: netlify[bot] <[email protected]> * Update netlify.toml with Node version for all contexts Set NODE_VERSION to 18 for production, deploy-preview, and branch-deploy contexts to ensure compatibility with @netlify/plugin-lighthouse 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove @netlify/plugin-lighthouse from build Remove plugin to resolve Node.js version compatibility issue. The plugin requires Node <20 but causes conflicts with other dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Update Node.js version to 22 Update to Node.js 22 now that @netlify/plugin-lighthouse has been removed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Trigger Netlify rebuild after plugin removal 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: netlify[bot] <[email protected]> Co-authored-by: netlify-coding[bot] <224816602+netlify-coding[bot]@users.noreply.github.com>
1 parent a20a47a commit 635271f

File tree

6 files changed

+89
-3
lines changed

6 files changed

+89
-3
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import React, { FC, ReactElement, useState } from 'react';
2+
3+
interface AnnouncementBannerProps {
4+
message: string;
5+
linkUrl: string;
6+
linkText: string;
7+
}
8+
9+
const AnnouncementBanner: FC<AnnouncementBannerProps> = ({
10+
message,
11+
linkUrl,
12+
linkText
13+
}): ReactElement | null => {
14+
const [isVisible, setIsVisible] = useState(true);
15+
16+
if (!isVisible) {
17+
return null;
18+
}
19+
20+
return (
21+
<div className="relative bg-gradient-to-r from-orange-600 to-orange-500 text-white py-3 px-4 text-center">
22+
<div className="max-w-7xl mx-auto flex items-center justify-center gap-2 flex-wrap pr-8">
23+
<span className="text-sm font-medium">{message}</span>
24+
<a
25+
href={linkUrl}
26+
target="_blank"
27+
rel="noopener noreferrer"
28+
className="text-sm font-semibold underline hover:no-underline"
29+
>
30+
{linkText}
31+
</a>
32+
</div>
33+
<button
34+
onClick={() => setIsVisible(false)}
35+
className="absolute right-4 top-1/2 transform -translate-y-1/2 text-white hover:text-gray-200 transition-colors"
36+
aria-label="Close announcement"
37+
>
38+
<svg
39+
className="w-5 h-5"
40+
fill="none"
41+
strokeLinecap="round"
42+
strokeLinejoin="round"
43+
strokeWidth="2"
44+
viewBox="0 0 24 24"
45+
stroke="currentColor"
46+
>
47+
<path d="M6 18L18 6M6 6l12 12"></path>
48+
</svg>
49+
</button>
50+
</div>
51+
);
52+
};
53+
54+
export default AnnouncementBanner;

components/common/layout/PageLayout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Footer from '../../sections/Footer'
77
import Subscribe from '../../sections/Subscribe'
88
import OgData from './SEO/SEO'
99
import PHBadge from '../product-hunt/PHBadge'
10+
import AnnouncementBanner from '../AnnouncementBanner'
1011

1112
interface BackgroundWrapperProps {
1213
children: React.ReactNode
@@ -42,13 +43,18 @@ const PageLayout: FC<PageLayoutProps> = ({
4243
noindex={false}
4344
/>
4445
)}
46+
<AnnouncementBanner
47+
message="OpenSauced has joined the Linux Foundation"
48+
linkUrl="https://opensauced.pizza/blog/opensauced-is-joining-the-linux-foundation"
49+
linkText="Read more"
50+
/>
4551
<BackgroundWrapper>
4652
{Array.isArray(children) && !children[1]?.props.totalLaunchesCount && (
4753
<PHBadge />
4854
)}
4955
{!pressPage && <Header navigationItems={navigationURLs} />}
5056
<div>{children}</div>
51-
57+
5258
<Footer pressPage={pressPage} />
5359
</BackgroundWrapper>
5460
</div>

netlify.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[build]
2+
command = "npm run build"
3+
4+
[build.environment]
5+
NODE_VERSION = "22"
6+
7+
[context.production.environment]
8+
NODE_VERSION = "22"
9+
10+
[context.deploy-preview.environment]
11+
NODE_VERSION = "22"
12+
13+
[context.branch-deploy.environment]
14+
NODE_VERSION = "22"
15+
16+
# Explicitly define plugins to override UI configuration
17+
# This prevents the @netlify/plugin-lighthouse from running
18+
[[plugins]]
19+
package = "@netlify/plugin-nextjs"
20+
21+
[[plugins]]
22+
package = "netlify-plugin-cloudinary"
23+
24+
[[plugins]]
25+
package = "@netlify/plugin-emails"

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

public/_redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://intro.opensauced.pizza/* https://opensauced.pizza/learn/:splat 308!
1+
https://intro.opensauced.pizza/* https://learn.osscommunities.com/:splat 308!

0 commit comments

Comments
 (0)