Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 09ddbad

Browse files
authored
Added Trademark Policy Page (#1298)
* Added Trademark Policy Page
1 parent b8abe4e commit 09ddbad

18 files changed

Lines changed: 511 additions & 17 deletions

File tree

content/about/trademark.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Trademark Policy
3+
description: "Trademark Policy | Node.js"
4+
authors: fhemberger, XhmikosR, mikeal, brianwarner, bf4
5+
category: trademark
6+
---
7+
8+
The Node.js trademarks, service marks, and graphics marks are symbols of the
9+
quality, performance, and ease of use that people have come to associate with
10+
the Node.js software and project. To ensure that the Node.js marks continue to
11+
symbolize these qualities, we must ensure that the marks are only used in ways
12+
that do not mislead people or cause them to confuse Node.js with other software
13+
of lower quality. If we don’t ensure the marks are used in this way, it cannot
14+
only confuse users, it can make it impossible to use the mark to protect
15+
against people who maliciously exploit the mark in the future. The primary goal
16+
of this policy is to make sure that this doesn’t happen to the Node.js mark, so
17+
that the community and users of Node.js are always protected in the future.
18+
19+
At the same time, we’d like community members to feel comfortable spreading the
20+
word about Node.js and participating in the Node.js community. Keeping that
21+
goal in mind, we’ve tried to make the policy as flexible and easy to understand
22+
as legally possible.
23+
24+
The OpenJS Foundation has a perpetual license to use the
25+
[Node.js marks](https://ip-policy.openjsf.org).
26+
For more details on using the Node.js mark, please read the
27+
[full policy](https://trademark-policy.openjsf.org).
28+
If you have any questions don't hesitate to
29+
[email us](mailto:trademark@openjsf.org).
30+
31+
Guidelines for the visual display of the Node.js mark are described in
32+
the [Visual Guidelines](/static/documents/foundation-visual-guidelines.pdf).

gatsby-config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ module.exports = {
6969
path: `${__dirname}/src/data`,
7070
},
7171
},
72+
{
73+
resolve: 'gatsby-source-filesystem',
74+
options: {
75+
name: 'data',
76+
path: `${__dirname}/content/about`,
77+
},
78+
},
7279
{
7380
resolve: `gatsby-plugin-mdx`,
7481
options: {

gatsby-node.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ exports.createPages = ({ graphql, actions }) => {
1717
{
1818
allMarkdownRemark(
1919
filter: {
20-
fields: { slug: { nin: ["", "nodejs-community", "homepage"] } }
20+
fields: {
21+
slug: {
22+
nin: [
23+
""
24+
"nodejs-community"
25+
"homepage"
26+
"trademark-policy"
27+
]
28+
}
29+
}
2130
}
2231
sort: { fields: [fileAbsolutePath], order: ASC }
2332
) {

src/components/Footer/__tests__/__snapshots__/footer.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exports[`Tests for Footer component renders correctly 1`] = `
1818
<li>
1919
<a
2020
class="footer__link"
21-
href="https://nodejs.org/en/about/trademark/"
21+
href="/trademark"
2222
>
2323
Trademark Policy
2424
</a>

src/components/Footer/index.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import { Link } from 'gatsby';
23
import RandomContributor from '../RandomContributor';
34
import './footer.scss';
45

@@ -17,12 +18,9 @@ function Footer(): JSX.Element {
1718
<footer className="footer">
1819
<ul className="footer__left">
1920
<li>
20-
<a
21-
className="footer__link"
22-
href="https://nodejs.org/en/about/trademark/"
23-
>
21+
<Link className="footer__link" to="/trademark">
2422
Trademark Policy
25-
</a>
23+
</Link>
2624
</li>
2725
<li>
2826
<a

src/components/Layout/__tests__/__snapshots__/centered-layout.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ exports[`CenteredLayout component renders correctly with footer 1`] = `
159159
<li>
160160
<a
161161
class="footer__link"
162-
href="https://nodejs.org/en/about/trademark/"
162+
href="/trademark"
163163
>
164164
Trademark Policy
165165
</a>

src/components/Layout/__tests__/__snapshots__/page-layout.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ exports[`PageLayout component renders correctly with data 1`] = `
232232
<li>
233233
<a
234234
class="footer__link"
235-
href="https://nodejs.org/en/about/trademark/"
235+
href="/trademark"
236236
>
237237
Trademark Policy
238238
</a>

src/pages/trademark.tsx

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React from 'react';
2+
import { graphql } from 'gatsby';
3+
import { Page } from '../types';
4+
import Layout from '../components/Layout';
5+
import Article from '../components/Article';
6+
import Footer from '../components/Footer';
7+
import '../styles/article-reader.scss';
8+
9+
export default function TrademarkPage({ data }: Page): JSX.Element {
10+
const { title, description } = data.page.frontmatter;
11+
const { html, tableOfContents } = data.page;
12+
const { authors } = data.page.fields;
13+
return (
14+
<>
15+
<Layout title={title} description={description} showFooter={false}>
16+
<main className="centered-container">
17+
<Article
18+
title={title}
19+
html={html}
20+
tableOfContents={tableOfContents}
21+
authors={authors}
22+
editPath="content/about/trademark.md"
23+
/>
24+
</main>
25+
</Layout>
26+
<Footer />
27+
</>
28+
);
29+
}
30+
31+
export const query = graphql`
32+
query {
33+
page: markdownRemark(fields: { slug: { eq: "trademark-policy" } }) {
34+
html
35+
tableOfContents(absolute: false, pathToSlugField: "frontmatter.path")
36+
frontmatter {
37+
title
38+
description
39+
}
40+
fields {
41+
authors
42+
}
43+
}
44+
}
45+
`;

src/styles/layout.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,3 +525,8 @@ details {
525525
display: flex;
526526
justify-content: center;
527527
}
528+
529+
.centered-container {
530+
display: flex;
531+
justify-content: center;
532+
}

test/__fixtures__/page.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
BlogPostsList,
77
BlogPageData,
88
BlogPageContext,
9+
Page,
910
} from '../../src/types';
1011

1112
import { ReleaseData } from '../../src/hooks/useReleaseHistory';
@@ -174,3 +175,19 @@ export const createBlogPageData = (): BlogPageData => ({
174175
],
175176
},
176177
});
178+
179+
export const createTrademarkData = (): Page => ({
180+
data: {
181+
page: {
182+
fields: {
183+
authors: ['palak'],
184+
},
185+
frontmatter: {
186+
description: 'Mock Description',
187+
title: 'Mock Title',
188+
},
189+
html: '<div>Sample</div>',
190+
tableOfContents: 'Table of Content',
191+
},
192+
},
193+
});

0 commit comments

Comments
 (0)