Skip to content

Commit b8d7b42

Browse files
authored
Merge pull request #72 from javaistic/patch
Enhancement
2 parents b99d1d1 + ebf11ea commit b8d7b42

File tree

14 files changed

+1130
-731
lines changed

14 files changed

+1130
-731
lines changed

.eslintrc.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
module.exports = {
2-
extends: 'react-app',
2+
extends: 'next',
33
rules: {
44
'react/react-in-jsx-scope': 'off',
5+
'react/display-name': 'off',
6+
'react-hooks/exhaustive-deps': 'off',
57
'jsx-a11y/anchor-is-valid': 'off',
68
},
79
}

package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"build": "next build",
1313
"start": "next start",
1414
"export": "next build && next export",
15-
"format": "prettier {src,remark}/**/*.{css,js,mdx} --write"
15+
"format": "prettier {src,remark}/**/*.{css,js,mdx} --write",
16+
"lint": "next lint",
17+
"clean": "rimraf .next"
1618
},
1719
"browserslist": [
1820
"> 1%"
@@ -56,6 +58,7 @@
5658
"react-dom": "^17.0.2",
5759
"react-intersection-observer": "^8.33.0",
5860
"redent": "^3.0.0",
61+
"sharp": "^0.29.3",
5962
"simple-functional-loader": "^1.2.1",
6063
"tailwindcss": "^2.2.19",
6164
"tinytime": "^0.2.6",
@@ -64,18 +67,16 @@
6467
"devDependencies": {
6568
"@babel/core": "^7.16.0",
6669
"@types/react": "^17.0.37",
67-
"@typescript-eslint/eslint-plugin": "2.34.0",
68-
"@typescript-eslint/parser": "2.34.0",
69-
"babel-eslint": "10.x",
70-
"eslint": "6.x",
71-
"eslint-config-react-app": "^5.2.1",
72-
"eslint-plugin-flowtype": "4.x",
73-
"eslint-plugin-import": "2.x",
74-
"eslint-plugin-jsx-a11y": "6.x",
75-
"eslint-plugin-react": "7.x",
76-
"eslint-plugin-react-hooks": "2.x",
70+
"@typescript-eslint/eslint-plugin": "5.6.0",
71+
"@typescript-eslint/parser": "5.6.0",
72+
"babel-eslint": "10.1.0",
73+
"eslint": "7.32.0",
74+
"eslint-config-next": "^12.0.7",
75+
"eslint-config-react-app": "^6.0.0",
76+
"eslint-plugin-flowtype": "8.0.3",
77+
"eslint-plugin-import": "2.25.3",
7778
"prettier": "^2.5.1",
7879
"typescript": "^4.5.3",
7980
"webpack": "^5.65.0"
8081
}
81-
}
82+
}

src/components/Testimonials.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { gradients } from '@/utils/gradients'
22
import { animate, motion, useMotionValue, useTransform } from 'framer-motion'
3+
import Image from 'next/image'
34
import { useEffect, useState } from 'react'
45
import { useInView } from 'react-intersection-observer'
56

@@ -121,11 +122,17 @@ function Testimonial({ testimonial, base, index, total }) {
121122
<figcaption
122123
className={`flex items-center space-x-4 p-6 md:px-10 md:py-6 bg-gradient-to-br rounded-b-xl leading-6 font-semibold text-white ${color[0]}`}
123124
>
124-
<div className="flex-none w-14 h-14 bg-white rounded-full flex items-center justify-center">
125-
<img
125+
<div className="flex-none w-14 h-14 p-1 bg-white rounded-full flex items-center justify-center">
126+
<Image
126127
src={testimonial.author.avatar}
127-
alt=""
128+
alt={testimonial.author.name}
128129
className={`w-12 h-12 rounded-full ${color[2]}`}
130+
width={416}
131+
height={416}
132+
quality={100}
133+
layout="intrinsic"
134+
blurDataURL={testimonial.author.avatar}
135+
placeholder="blur"
129136
loading="lazy"
130137
/>
131138
</div>

src/components/home/Menu.js

Lines changed: 71 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Menu, Transition } from '@headlessui/react'
2-
import { ChevronDownIcon,MenuIcon } from '@heroicons/react/solid'
2+
import { ChevronDownIcon, MenuIcon } from '@heroicons/react/solid'
33
import { Fragment } from 'react'
4+
import Link from 'next/link'
45

56
function classNames(...classes) {
67
return classes.filter(Boolean).join(' ')
@@ -30,89 +31,95 @@ export default function MenuButton() {
3031
<div className="py-1">
3132
<Menu.Item>
3233
{({ active }) => (
33-
<a
34-
href="/docs"
35-
className={classNames(
36-
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
37-
'block px-4 py-2 text-base sm:hidden'
38-
)}
39-
>
40-
Documentation
41-
</a>
34+
<Link href="/docs">
35+
<a
36+
className={classNames(
37+
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
38+
'block px-4 py-2 text-base sm:hidden'
39+
)}
40+
>
41+
Documentation
42+
</a>
43+
</Link>
4244
)}
4345
</Menu.Item>
4446
<Menu.Item>
4547
{({ active }) => (
46-
<a
47-
href="#"
48-
className={classNames(
49-
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
50-
'block px-4 py-2 text-base'
51-
)}
52-
>
53-
About
54-
</a>
48+
<Link href="#">
49+
<a
50+
className={classNames(
51+
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
52+
'block px-4 py-2 text-base'
53+
)}
54+
>
55+
About
56+
</a>
57+
</Link>
5558
)}
5659
</Menu.Item>
5760
<Menu.Item>
5861
{({ active }) => (
59-
<a
60-
href="/sponsors"
61-
className={classNames(
62-
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
63-
'block px-4 py-2 text-base'
64-
)}
65-
>
66-
Sponsors
67-
</a>
62+
<Link href="/sponsors">
63+
<a
64+
className={classNames(
65+
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
66+
'block px-4 py-2 text-base'
67+
)}
68+
>
69+
Sponsors
70+
</a>
71+
</Link>
6872
)}
6973
</Menu.Item>
7074
<Menu.Item>
7175
{({ active }) => (
72-
<a
73-
href="/license"
74-
className={classNames(
75-
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
76-
'block px-4 py-2 text-base'
77-
)}
78-
>
79-
License
80-
</a>
76+
<Link href="/license">
77+
<a
78+
className={classNames(
79+
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
80+
'block px-4 py-2 text-base'
81+
)}
82+
>
83+
License
84+
</a>
85+
</Link>
8186
)}
8287
</Menu.Item>
8388
<Menu.Item>
8489
{({ active }) => (
85-
<a
86-
href="/changelog"
87-
className={classNames(
88-
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
89-
'block w-full text-left px-4 py-2 text-base'
90-
)}
91-
>
92-
Change Log
93-
</a>
90+
<Link href="/changelog">
91+
<a
92+
className={classNames(
93+
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
94+
'block w-full text-left px-4 py-2 text-base'
95+
)}
96+
>
97+
Change Log
98+
</a>
99+
</Link>
94100
)}
95101
</Menu.Item>
96102
<Menu.Item>
97103
{({ active }) => (
98-
<a
99-
href="https://github.com/javaistic/javaistic"
100-
className={classNames(
101-
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
102-
'block px-4 py-2 text-base sm:hidden'
103-
)}
104-
>
105-
<div className="flex">
106-
<span className="sr-only">Javaistic on GitHub</span>
107-
<svg className="w-6 h-6 mr-2" viewBox="0 0 16 16" fill="currentColor">
108-
<path
109-
fillRule="evenodd"
110-
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
111-
/>
112-
</svg>
113-
GitHub
114-
</div>
115-
</a>
104+
<Link href="https://github.com/javaistic/javaistic">
105+
<a
106+
className={classNames(
107+
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
108+
'block px-4 py-2 text-base sm:hidden'
109+
)}
110+
>
111+
<div className="flex">
112+
<span className="sr-only">Javaistic on GitHub</span>
113+
<svg className="w-6 h-6 mr-2" viewBox="0 0 16 16" fill="currentColor">
114+
<path
115+
fillRule="evenodd"
116+
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
117+
/>
118+
</svg>
119+
GitHub
120+
</div>
121+
</a>
122+
</Link>
116123
)}
117124
</Menu.Item>
118125

src/components/home/Newsletter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export function Newsletter() {
1717
<div id="revue-embed">
1818
<form action="https://www.getrevue.co/profile/javaistic/add_subscriber" double_opt_in="false" method="post" id="revue-form" name="revue-form" target="_blank">
1919
<div className="flex flex-center flex-wrap p-5 pb-1 space-y-4 sm:space-y-4 sm:space-x-0 text-center mt-1">
20-
<label for="member_email">Email address</label>
20+
<label htmlFor="member_email">Email address</label>
2121
<input className="flex-none w-full px-4 py-4 font-medium text-lg bg-gray-100 hover:shadow-lg rounded-lg border border-gray-400 focus:outline-none" placeholder="Your email address..." type="email" name="member[email]" id="member_email" />
2222
</div>
2323
<div className="flex flex-center flex-wrap p-5 pb-1 space-y-4 sm:space-y-4 sm:space-x-0 text-center">
24-
<label for="member_first_name">First name <span class="optional">(Optional)</span></label>
24+
<label htmlFor="member_first_name">First name <span className="optional">(Optional)</span></label>
2525
<input className="flex-none w-full px-4 py-4 font-medium text-lg bg-gray-100 hover:shadow-lg rounded-lg border border-gray-400 focus:outline-none" placeholder="First name... (Optional)" type="text" name="member[first_name]" id="member_first_name" />
2626
</div>
2727
<div className="flex flex-center flex-wrap p-5 pb-1 space-y-4 sm:space-y-4 sm:space-x-0 text-center">
28-
<label for="member_last_name">Last name <span class="optional">(Optional)</span></label>
28+
<label htmlFor="member_last_name">Last name <span className="optional">(Optional)</span></label>
2929
<input className="flex-none w-full px-4 py-4 font-medium text-lg bg-gray-100 hover:shadow-lg rounded-lg border border-gray-400 focus:outline-none" placeholder="Last name... (Optional)" type="text" name="member[last_name]" id="member_last_name" />
3030
</div>
3131
<div className="flex flex-center flex-wrap p-5 pb-1 space-y-4 sm:space-y-4 sm:space-x-0 text-center">

src/img/avatars/linus-trovalds.jpg

0 Bytes
Loading

src/img/avatars/martin-fowler.jpg

0 Bytes
Loading

src/img/uiuxarghya.jpg

18.1 KB
Loading

src/img/uiuxarghya.png

-54.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)