Skip to content

Commit 3a6b5f6

Browse files
committed
Add Powered by Vercel badge
1 parent 2792d75 commit 3a6b5f6

3 files changed

Lines changed: 38 additions & 3 deletions

File tree

src/components/Vercel.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export function Vercel(props) {
2+
return (
3+
<svg viewBox="0 0 283 64" {...props}>
4+
<path
5+
fill="black"
6+
d="M141.04 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.46 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM248.72 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.45 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM200.24 34c0 6 3.92 10 10 10 4.12 0 7.21-1.87 8.8-4.92l7.68 4.43c-3.18 5.3-9.14 8.49-16.48 8.49-11.05 0-19-7.2-19-18s7.96-18 19-18c7.34 0 13.29 3.19 16.48 8.49l-7.68 4.43c-1.59-3.05-4.68-4.92-8.8-4.92-6.07 0-10 4-10 10zm82.48-29v46h-9V5h9zM36.95 0L73.9 64H0L36.95 0zm92.38 5l-27.71 48L73.91 5H84.3l17.32 30 17.32-30h10.39zm58.91 12v9.69c-1-.29-2.06-.49-3.2-.49-5.81 0-10 4-10 10V51h-9V17h9v9.2c0-5.08 5.91-9.2 13.2-9.2z"
7+
/>
8+
</svg>
9+
)
10+
}

src/components/home/Footer.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import Link from 'next/link'
1+
import { Logo } from '@/components/Logo'
2+
import { Vercel } from '@/components/Vercel'
23
import { documentationNav } from '@/navs/documentation'
34
import { programsNav } from '@/navs/program'
45
import clsx from 'clsx'
6+
import Link from 'next/link'
57
import styles from './Footer.module.css'
6-
import { Logo } from '@/components/Logo'
78

89
const footerNav = {
910
'Getting started': {
@@ -70,6 +71,15 @@ export function Footer() {
7071
</ul>
7172
<div className="pt-10 sm:pt-12">
7273
<Logo className="w-auto h-10" />
74+
<br className="mb-2" />
75+
<div className="flex">
76+
<a href="https://vercel.com/?utm_source=javaistic&utm_campaign=oss">
77+
<p className="text text-sm text-gray-500 flex">
78+
Powered by
79+
<Vercel className="w-auto h-5 ml-1 flex" />
80+
</p>
81+
</a>
82+
</div>
7383
</div>
7484
</div>
7585
</footer>

src/layouts/ContentsLayout.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ import { SidebarContext, SidebarLayout } from '@/layouts/SidebarLayout'
55
import clsx from 'clsx'
66
import Link from 'next/link'
77
import { useRouter } from 'next/router'
8-
import { createContext, Fragment, isValidElement, useCallback, useContext, useEffect, useState } from 'react'
8+
import {
9+
createContext,
10+
Fragment,
11+
isValidElement,
12+
useCallback,
13+
useContext,
14+
useEffect,
15+
useState,
16+
} from 'react'
917

1018
export const ContentsContext = createContext()
1119

@@ -210,6 +218,13 @@ export function ContentsLayout({ children, meta, classes, tableOfContents }) {
210218
<a className="mt-10 text-sm hover:text-gray-900">Edit this page on GitHub</a>
211219
</Link>
212220
</div>
221+
<Link
222+
href={`https://vercel.com/?utm_source=javaistic&utm_campaign=oss`}
223+
>
224+
<a className="text-sm mr-1">
225+
Powered by <span className="text text-base font-bold text-black">▲Vercel</span>
226+
</a>
227+
</Link>
213228
</div>
214229
<div className="hidden xl:text-sm xl:block flex-none w-64 pl-8 mr-8">
215230
<div className="flex flex-col justify-between overflow-y-auto sticky max-h-(screen-18) pt-10 pb-6 top-18">

0 commit comments

Comments
 (0)