Skip to content

Commit 39fb234

Browse files
authored
Merge pull request #708 from javaistic/dev
Update website and `<Link/>`, `<Image/>` as per Next.JS 14
2 parents 71db511 + 0dffde7 commit 39fb234

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+491
-8225
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ name: "CodeQL"
1414
on:
1515
pull_request:
1616
# The branches below must be a subset of the branches above
17-
branches: [ main ]
17+
branches: [main]
1818
schedule:
19-
- cron: '33 3 * * 5'
19+
- cron: "33 3 * * 5"
2020

2121
jobs:
2222
analyze:
@@ -30,40 +30,40 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
language: [ 'javascript' ]
33+
language: ["javascript"]
3434
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3535
# Learn more:
3636
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3737

3838
steps:
39-
- name: Checkout repository
40-
uses: actions/checkout@v2
39+
- name: Checkout repository
40+
uses: actions/checkout@v2
4141

42-
# Initializes the CodeQL tools for scanning.
43-
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@v1
45-
with:
46-
languages: ${{ matrix.language }}
47-
# If you wish to specify custom queries, you can do so here or in a config file.
48-
# By default, queries listed here will override any specified in a config file.
49-
# Prefix the list here with "+" to use these queries and those in the config file.
50-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
42+
# Initializes the CodeQL tools for scanning.
43+
- name: Initialize CodeQL
44+
uses: github/codeql-action/init@v2
45+
with:
46+
languages: ${{ matrix.language }}
47+
# If you wish to specify custom queries, you can do so here or in a config file.
48+
# By default, queries listed here will override any specified in a config file.
49+
# Prefix the list here with "+" to use these queries and those in the config file.
50+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5151

52-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53-
# If this step fails, then you should remove it and run the build manually (see below)
54-
- name: Autobuild
55-
uses: github/codeql-action/autobuild@v1
52+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
53+
# If this step fails, then you should remove it and run the build manually (see below)
54+
- name: Autobuild
55+
uses: github/codeql-action/autobuild@v2
5656

57-
# ℹ️ Command-line programs to run using the OS shell.
58-
# 📚 https://git.io/JvXDl
57+
# ℹ️ Command-line programs to run using the OS shell.
58+
# 📚 https://git.io/JvXDl
5959

60-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
61-
# and modify them (or add more) to build your code if your project
62-
# uses a compiled language
60+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
61+
# and modify them (or add more) to build your code if your project
62+
# uses a compiled language
6363

64-
#- run: |
65-
# make bootstrap
66-
# make release
64+
#- run: |
65+
# make bootstrap
66+
# make release
6767

68-
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@v1
68+
- name: Perform CodeQL Analysis
69+
uses: github/codeql-action/analyze@v2

bun.lockb

373 KB
Binary file not shown.

next.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ module.exports = withBundleAnalyzer({
2828
disableStaticImages: true,
2929
},
3030
pageExtensions: ['js', 'jsx', 'mdx'],
31-
experimental: {
32-
modern: true,
33-
},
3431
async redirects() {
3532
return require('./redirects.json')
3633
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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,rehype}/**/*.{css,js,mdx} --write",
1616
"lint": "next lint",
1717
"clean": "rimraf .next"
1818
},

src/components/Button.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import Link from 'next/link'
22

33
export function Button({ children, ...props }) {
44
return (
5-
<Link {...props}>
6-
<a className="focus:outline-none inline-flex items-center rounded-lg bg-gray-800 px-6 py-3 text-lg font-medium text-white no-underline shadow hover:bg-gray-700 focus:bg-gray-700">
7-
{children}
8-
<svg viewBox="0 0 24 24" className="ml-2 h-4 w-4 fill-current text-gray-300">
9-
<path d="M18.59 13H3a1 1 0 0 1 0-2h15.59l-5.3-5.3a1 1 0 1 1 1.42-1.4l7 7a1 1 0 0 1 0 1.4l-7 7a1 1 0 0 1-1.42-1.4l5.3-5.3z" />
10-
</svg>
11-
</a>
5+
<Link
6+
{...props}
7+
className="focus:outline-none inline-flex items-center rounded-lg bg-gray-800 px-6 py-3 text-lg font-medium text-white no-underline shadow hover:bg-gray-700 focus:bg-gray-700"
8+
>
9+
{children}
10+
<svg viewBox="0 0 24 24" className="ml-2 h-4 w-4 fill-current text-gray-300">
11+
<path d="M18.59 13H3a1 1 0 0 1 0-2h15.59l-5.3-5.3a1 1 0 1 1 1.42-1.4l7 7a1 1 0 0 1 0 1.4l-7 7a1 1 0 0 1-1.42-1.4l5.3-5.3z" />
12+
</svg>
1213
</Link>
1314
)
1415
}

src/components/Header.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,16 @@ export function Header({ navIsOpen, onNavToggle }) {
1111
<>
1212
<div className="sticky top-0 z-40 mx-auto flex w-full max-w-8xl flex-none border-b border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900 lg:z-50">
1313
<div className="flex flex-none items-center border-b border-gray-200 pl-4 dark:border-gray-700 sm:pl-6 lg:w-60 lg:border-b-0 xl:w-72 xl:pl-8">
14-
<Link href="/">
15-
<a
16-
className="w-10 overflow-hidden md:w-auto"
17-
onContextMenu={(e) => {
18-
e.preventDefault()
19-
Router.push('/brand')
20-
}}
21-
>
22-
<span className="sr-only">Javaistic home page</span>
23-
<Logo className="h-10 w-auto text-black dark:text-white" />
24-
</a>
14+
<Link
15+
href="/"
16+
className="w-10 overflow-hidden md:w-auto"
17+
onContextMenu={(e) => {
18+
e.preventDefault()
19+
Router.push('/brand')
20+
}}
21+
>
22+
<span className="sr-only">Javaistic home page</span>
23+
<Logo className="h-10 w-auto text-black dark:text-white" />
2524
</Link>
2625
</div>
2726
<div className="flex h-18 flex-auto items-center justify-between px-4 sm:px-6 lg:mx-6 lg:px-0 xl:mx-8">

src/components/IntegrationGuides.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ export function IntegrationGuides() {
1515
{guides.map((guide) => {
1616
const Logo = guide.logo
1717
return (
18-
<Link href={guide.link} key={guide.name}>
19-
<a className="flex flex-col items-center rounded-xl py-4 shadow-sm ring-1 ring-black ring-opacity-5">
20-
<Logo className="h-12 w-auto" />
21-
<div className="mt-3 text-sm font-semibold text-gray-900 sm:mt-2">{guide.name}</div>
22-
</a>
18+
<Link
19+
href={guide.link}
20+
key={guide.name}
21+
className="flex flex-col items-center rounded-xl py-4 shadow-sm ring-1 ring-black ring-opacity-5"
22+
>
23+
<Logo className="h-12 w-auto" />
24+
<div className="mt-3 text-sm font-semibold text-gray-900 sm:mt-2">{guide.name}</div>
2325
</Link>
2426
)
2527
})}

src/components/Search.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ const ACTION_KEY_DEFAULT = ['Ctrl ', 'Control']
1010
const ACTION_KEY_APPLE = ['⌘', 'Command']
1111

1212
function Hit({ hit, children }) {
13-
return (
14-
<Link href={hit.url}>
15-
<a>{children}</a>
16-
</Link>
17-
)
13+
return <Link href={hit.url}>{children}</Link>
1814
}
1915

2016
export function Search() {

src/components/Testimonials.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ function Testimonial({ testimonial, base, index, total }) {
129129
width={416}
130130
height={416}
131131
quality={100}
132-
layout="intrinsic"
133132
blurDataURL={testimonial.author.avatar}
134133
placeholder="blur"
135134
loading="lazy"
Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
1-
import React from 'react';
2-
import { useEffect, useState } from 'react';
1+
import React from 'react'
2+
import { useEffect, useState } from 'react'
33
import { ArrowUpIcon } from '@heroicons/react/outline'
44

55
function BackToTopButton() {
6-
const [backToTopButton, setBackToTopButton] = useState(false);
6+
const [backToTopButton, setBackToTopButton] = useState(false)
77

8-
useEffect(() =>{
9-
window.addEventListener("scroll", () => {
10-
if(window.scrollY > 100){
11-
setBackToTopButton(true)
12-
} else{
13-
setBackToTopButton(false)
14-
}
15-
})
16-
}, [])
8+
useEffect(() => {
9+
window.addEventListener('scroll', () => {
10+
if (window.scrollY > 100) {
11+
setBackToTopButton(true)
12+
} else {
13+
setBackToTopButton(false)
14+
}
15+
})
16+
}, [])
1717

18-
const scrollUp = () => {
19-
window.scrollTo({
20-
top: 0,
21-
behavior: "smooth"
22-
})
23-
}
18+
const scrollUp = () => {
19+
window.scrollTo({
20+
top: 0,
21+
behavior: 'smooth',
22+
})
23+
}
2424

25-
return (
26-
<div>
27-
{backToTopButton && (
28-
29-
<button onClick={scrollUp} className ="fixed bottom-12 right-12 w-12 h-12 text-5xl text-white bg-sky-500 rounded-full flex items-center justify-center hover:shadow-xl hover:ring-2 hover:ring-rose-500 hover:ring-offset-2 focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 dark:bg-gray-700" > <ArrowUpIcon className="h-8 w-8" /> </button>
30-
31-
32-
)}
33-
34-
35-
</div>
36-
)
25+
return (
26+
<div>
27+
{backToTopButton && (
28+
<button
29+
onClick={scrollUp}
30+
className="fixed bottom-12 right-12 flex h-12 w-12 items-center justify-center rounded-full bg-sky-500 text-5xl text-white hover:shadow-xl hover:ring-2 hover:ring-rose-500 hover:ring-offset-2 focus:ring-2 focus:ring-rose-500 focus:ring-offset-2 dark:bg-gray-700"
31+
>
32+
{' '}
33+
<ArrowUpIcon className="h-8 w-8" />{' '}
34+
</button>
35+
)}
36+
</div>
37+
)
3738
}
3839

39-
export default BackToTopButton;
40+
export default BackToTopButton

0 commit comments

Comments
 (0)