Skip to content

Commit 3c10f50

Browse files
feat: status page (#656)
* feat: status page * feat: open external navbar links in new tab from mobile sidebar
1 parent 28a2606 commit 3c10f50

File tree

4 files changed

+43
-17
lines changed

4 files changed

+43
-17
lines changed

src/pages/index.tsx

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,12 @@ const JupiterFooter = () => {
288288
href="https://discord.gg/jup"
289289
target="_blank"
290290
rel="noopener noreferrer"
291-
className="flex items-center justify-center w-8 h-8 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
291+
className="flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
292292
aria-label="Discord"
293293
>
294294
<svg
295-
width="16"
296-
height="16"
295+
width="24"
296+
height="24"
297297
viewBox="0 0 24 24"
298298
fill="currentColor"
299299
>
@@ -304,12 +304,12 @@ const JupiterFooter = () => {
304304
href="https://github.com/jup-ag"
305305
target="_blank"
306306
rel="noopener noreferrer"
307-
className="flex items-center justify-center w-8 h-8 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
307+
className="flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
308308
aria-label="GitHub"
309309
>
310310
<svg
311-
width="16"
312-
height="16"
311+
width="24"
312+
height="24"
313313
viewBox="0 0 24 24"
314314
fill="currentColor"
315315
>
@@ -320,12 +320,12 @@ const JupiterFooter = () => {
320320
href="https://t.me/jup_dev"
321321
target="_blank"
322322
rel="noopener noreferrer"
323-
className="flex items-center justify-center w-8 h-8 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
323+
className="flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
324324
aria-label="Telegram"
325325
>
326326
<svg
327-
width="16"
328-
height="16"
327+
width="24"
328+
height="24"
329329
viewBox="0 0 24 24"
330330
fill="currentColor"
331331
>
@@ -336,12 +336,12 @@ const JupiterFooter = () => {
336336
href="https://x.com/JupiterExchange"
337337
target="_blank"
338338
rel="noopener noreferrer"
339-
className="flex items-center justify-center w-8 h-8 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
339+
className="flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
340340
aria-label="X (Twitter)"
341341
>
342342
<svg
343-
width="16"
344-
height="16"
343+
width="24"
344+
height="24"
345345
viewBox="0 0 24 24"
346346
fill="currentColor"
347347
>
@@ -352,16 +352,32 @@ const JupiterFooter = () => {
352352
href="https://support.jup.ag/hc/en-us"
353353
target="_blank"
354354
rel="noopener noreferrer"
355-
className="flex items-center justify-center w-8 h-8 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
356-
aria-label="Guides"
355+
className="flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
356+
aria-label="Help Center"
357357
>
358358
<svg
359-
width="16"
360-
height="16"
359+
width="24"
360+
height="24"
361361
viewBox="0 0 24 24"
362362
fill="currentColor"
363363
>
364-
<path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z" />
364+
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" />
365+
</svg>
366+
</a>
367+
<a
368+
href="https://status.jup.ag"
369+
target="_blank"
370+
rel="noopener noreferrer"
371+
className="flex items-center justify-center w-10 h-10 rounded-full bg-gray-200 text-gray-700 hover:text-primary hover:bg-gray-300 transition-all transform hover:scale-110"
372+
aria-label="Status"
373+
>
374+
<svg
375+
width="24"
376+
height="24"
377+
viewBox="0 0 24 24"
378+
fill="currentColor"
379+
>
380+
<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z" />
365381
</svg>
366382
</a>
367383
</div>

src/theme/Navbar/MobileSidebar/PrimaryMenu/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export default function NavbarMobileSidebarPrimaryMenu(): JSX.Element {
2424
'menu__link',
2525
isNavItemActive(item) && 'menu__link--active'
2626
)}
27+
target={item.to?.startsWith('http') ? '_blank' : undefined}
2728
>
2829
{item.label}
2930
</a>
@@ -36,6 +37,7 @@ export default function NavbarMobileSidebarPrimaryMenu(): JSX.Element {
3637
isDropdownItemActive(subItem.to) && 'menu__link--active'
3738
)}
3839
href={subItem.to}
40+
target={subItem.to?.startsWith('http') ? '_blank' : undefined}
3941
>
4042
{subItem.label}
4143
</a>
@@ -54,6 +56,7 @@ export default function NavbarMobileSidebarPrimaryMenu(): JSX.Element {
5456
isNavItemActive(item) && 'menu__link--active'
5557
)}
5658
href={item.to}
59+
target={item.to?.startsWith('http') ? '_blank' : undefined}
5760
>
5861
{item.label}
5962
</a>

src/theme/Navbar/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export default function Navbar(): JSX.Element {
3535
<div className="navbar__link-wrapper">
3636
<a
3737
href={item.to}
38+
target={item.to?.startsWith('http') ? '_blank' : undefined}
3839
className={clsx(
3940
'navbar__link',
4041
isNavItemActive(item) && 'navbar__link--active'
@@ -53,6 +54,7 @@ export default function Navbar(): JSX.Element {
5354
isDropdownItemActive(subItem.to) && 'dropdown__link--active'
5455
)}
5556
href={subItem.to}
57+
target={subItem.to?.startsWith('http') ? '_blank' : undefined}
5658
>
5759
{subItem.label}
5860
</a>
@@ -73,6 +75,7 @@ export default function Navbar(): JSX.Element {
7375
isNavItemActive(item) && 'navbar__link--active'
7476
)}
7577
href={item.to}
78+
target={item.to?.startsWith('http') ? '_blank' : undefined}
7679
>
7780
{item.label}
7881
</a>

src/utils/navbarConfigs.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const navbarConfigs = {
1717
{ to: "/docs/routing/", label: "Routing Integration", position: "left" },
1818
{ to: "/docs/tool-kits/", label: "Tool Kits", position: "left" },
1919
{ to: "/docs/api", label: "API Reference", position: "left" },
20+
{ to: "https://status.jup.ag", label: "Status", position: "left" },
2021
{ to: "/docs/misc/", label: "Misc", position: "left" },
2122
],
2223
"/search": [
@@ -37,6 +38,7 @@ export const navbarConfigs = {
3738
{ to: "/docs/routing/", label: "Routing Integration", position: "left" },
3839
{ to: "/docs/tool-kits/", label: "Tool Kits", position: "left" },
3940
{ to: "/docs/api", label: "API Reference", position: "left" },
41+
{ to: "https://status.jup.ag", label: "Status", position: "left" },
4042
{ to: "/docs/misc/", label: "Misc", position: "left" },
4143
],
4244
"/": [
@@ -57,6 +59,7 @@ export const navbarConfigs = {
5759
{ to: "/docs/routing/", label: "Routing Integration", position: "left" },
5860
{ to: "/docs/tool-kits/", label: "Tool Kits", position: "left" },
5961
{ to: "/docs/api", label: "API Reference", position: "left" },
62+
{ to: "https://status.jup.ag", label: "Status", position: "left" },
6063
{ to: "/docs/misc/", label: "Misc", position: "left" },
6164
],
6265
"/ecosystem": [
@@ -77,6 +80,7 @@ export const navbarConfigs = {
7780
{ to: "/docs/routing/", label: "Routing Integration", position: "left" },
7881
{ to: "/docs/tool-kits/", label: "Tool Kits", position: "left" },
7982
{ to: "/docs/api", label: "API Reference", position: "left" },
83+
{ to: "https://status.jup.ag", label: "Status", position: "left" },
8084
{ to: "/docs/misc/", label: "Misc", position: "left" },
8185
],
8286
};

0 commit comments

Comments
 (0)