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

Commit 41ac595

Browse files
author
Joel Worrall
committed
feat: revised global header
1 parent 77dc2c1 commit 41ac595

File tree

7 files changed

+552
-41
lines changed

7 files changed

+552
-41
lines changed

src/components/GlobalHeader.js

+14
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const GlobalHeader = ({ hasHeaderBg, className, editLink }) => {
2727
<a
2828
href="https://developer.newrelic.com/"
2929
className={styles.leftSideLink}
30+
target="_blank"
31+
rel="noopener noreferrer"
3032
>
3133
Developers
3234
</a>
@@ -40,10 +42,22 @@ const GlobalHeader = ({ hasHeaderBg, className, editLink }) => {
4042
<a
4143
href="https://docs.newrelic.com/"
4244
className={styles.leftSideLink}
45+
target="_blank"
46+
rel="noopener noreferrer"
4347
>
4448
Documentation
4549
</a>
4650
</li>
51+
<li className={styles.leftSideLinkItem}>
52+
<a
53+
href="https://discuss.newrelic.com/"
54+
className={styles.leftSideLink}
55+
target="_blank"
56+
rel="noopener noreferrer"
57+
>
58+
Community
59+
</a>
60+
</li>
4761
</ul>
4862
</div>
4963

src/components/__tests__/__snapshots__/Header.spec.js.snap

+65-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ Array [
2727
<a
2828
className="leftSideLink"
2929
href="https://developer.newrelic.com/"
30+
rel="noopener noreferrer"
31+
target="_blank"
3032
>
3133
Developers
3234
</a>
@@ -47,29 +49,89 @@ Array [
4749
<a
4850
className="leftSideLink"
4951
href="https://docs.newrelic.com/"
52+
rel="noopener noreferrer"
53+
target="_blank"
5054
>
5155
Documentation
5256
</a>
5357
</li>
58+
<li
59+
className="leftSideLinkItem"
60+
>
61+
<a
62+
className="leftSideLink"
63+
href="https://discuss.newrelic.com/"
64+
rel="noopener noreferrer"
65+
target="_blank"
66+
>
67+
Community
68+
</a>
69+
</li>
5470
</ul>
5571
</div>
5672
<ul
5773
className="rightSideButtons"
5874
>
5975
<li
60-
className="darkModeToggle"
61-
/>
76+
className="rightSideButton editPageButton"
77+
title="Edit this page"
78+
>
79+
<a
80+
className="editPageButtonLink"
81+
target="__blank"
82+
>
83+
<svg
84+
className="editIcon"
85+
fill="none"
86+
height={14}
87+
stroke="#000D0D"
88+
strokeLinecap="round"
89+
strokeLinejoin="round"
90+
strokeWidth="2"
91+
viewBox="0 0 24 24"
92+
width={14}
93+
xmlns="http://www.w3.org/2000/svg"
94+
>
95+
<path
96+
d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"
97+
/>
98+
<path
99+
d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"
100+
/>
101+
</svg>
102+
</a>
103+
</li>
62104
<li
63105
className="rightSideButton githubButton"
106+
title="View the GitHub repo for this website"
64107
>
65108
<a
66109
className="githubButtonLink"
67110
href="https://github.com/newrelic/opensource-website"
68111
target="__blank"
69112
>
70-
GitHub
113+
<svg
114+
className="githubIcon"
115+
fill="none"
116+
height={14}
117+
stroke="#000D0D"
118+
strokeLinecap="round"
119+
strokeLinejoin="round"
120+
strokeWidth="2"
121+
viewBox="0 0 24 24"
122+
width={14}
123+
xmlns="http://www.w3.org/2000/svg"
124+
>
125+
<path
126+
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
127+
/>
128+
</svg>
71129
</a>
72130
</li>
131+
<li
132+
className="styles.darkModeToggle rightSideButton"
133+
title="Toggle dark mode"
134+
/>
73135
</ul>
74136
</div>
75137
</div>,

src/pages/__tests__/__snapshots__/collection.spec.js.snap

+66-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ exports[`Data Collection Agents Page Renders correctly 1`] = `
2929
<a
3030
className="leftSideLink"
3131
href="https://developer.newrelic.com/"
32+
rel="noopener noreferrer"
33+
target="_blank"
3234
>
3335
Developers
3436
</a>
@@ -49,29 +51,89 @@ exports[`Data Collection Agents Page Renders correctly 1`] = `
4951
<a
5052
className="leftSideLink"
5153
href="https://docs.newrelic.com/"
54+
rel="noopener noreferrer"
55+
target="_blank"
5256
>
5357
Documentation
5458
</a>
5559
</li>
60+
<li
61+
className="leftSideLinkItem"
62+
>
63+
<a
64+
className="leftSideLink"
65+
href="https://discuss.newrelic.com/"
66+
rel="noopener noreferrer"
67+
target="_blank"
68+
>
69+
Community
70+
</a>
71+
</li>
5672
</ul>
5773
</div>
5874
<ul
5975
className="rightSideButtons"
6076
>
6177
<li
62-
className="darkModeToggle"
63-
/>
78+
className="rightSideButton editPageButton"
79+
title="Edit this page"
80+
>
81+
<a
82+
className="editPageButtonLink"
83+
target="__blank"
84+
>
85+
<svg
86+
className="editIcon"
87+
fill="none"
88+
height={14}
89+
stroke="#000D0D"
90+
strokeLinecap="round"
91+
strokeLinejoin="round"
92+
strokeWidth="2"
93+
viewBox="0 0 24 24"
94+
width={14}
95+
xmlns="http://www.w3.org/2000/svg"
96+
>
97+
<path
98+
d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"
99+
/>
100+
<path
101+
d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"
102+
/>
103+
</svg>
104+
</a>
105+
</li>
64106
<li
65107
className="rightSideButton githubButton"
108+
title="View the GitHub repo for this website"
66109
>
67110
<a
68111
className="githubButtonLink"
69112
href="https://github.com/newrelic/opensource-website"
70113
target="__blank"
71114
>
72-
GitHub
115+
<svg
116+
className="githubIcon"
117+
fill="none"
118+
height={14}
119+
stroke="#000D0D"
120+
strokeLinecap="round"
121+
strokeLinejoin="round"
122+
strokeWidth="2"
123+
viewBox="0 0 24 24"
124+
width={14}
125+
xmlns="http://www.w3.org/2000/svg"
126+
>
127+
<path
128+
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
129+
/>
130+
</svg>
73131
</a>
74132
</li>
133+
<li
134+
className="styles.darkModeToggle rightSideButton"
135+
title="Toggle dark mode"
136+
/>
75137
</ul>
76138
</div>
77139
</div>
@@ -289,7 +351,7 @@ exports[`Data Collection Agents Page Renders correctly 1`] = `
289351
className="version footerMeta"
290352
>
291353
Version
292-
1.0.18
354+
1.0.20
293355
</small>
294356
</div>
295357
</section>

src/pages/__tests__/__snapshots__/external-projects.spec.js.snap

+67-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ exports[`External Projects Page Renders correctly 1`] = `
2929
<a
3030
className="leftSideLink"
3131
href="https://developer.newrelic.com/"
32+
rel="noopener noreferrer"
33+
target="_blank"
3234
>
3335
Developers
3436
</a>
@@ -49,29 +51,90 @@ exports[`External Projects Page Renders correctly 1`] = `
4951
<a
5052
className="leftSideLink"
5153
href="https://docs.newrelic.com/"
54+
rel="noopener noreferrer"
55+
target="_blank"
5256
>
5357
Documentation
5458
</a>
5559
</li>
60+
<li
61+
className="leftSideLinkItem"
62+
>
63+
<a
64+
className="leftSideLink"
65+
href="https://discuss.newrelic.com/"
66+
rel="noopener noreferrer"
67+
target="_blank"
68+
>
69+
Community
70+
</a>
71+
</li>
5672
</ul>
5773
</div>
5874
<ul
5975
className="rightSideButtons"
6076
>
6177
<li
62-
className="darkModeToggle"
63-
/>
78+
className="rightSideButton editPageButton"
79+
title="Edit this page"
80+
>
81+
<a
82+
className="editPageButtonLink"
83+
href="https://github.com/newrelic/opensource-website/tree/develop/src/pages/code-of-conduct.mdx"
84+
target="__blank"
85+
>
86+
<svg
87+
className="editIcon"
88+
fill="none"
89+
height={14}
90+
stroke="#000D0D"
91+
strokeLinecap="round"
92+
strokeLinejoin="round"
93+
strokeWidth="2"
94+
viewBox="0 0 24 24"
95+
width={14}
96+
xmlns="http://www.w3.org/2000/svg"
97+
>
98+
<path
99+
d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"
100+
/>
101+
<path
102+
d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"
103+
/>
104+
</svg>
105+
</a>
106+
</li>
64107
<li
65108
className="rightSideButton githubButton"
109+
title="View the GitHub repo for this website"
66110
>
67111
<a
68112
className="githubButtonLink"
69113
href="https://github.com/newrelic/opensource-website"
70114
target="__blank"
71115
>
72-
GitHub
116+
<svg
117+
className="githubIcon"
118+
fill="none"
119+
height={14}
120+
stroke="#000D0D"
121+
strokeLinecap="round"
122+
strokeLinejoin="round"
123+
strokeWidth="2"
124+
viewBox="0 0 24 24"
125+
width={14}
126+
xmlns="http://www.w3.org/2000/svg"
127+
>
128+
<path
129+
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
130+
/>
131+
</svg>
73132
</a>
74133
</li>
134+
<li
135+
className="styles.darkModeToggle rightSideButton"
136+
title="Toggle dark mode"
137+
/>
75138
</ul>
76139
</div>
77140
</div>
@@ -254,7 +317,7 @@ exports[`External Projects Page Renders correctly 1`] = `
254317
className="version footerMeta"
255318
>
256319
Version
257-
1.0.18
320+
1.0.20
258321
</small>
259322
</div>
260323
</section>

0 commit comments

Comments
 (0)