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

src/components/home/Features.js

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ import React from 'react'
66
const DocsImage = () => {
77
return (
88
<NextImage
9-
className="object-cover object-center shadow-xl"
9+
className="object-cover object-center"
1010
alt="Javaistic Docs"
1111
src={require('@/img/home/docs.svg').default}
1212
width={1213}
1313
height={1023}
14-
layout="responsive"
1514
blurDataURL={require('@/img/home/docs.svg').default}
1615
placeholder="blur"
1716
loading="lazy"
@@ -22,12 +21,11 @@ const DocsImage = () => {
2221
const ProgImage = () => {
2322
return (
2423
<NextImage
25-
className="object-cover object-center shadow-xl"
24+
className="object-cover object-center"
2625
alt="Javaistic Programs"
2726
src={require('@/img/home/programs.svg').default}
2827
width={1213}
2928
height={1023}
30-
layout="responsive"
3129
blurDataURL={require('@/img/home/programs.svg').default}
3230
placeholder="blur"
3331
loading="lazy"
@@ -38,12 +36,11 @@ const ProgImage = () => {
3836
const OpenSourceImage = () => {
3937
return (
4038
<NextImage
41-
className="object-cover object-center shadow-xl"
39+
className="object-cover object-center"
4240
alt="Javaistic Open Source On GitHub"
4341
src={require('@/img/home/open-source.svg').default}
4442
width={613}
4543
height={521}
46-
layout="responsive"
4744
blurDataURL={require('@/img/home/open-source.svg').default}
4845
placeholder="blur"
4946
loading="lazy"
@@ -79,14 +76,12 @@ export function Features() {
7976
</p>
8077
<div className="flex justify-center">
8178
<NextLink href="/docs">
82-
<a>
83-
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-800 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white dark:bg-gray-700 dark:hover:bg-gray-600 sm:w-auto">
84-
<span className="flex items-center">
85-
Start Learning
86-
<ArrowRightIcon className="ml-2 h-6" />
87-
</span>
88-
</button>
89-
</a>
79+
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-800 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white dark:bg-gray-700 dark:hover:bg-gray-600 sm:w-auto">
80+
<span className="flex items-center">
81+
Start Learning
82+
<ArrowRightIcon className="ml-2 h-6" />
83+
</span>
84+
</button>
9085
</NextLink>
9186
</div>
9287
</div>
@@ -101,14 +96,12 @@ export function Features() {
10196
</p>
10297
<div className="flex justify-center">
10398
<NextLink href="/programs">
104-
<a>
105-
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-800 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white dark:bg-gray-700 dark:hover:bg-gray-600 sm:w-auto">
106-
<span className="flex items-center">
107-
<CodeIcon className="mr-2 h-6" />
108-
Start Coding
109-
</span>
110-
</button>
111-
</a>
99+
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-800 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white dark:bg-gray-700 dark:hover:bg-gray-600 sm:w-auto">
100+
<span className="flex items-center">
101+
<CodeIcon className="mr-2 h-6" />
102+
Start Coding
103+
</span>
104+
</button>
112105
</NextLink>
113106
</div>
114107
</div>
@@ -132,14 +125,12 @@ export function Features() {
132125
</p>
133126
<div className="flex justify-center">
134127
<NextLink href="https://github.com/javaistic/javaistic" target="_blank">
135-
<a>
136-
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-800 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white dark:bg-gray-700 dark:hover:bg-gray-600 sm:w-auto">
137-
<span className="flex items-center">
138-
View on GitHub
139-
<ExternalLinkIcon className="ml-2 h-6" />
140-
</span>
141-
</button>
142-
</a>
128+
<button className="focus:outline-none w-full flex-none rounded-lg border border-transparent bg-gray-900 py-3 px-6 text-lg font-semibold leading-6 text-white shadow-md transition-colors duration-200 hover:bg-gray-800 hover:shadow-xl focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:ring-offset-white dark:bg-gray-700 dark:hover:bg-gray-600 sm:w-auto">
129+
<span className="flex items-center">
130+
View on GitHub
131+
<ExternalLinkIcon className="ml-2 h-6" />
132+
</span>
133+
</button>
143134
</NextLink>
144135
</div>
145136
</div>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy