Skip to content

Commit 4819150

Browse files
author
Arghya Ghosh
authored
Merge pull request #137 from javaistic/dev
Update site
2 parents 88dd795 + af17517 commit 4819150

File tree

10 files changed

+175
-86
lines changed

10 files changed

+175
-86
lines changed

redirects.json

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,47 @@
11
[
2-
{ "source": "/docs/what-is-javaistic", "destination": "/", "permanent": false },
2+
{
3+
"source": "/blog",
4+
"destination": "https://blog-javaistic.vercel.app/",
5+
"permanent": false
6+
},
7+
{
8+
"source": "/changelog",
9+
"destination": "https://changelog-javaistic.vercel.app/",
10+
"permanent": false
11+
},
12+
{
13+
"source": "/community",
14+
"destination": "https://discord.gg/RkHJqvK9r8",
15+
"permanent": false
16+
},
17+
{
18+
"source": "/discord",
19+
"destination": "https://discord.gg/RkHJqvK9r8",
20+
"permanent": false
21+
},
22+
{
23+
"source": "/docs/what-is-javaistic",
24+
"destination": "/",
25+
"permanent": false
26+
},
327
{
428
"source": "/forum",
529
"destination": "https://github.com/javaistic/javaistic/discussions",
630
"permanent": false
731
},
8-
{ "source": "/community", "destination": "https://discord.gg/RkHJqvK9r8", "permanent": false },
9-
{ "source": "/changelog", "destination": "https://javaistic-changelog.vercel.app/", "permanent": false },
10-
{ "source": "/license", "destination": "https://raw.githubusercontent.com/javaistic/javaistic/main/LICENSE", "permanent": false },
11-
{ "source": "/discord", "destination": "https://discord.gg/RkHJqvK9r8", "permanent": false },
12-
{ "source": "/status", "destination": "https://javaistic.betteruptime.com/", "permanent": false },
13-
{ "source": "/stats", "destination": "https://javaistic.betteruptime.com/", "permanent": false }
14-
]
32+
{
33+
"source": "/license",
34+
"destination": "https://raw.githubusercontent.com/javaistic/javaistic/main/LICENSE",
35+
"permanent": false
36+
},
37+
{
38+
"source": "/stats",
39+
"destination": "https://javaistic.betteruptime.com/",
40+
"permanent": false
41+
},
42+
{
43+
"source": "/status",
44+
"destination": "https://javaistic.betteruptime.com/",
45+
"permanent": false
46+
}
47+
]

src/components/Header.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { Search } from '@/components/Search'
33
import clsx from 'clsx'
44
import Link from 'next/link'
55
import Router from 'next/router'
6-
import ThemeChanger from './ThemeChanger'
76
import MenuButton from './home/Menu'
7+
import ThemeChanger from './ThemeChanger'
88

99
export function Header({ navIsOpen, onNavToggle }) {
1010
return (
@@ -29,7 +29,6 @@ export function Header({ navIsOpen, onNavToggle }) {
2929
<div className="flex flex-shrink-0 items-center justify-end space-x-4 pl-6 sm:space-x-6 lg:w-64">
3030
<ThemeChanger />
3131
<MenuButton />
32-
3332
<a
3433
href="https://github.com/javaistic/javaistic"
3534
className="text-gray-400 transition-colors duration-200 hover:text-gray-600 dark:hover:text-gray-200"

src/components/Logo.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,22 @@ export function Logo(props) {
1616
</svg>
1717
)
1818
}
19+
20+
export function LogoMark(props) {
21+
return (
22+
<svg viewBox="0 0 47 52" {...props}>
23+
<path
24+
fillRule="evenodd"
25+
clipRule="evenodd"
26+
d="M25.948.72l17.89 10.317a5.37 5.37 0 012.684 4.641v20.637a5.357 5.357 0 01-2.683 4.648L25.948 51.28a5.379 5.379 0 01-5.373 0L2.683 40.962A5.37 5.37 0 010 36.316V15.678a5.36 5.36 0 012.683-4.64L20.575.718a5.378 5.378 0 015.373 0zm8.36 15.56l-8.75-5.038a5.378 5.378 0 00-5.36 0l-8.75 5.037a5.37 5.37 0 00-2.69 4.648V30.98a5.356 5.356 0 002.69 4.648l8.75 5.037a5.38 5.38 0 005.36 0l8.75-5.037a5.367 5.367 0 002.69-4.648V20.927a5.37 5.37 0 00-2.69-4.648z"
27+
fill="#3884FF"
28+
/>
29+
<path
30+
fillRule="evenodd"
31+
clipRule="evenodd"
32+
d="M23.027 32.926c3.79 0 6.864-3.063 6.864-6.842 0-3.779-3.073-6.842-6.864-6.842-3.79 0-6.863 3.063-6.863 6.842 0 3.779 3.073 6.842 6.863 6.842z"
33+
fill="#000"
34+
/>
35+
</svg>
36+
)
37+
}

src/components/LogoMark.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/components/Logos.js

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
export function GitHub(props) {
2+
return (
3+
<svg
4+
strokeLinecap="round"
5+
strokeLinejoin="round"
6+
strokeWidth="2"
7+
viewBox="0 0 35 35"
8+
{...props}
9+
>
10+
<path
11+
fill="currentColor"
12+
d="M16.3 0C7.3 0 0 7.3 0 16.3c0 7.2 4.7 13.3 11.1 15.5.8.1 1.1-.4 1.1-.8v-2.8c-4.5 1-5.5-2.2-5.5-2.2-.7-1.9-1.8-2.4-1.8-2.4-1.5-1 .1-1 .1-1 1.6.1 2.5 1.7 2.5 1.7 1.5 2.5 3.8 1.8 4.7 1.4.1-1.1.6-1.8 1-2.2-3.6-.4-7.4-1.8-7.4-8.1 0-1.8.6-3.2 1.7-4.4-.1-.3-.7-2 .2-4.2 0 0 1.4-.4 4.5 1.7 1.3-.4 2.7-.5 4.1-.5 1.4 0 2.8.2 4.1.5 3.1-2.1 4.5-1.7 4.5-1.7.9 2.2.3 3.9.2 4.3 1 1.1 1.7 2.6 1.7 4.4 0 6.3-3.8 7.6-7.4 8 .6.5 1.1 1.5 1.1 3V31c0 .4.3.9 1.1.8 6.5-2.2 11.1-8.3 11.1-15.5C32.6 7.3 25.3 0 16.3 0z"
13+
/>
14+
</svg>
15+
)
16+
}
17+
18+
export function Twitter(props) {
19+
return (
20+
<svg
21+
strokeLinecap="round"
22+
strokeLinejoin="round"
23+
strokeWidth="2"
24+
viewBox="0 0 24 24"
25+
{...props}
26+
>
27+
<path
28+
fill="currentColor"
29+
d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"
30+
></path>
31+
</svg>
32+
)
33+
}
34+
35+
export function Vercel(props) {
36+
return (
37+
<svg viewBox="0 0 283 64" {...props}>
38+
<path
39+
fill="currentColor"
40+
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"
41+
/>
42+
</svg>
43+
)
44+
}
45+
46+
export function IndianFlag(props) {
47+
return (
48+
<svg viewBox="0 0 32 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
49+
<mask
50+
id="mask0_270_67489"
51+
style={{ maskType: 'alpha' }}
52+
maskUnits="userSpaceOnUse"
53+
x="0"
54+
y="0"
55+
width="32"
56+
height="24"
57+
>
58+
<rect width="32" height="24" fill="white" />
59+
</mask>
60+
<g mask="url(#mask0_270_67489)">
61+
<path fillRule="evenodd" clipRule="evenodd" d="M0 0V24H32V0H0Z" fill="#F7FCFF" />
62+
<mask
63+
id="mask1_270_67489"
64+
style={{ maskType: 'alpha' }}
65+
maskUnits="userSpaceOnUse"
66+
x="0"
67+
y="0"
68+
width="32"
69+
height="24"
70+
>
71+
<path fillRule="evenodd" clipRule="evenodd" d="M0 0V24H32V0H0Z" fill="white" />
72+
</mask>
73+
<g mask="url(#mask1_270_67489)">
74+
<path fillRule="evenodd" clipRule="evenodd" d="M0 0V8H32V0H0Z" fill="#FF8C1A" />
75+
<path fillRule="evenodd" clipRule="evenodd" d="M0 16V24H32V16H0Z" fill="#5EAA22" />
76+
<path
77+
fillRule="evenodd"
78+
clipRule="evenodd"
79+
d="M12 12C12 14.2091 13.7909 16 16 16C18.2091 16 20 14.2091 20 12C20 9.79086 18.2091 8 16 8C13.7909 8 12 9.79086 12 12ZM19 12C19 13.6569 17.6569 15 16 15C14.3431 15 13 13.6569 13 12C13 10.3431 14.3431 9 16 9C17.6569 9 19 10.3431 19 12Z"
80+
fill="#3D58DB"
81+
/>
82+
<path
83+
fillRule="evenodd"
84+
clipRule="evenodd"
85+
d="M15.9945 12.8607L15.4237 15.9813L15.7551 12.8263L14.3283 15.6596L15.5351 12.7258L13.3678 15.0424L15.3524 12.5675L12.6202 14.1796L15.2216 12.364L12.1459 13.1411L15.1535 12.132L11.9835 12.011L15.1535 11.8901L12.1459 10.881L15.2216 11.6581L12.6202 9.84251L15.3524 11.4546L13.3678 8.9797L15.5351 11.2963L14.3283 8.36247L15.7551 11.1958L15.4237 8.04083L15.9945 11.1614L16.5653 8.04083L16.2339 11.1958L17.6608 8.36247L16.4539 11.2963L18.6212 8.9797L16.6366 11.4546L19.3688 9.84251L16.7674 11.6581L19.8431 10.881L16.8355 11.8901L20.0056 12.011L16.8355 12.132L19.8431 13.1411L16.7674 12.364L19.3688 14.1796L16.6366 12.5675L18.6212 15.0424L16.4539 12.7258L17.6608 15.6596L16.2339 12.8263L16.5653 15.9813L15.9945 12.8607Z"
86+
fill="#3D58DB"
87+
/>
88+
</g>
89+
</g>
90+
</svg>
91+
)
92+
}

src/components/Vercel.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/components/home/Footer.js

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,11 @@
11
import { Logo } from '@/components/Logo'
2-
import { Vercel } from '@/components/Vercel'
2+
import { GitHub, Twitter, Vercel } from '@/components/Logos'
33
import { documentationNav } from '@/navs/documentation'
44
import { programsNav } from '@/navs/program'
55
import clsx from 'clsx'
66
import Link from 'next/link'
77
import styles from './Footer.module.css'
88

9-
const GitHub = () => (
10-
<svg
11-
fill="currentColor"
12-
strokeLinecap="round"
13-
strokeLinejoin="round"
14-
strokeWidth="2"
15-
className="h-8 w-8 p-1 sm:p-1 lg:p-0"
16-
viewBox="0 0 35 35"
17-
>
18-
<path d="M16.3 0C7.3 0 0 7.3 0 16.3c0 7.2 4.7 13.3 11.1 15.5.8.1 1.1-.4 1.1-.8v-2.8c-4.5 1-5.5-2.2-5.5-2.2-.7-1.9-1.8-2.4-1.8-2.4-1.5-1 .1-1 .1-1 1.6.1 2.5 1.7 2.5 1.7 1.5 2.5 3.8 1.8 4.7 1.4.1-1.1.6-1.8 1-2.2-3.6-.4-7.4-1.8-7.4-8.1 0-1.8.6-3.2 1.7-4.4-.1-.3-.7-2 .2-4.2 0 0 1.4-.4 4.5 1.7 1.3-.4 2.7-.5 4.1-.5 1.4 0 2.8.2 4.1.5 3.1-2.1 4.5-1.7 4.5-1.7.9 2.2.3 3.9.2 4.3 1 1.1 1.7 2.6 1.7 4.4 0 6.3-3.8 7.6-7.4 8 .6.5 1.1 1.5 1.1 3V31c0 .4.3.9 1.1.8 6.5-2.2 11.1-8.3 11.1-15.5C32.6 7.3 25.3 0 16.3 0z" />
19-
</svg>
20-
)
21-
22-
const Twitter = () => (
23-
<svg
24-
fill="currentColor"
25-
strokeLinecap="round"
26-
strokeLinejoin="round"
27-
strokeWidth="2"
28-
className="h-8 w-8 p-1 sm:p-1 lg:p-0"
29-
viewBox="0 0 24 24"
30-
>
31-
<path d="M23 3a10.9 10.9 0 01-3.14 1.53 4.48 4.48 0 00-7.86 3v1A10.66 10.66 0 013 4s-4 9 5 13a11.64 11.64 0 01-7 2c9 5 20 0 20-11.5a4.5 4.5 0 00-.08-.83A7.72 7.72 0 0023 3z"></path>
32-
</svg>
33-
)
34-
359
const footerNav = {
3610
'Getting started': {
3711
className: 'row-span-2',
@@ -56,7 +30,7 @@ const footerNav = {
5630
items: [
5731
{ title: 'Brand', href: '/brand' },
5832
{ title: 'Sponsors', href: '/sponsors' },
59-
{ title: 'Changelog', href: 'https://javaistic-changelog.vercel.app/' },
33+
{ title: 'Changelog', href: '/changelog' },
6034
{ title: 'Open Source', href: '/' },
6135
],
6236
},
@@ -65,7 +39,7 @@ const footerNav = {
6539
{ title: 'GitHub', href: 'https://github.com/javaistic/javaistic' },
6640
{ title: 'Discord', href: '/discord' },
6741
{ title: 'Twitter', href: 'https://twitter.com/javaistic' },
68-
{ title: 'Blog', href: '/' },
42+
{ title: 'Blog', href: '/blog' },
6943
],
7044
},
7145
}
@@ -75,18 +49,18 @@ export function Footer() {
7549
<footer className="bg-gray-100 pt-16 pb-10 dark:bg-gray-800 sm:pt-20 sm:pb-10 md:pt-24 xl:pt-28">
7650
<div className="mx-auto max-w-screen-lg divide-y divide-gray-200 px-4 dark:divide-gray-600 sm:px-6 md:px-8 xl:max-w-screen-xl">
7751
<ul
78-
className={`${styles.nav} grid grid-cols-2 gap-4 gap-y-10 pb-14 text-sm font-medium sm:grid-cols-2 sm:pb-20 md:grid-cols-3 lg:grid-cols-5`}
52+
className={`${styles.nav} grid grid-cols-2 gap-4 gap-y-10 px-2 pb-14 text-sm font-medium sm:grid-cols-2 sm:pb-20 md:grid-cols-3 lg:grid-cols-5`}
7953
>
8054
{Object.keys(footerNav).map((section, i) => (
8155
<li key={section} className={clsx('space-y-5', footerNav[section].className)}>
82-
<h2 className="text-base font-bold uppercase tracking-wide text-gray-900 dark:text-white">
56+
<h2 className="text-lg font-bold uppercase tracking-wide text-gray-900 dark:text-white">
8357
{section}
8458
</h2>
8559
<ul className="space-y-4">
8660
{footerNav[section].items.map((item) => (
8761
<li key={item.href}>
8862
<Link href={item.href}>
89-
<a className="text-gray-400 transition duration-200 ease-in-out hover:text-gray-900 dark:hover:text-white">
63+
<a className="text-base text-gray-500 transition duration-200 ease-in-out hover:font-semibold hover:text-gray-900 dark:text-gray-400 dark:hover:text-white">
9064
{item.title}
9165
</a>
9266
</Link>
@@ -105,7 +79,7 @@ export function Footer() {
10579
</a>
10680
<div className="mt-4 text-sm text-gray-500 sm:ml-4 sm:mt-0 sm:border-l-2 sm:border-r-2 sm:border-gray-200 sm:py-2 sm:pl-4 sm:pr-4 sm:dark:border-gray-600">
10781
<div className="flex">
108-
<a href="https://github.com/uiuxarghya" target="_blank" rel="noopener noreferrer">
82+
<a href="https://twitter.com/uiuxarghya" target="_blank" rel="noopener noreferrer">
10983
<p className="text flex text-base text-gray-500 dark:text-gray-200">
11084
by&nbsp;
11185
<span className="text-base font-bold text-gray-800 dark:text-white">
@@ -135,13 +109,13 @@ export function Footer() {
135109
href="https://github.com/javaistic/javaistic"
136110
className="ml-3 text-gray-500 transition duration-200 ease-in-out hover:text-black dark:hover:text-white"
137111
>
138-
<GitHub />
112+
<GitHub className="h-8 w-8 p-1 sm:p-1 lg:p-0" />
139113
</a>
140114
<a
141115
href="https://twitter.com/javaistic"
142116
className="ml-3 text-gray-500 hover:text-blue-500"
143117
>
144-
<Twitter />
118+
<Twitter className="h-8 w-8 p-1 sm:p-1 lg:p-0" />
145119
</a>
146120
</span>
147121
</div>
@@ -151,6 +125,7 @@ export function Footer() {
151125
&copy; {new Date().getFullYear()} Javaistic. All rights reserved.
152126
</p>
153127
</div>
128+
<div className="flex items-center"></div>
154129
<a
155130
href="#"
156131
className="title-font flex items-center justify-center pl-6 font-medium text-gray-900 md:justify-start"
@@ -171,7 +146,8 @@ export function Footer() {
171146
Status
172147
</p>
173148
</a>
174-
<span className="mt-4 inline-flex justify-center sm:ml-auto sm:mt-0 sm:justify-start"></span>
149+
<span className="mt-4 inline-flex justify-center sm:ml-auto sm:mt-0 sm:justify-start">
150+
</span>
175151
</div>
176152
</div>
177153
</footer>

src/components/home/Hero.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ const { lines } = tokenizeWithLines.java(`class BinarySearch {
3737
else
3838
System.out.println("Element found at index " + result);
3939
}
40-
}`)
40+
}
41+
`)
4142

4243
function CompletionDemo() {
4344
const { ref } = useInView({ threshold: 0.5, triggerOnce: true })

src/layouts/ContentsLayout.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ClassTable } from '@/components/ClassTable'
22
import { PageHeader } from '@/components/PageHeader'
33
import { usePrevNext } from '@/hooks/usePrevNext'
44
import { SidebarContext, SidebarLayout } from '@/layouts/SidebarLayout'
5+
import { ArrowLeftIcon, ArrowRightIcon } from '@heroicons/react/outline'
56
import clsx from 'clsx'
67
import Link from 'next/link'
78
import { useRouter } from 'next/router'
@@ -191,21 +192,17 @@ export function ContentsLayout({ children, meta, classes, tableOfContents }) {
191192
<div className="mt-16 flex font-medium leading-6">
192193
{prev && (
193194
<Link href={prev.href}>
194-
<a className="mr-8 flex rounded-md border-2 border-blue-500 px-2 py-1 text-gray-400 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:hover:text-white">
195-
<span aria-hidden="true" className="mr-2">
196-
&larr;
197-
</span>
195+
<a className="mr-8 flex items-center rounded-md border-2 border-blue-500 px-2 py-1 text-gray-500 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:text-gray-400 dark:hover:text-white">
196+
<ArrowLeftIcon className="mr-2 h-5 w-5" />
198197
{prev.shortTitle || prev.title}
199198
</a>
200199
</Link>
201200
)}
202201
{next && (
203202
<Link href={next.href}>
204-
<a className="ml-auto flex rounded-md border-2 border-blue-500 px-2 py-1 text-right text-gray-400 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:hover:text-white">
203+
<a className="ml-auto flex items-center rounded-md border-2 border-blue-500 px-2 py-1 text-right text-gray-500 transition-colors duration-200 hover:text-gray-900 hover:shadow-md dark:border-blue-400 dark:text-gray-400 dark:hover:text-white">
205204
{next.shortTitle || next.title}
206-
<span aria-hidden="true" className="ml-2">
207-
&rarr;
208-
</span>
205+
<ArrowRightIcon className="ml-2 h-5 w-5" />
209206
</a>
210207
</Link>
211208
)}

0 commit comments

Comments
 (0)