Skip to content

Commit 489c16b

Browse files
Add Linux Foundation trademark statement in footer (#239)
* add linux foundation trademark statement in footer Signed-off-by: Michael Valdron <[email protected]> * add cncf project section to landing page Signed-off-by: Michael Valdron <[email protected]> * revise LF trademark/policy footer notice to recent changes cncf/foundation@a5be632 Signed-off-by: Michael Valdron <[email protected]> * fix linting issues Signed-off-by: Michael Valdron <[email protected]> * fix formatting issues Signed-off-by: Michael Valdron <[email protected]> * define url entity type for passing in link data props Signed-off-by: Michael Valdron <[email protected]> --------- Signed-off-by: Michael Valdron <[email protected]>
1 parent 18ca493 commit 489c16b

File tree

10 files changed

+452
-4
lines changed

10 files changed

+452
-4
lines changed

apps/landing-page/pages/_app.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ function collectHeadings(
8383

8484
const websiteName = 'Devfile.io';
8585
const websiteDescription = 'An open standard defining containerized development environments.';
86+
const lfTrademarkUsageUrl = 'https://lfprojects.org/policies/';
8687

8788
function LandingPage({ Component, pageProps }: AppProps): JSX.Element {
8889
const { markdoc } = pageProps as MarkdocNextJsPageProps;
@@ -114,7 +115,14 @@ function LandingPage({ Component, pageProps }: AppProps): JSX.Element {
114115
<Component {...pageProps} />
115116
</LandingPageLayout>
116117
</div>
117-
<Footer websiteName={websiteName} websiteDescription={websiteDescription} />
118+
<Footer
119+
websiteName={websiteName}
120+
websiteDescription={websiteDescription}
121+
lfTrademarkUsageLink={{
122+
href: lfTrademarkUsageUrl,
123+
text: lfTrademarkUsageUrl.replace(/http:\/\/|https:\/\//g, ''),
124+
}}
125+
/>
118126
</div>
119127
</NavigationProvider>
120128
</LinksProvider>

apps/landing-page/pages/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,20 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { Hero, KeyFeaturesSection, ValuePropositionSection } from '@devfile-web/core';
17+
import {
18+
CncfProjectSection,
19+
Hero,
20+
KeyFeaturesSection,
21+
ValuePropositionSection,
22+
} from '@devfile-web/core';
1823

1924
export function Index(): JSX.Element {
2025
return (
2126
<>
2227
<Hero />
2328
<ValuePropositionSection />
2429
<KeyFeaturesSection />
30+
<CncfProjectSection />
2531
</>
2632
);
2733
}

apps/registry-viewer/pages/_app.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const analyticsConfig = {
2727
};
2828

2929
const websiteName = 'Devfile Registry';
30+
const lfTrademarkUsageUrl = 'https://lfprojects.org/policies/';
3031

3132
function CustomApp({ Component, pageProps }: AppProps): JSX.Element {
3233
return (
@@ -38,7 +39,13 @@ function CustomApp({ Component, pageProps }: AppProps): JSX.Element {
3839
<Header websiteName={websiteName} />
3940
<Component {...pageProps} />
4041
</div>
41-
<Footer websiteName={websiteName} />
42+
<Footer
43+
websiteName={websiteName}
44+
lfTrademarkUsageLink={{
45+
href: lfTrademarkUsageUrl,
46+
text: lfTrademarkUsageUrl.replace(/http:\/\/|https:\/\//g, ''),
47+
}}
48+
/>
4249
</div>
4350
</LinksProvider>
4451
</AnalyticsProvider>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* Copyright Red Hat
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
import { CncfIcon } from '../../icons';
18+
19+
export function CncfProjectSection(): JSX.Element {
20+
return (
21+
<div className="relative -z-10 bg-slate-50 py-16 dark:bg-slate-900 sm:py-24 lg:py-32">
22+
<div className="mx-auto max-w-md px-4 text-center sm:max-w-3xl sm:px-6 lg:max-w-7xl lg:px-8">
23+
<CncfIcon id="cncf-logo" className="mx-auto max-w-prose text-slate-500" />
24+
<p className="mx-auto mt-5 max-w-prose text-xl text-slate-500 dark:text-slate-400">
25+
We are a Cloud Native Computing Foundation sandbox project.
26+
</p>
27+
</div>
28+
</div>
29+
);
30+
}
31+
32+
export default CncfProjectSection;

libs/core/src/components/footer/footer.tsx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,16 @@
1717
import Link from 'next/link';
1818
import { DevfileIcon } from '../../icons';
1919
import { useLinks } from '../../hooks';
20+
import { LinkProp } from '../../types/props';
2021

2122
export interface FooterProps {
2223
websiteName: string;
2324
websiteDescription?: string;
25+
lfTrademarkUsageLink?: LinkProp;
2426
}
2527

2628
export function Footer(props: FooterProps): JSX.Element {
27-
const { websiteName, websiteDescription } = props;
29+
const { websiteName, websiteDescription, lfTrademarkUsageLink } = props;
2830

2931
const { footerNavigation } = useLinks();
3032

@@ -48,6 +50,22 @@ export function Footer(props: FooterProps): JSX.Element {
4850
{websiteDescription && (
4951
<p className="text-base text-slate-500 dark:text-slate-400">{websiteDescription}</p>
5052
)}
53+
{lfTrademarkUsageLink && (
54+
<p className="text-base text-slate-500 dark:text-slate-400">
55+
Copyright © Devfile a Series of LF Projects, LLC
56+
<br />
57+
For website terms of use, trademark policy and other project policies please
58+
see&nbsp;
59+
<Link
60+
href={lfTrademarkUsageLink.href}
61+
className="text-base text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300"
62+
target="_blank"
63+
>
64+
{lfTrademarkUsageLink.text}
65+
</Link>
66+
.
67+
</p>
68+
)}
5169
<div className="flex space-x-6">
5270
{footerNavigation.social.map((item) => (
5371
<Link key={item.name} href={item.href} passHref>

libs/core/src/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ export * from './devfile-datalist/devfile-datalist';
4747
export * from './devfile-codeblock/devfile-codeblock';
4848
export * from './custom-404/custom-404';
4949
export * from './video/video';
50+
export * from './cncf-project-section/cncf-project-section';

0 commit comments

Comments
 (0)