Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ name: "CodeQL"
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '33 3 * * 5'
- cron: "33 3 * * 5"

jobs:
analyze:
Expand All @@ -30,40 +30,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# 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

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

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

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

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

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

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Binary file added bun.lockb
Binary file not shown.
3 changes: 0 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ module.exports = withBundleAnalyzer({
disableStaticImages: true,
},
pageExtensions: ['js', 'jsx', 'mdx'],
experimental: {
modern: true,
},
async redirects() {
return require('./redirects.json')
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "next build",
"start": "next start",
"export": "next build && next export",
"format": "prettier {src,remark}/**/*.{css,js,mdx} --write",
"format": "prettier {src,remark,rehype}/**/*.{css,js,mdx} --write",
"lint": "next lint",
"clean": "rimraf .next"
},
Expand Down
15 changes: 8 additions & 7 deletions src/components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import Link from 'next/link'

export function Button({ children, ...props }) {
return (
<Link {...props}>
<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">
{children}
<svg viewBox="0 0 24 24" className="ml-2 h-4 w-4 fill-current text-gray-300">
<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" />
</svg>
</a>
<Link
{...props}
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"
>
{children}
<svg viewBox="0 0 24 24" className="ml-2 h-4 w-4 fill-current text-gray-300">
<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" />
</svg>
</Link>
)
}
21 changes: 10 additions & 11 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ export function Header({ navIsOpen, onNavToggle }) {
<>
<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">
<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">
<Link href="/">
<a
className="w-10 overflow-hidden md:w-auto"
onContextMenu={(e) => {
e.preventDefault()
Router.push('/brand')
}}
>
<span className="sr-only">Javaistic home page</span>
<Logo className="h-10 w-auto text-black dark:text-white" />
</a>
<Link
href="/"
className="w-10 overflow-hidden md:w-auto"
onContextMenu={(e) => {
e.preventDefault()
Router.push('/brand')
}}
>
<span className="sr-only">Javaistic home page</span>
<Logo className="h-10 w-auto text-black dark:text-white" />
</Link>
</div>
<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">
Expand Down
12 changes: 7 additions & 5 deletions src/components/IntegrationGuides.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ export function IntegrationGuides() {
{guides.map((guide) => {
const Logo = guide.logo
return (
<Link href={guide.link} key={guide.name}>
<a className="flex flex-col items-center rounded-xl py-4 shadow-sm ring-1 ring-black ring-opacity-5">
<Logo className="h-12 w-auto" />
<div className="mt-3 text-sm font-semibold text-gray-900 sm:mt-2">{guide.name}</div>
</a>
<Link
href={guide.link}
key={guide.name}
className="flex flex-col items-center rounded-xl py-4 shadow-sm ring-1 ring-black ring-opacity-5"
>
<Logo className="h-12 w-auto" />
<div className="mt-3 text-sm font-semibold text-gray-900 sm:mt-2">{guide.name}</div>
</Link>
)
})}
Expand Down
6 changes: 1 addition & 5 deletions src/components/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ const ACTION_KEY_DEFAULT = ['Ctrl ', 'Control']
const ACTION_KEY_APPLE = ['⌘', 'Command']

function Hit({ hit, children }) {
return (
<Link href={hit.url}>
<a>{children}</a>
</Link>
)
return <Link href={hit.url}>{children}</Link>
}

export function Search() {
Expand Down
1 change: 0 additions & 1 deletion src/components/Testimonials.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ function Testimonial({ testimonial, base, index, total }) {
width={416}
height={416}
quality={100}
layout="intrinsic"
blurDataURL={testimonial.author.avatar}
placeholder="blur"
loading="lazy"
Expand Down
63 changes: 32 additions & 31 deletions src/components/home/BackToTopButton.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
import React from 'react';
import { useEffect, useState } from 'react';
import React from 'react'
import { useEffect, useState } from 'react'
import { ArrowUpIcon } from '@heroicons/react/outline'

function BackToTopButton() {
const [backToTopButton, setBackToTopButton] = useState(false);
const [backToTopButton, setBackToTopButton] = useState(false)

useEffect(() =>{
window.addEventListener("scroll", () => {
if(window.scrollY > 100){
setBackToTopButton(true)
} else{
setBackToTopButton(false)
}
})
}, [])
useEffect(() => {
window.addEventListener('scroll', () => {
if (window.scrollY > 100) {
setBackToTopButton(true)
} else {
setBackToTopButton(false)
}
})
}, [])

const scrollUp = () => {
window.scrollTo({
top: 0,
behavior: "smooth"
})
}
const scrollUp = () => {
window.scrollTo({
top: 0,
behavior: 'smooth',
})
}

return (
<div>
{backToTopButton && (

<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>


)}


</div>
)
return (
<div>
{backToTopButton && (
<button
onClick={scrollUp}
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"
>
{' '}
<ArrowUpIcon className="h-8 w-8" />{' '}
</button>
)}
</div>
)
}

export default BackToTopButton;
export default BackToTopButton
51 changes: 21 additions & 30 deletions src/components/home/Features.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import React from 'react'
const DocsImage = () => {
return (
<NextImage
className="object-cover object-center shadow-xl"
className="object-cover object-center"
alt="Javaistic Docs"
src={require('@/img/home/docs.svg').default}
width={1213}
height={1023}
layout="responsive"
blurDataURL={require('@/img/home/docs.svg').default}
placeholder="blur"
loading="lazy"
Expand All @@ -22,12 +21,11 @@ const DocsImage = () => {
const ProgImage = () => {
return (
<NextImage
className="object-cover object-center shadow-xl"
className="object-cover object-center"
alt="Javaistic Programs"
src={require('@/img/home/programs.svg').default}
width={1213}
height={1023}
layout="responsive"
blurDataURL={require('@/img/home/programs.svg').default}
placeholder="blur"
loading="lazy"
Expand All @@ -38,12 +36,11 @@ const ProgImage = () => {
const OpenSourceImage = () => {
return (
<NextImage
className="object-cover object-center shadow-xl"
className="object-cover object-center"
alt="Javaistic Open Source On GitHub"
src={require('@/img/home/open-source.svg').default}
width={613}
height={521}
layout="responsive"
blurDataURL={require('@/img/home/open-source.svg').default}
placeholder="blur"
loading="lazy"
Expand Down Expand Up @@ -79,14 +76,12 @@ export function Features() {
</p>
<div className="flex justify-center">
<NextLink href="/docs">
<a>
<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">
<span className="flex items-center">
Start Learning
<ArrowRightIcon className="ml-2 h-6" />
</span>
</button>
</a>
<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">
<span className="flex items-center">
Start Learning
<ArrowRightIcon className="ml-2 h-6" />
</span>
</button>
</NextLink>
</div>
</div>
Expand All @@ -101,14 +96,12 @@ export function Features() {
</p>
<div className="flex justify-center">
<NextLink href="/programs">
<a>
<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">
<span className="flex items-center">
<CodeIcon className="mr-2 h-6" />
Start Coding
</span>
</button>
</a>
<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">
<span className="flex items-center">
<CodeIcon className="mr-2 h-6" />
Start Coding
</span>
</button>
</NextLink>
</div>
</div>
Expand All @@ -132,14 +125,12 @@ export function Features() {
</p>
<div className="flex justify-center">
<NextLink href="https://github.com/javaistic/javaistic" target="_blank">
<a>
<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">
<span className="flex items-center">
View on GitHub
<ExternalLinkIcon className="ml-2 h-6" />
</span>
</button>
</a>
<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">
<span className="flex items-center">
View on GitHub
<ExternalLinkIcon className="ml-2 h-6" />
</span>
</button>
</NextLink>
</div>
</div>
Expand Down
Loading