diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..bffb357a --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/next.config.js b/next.config.js index 15f3e216..72a5386a 100644 --- a/next.config.js +++ b/next.config.js @@ -24,6 +24,9 @@ const fallbackDefaultExports = { } module.exports = withBundleAnalyzer({ + images: { + disableStaticImages: true, + }, pageExtensions: ['js', 'jsx', 'mdx'], experimental: { modern: true, diff --git a/package.json b/package.json index 6f50f173..1bf8d18f 100644 --- a/package.json +++ b/package.json @@ -8,26 +8,27 @@ "build": "next build", "start": "next start", "export": "next build && next export", - "format": "prettier '{src,remark}/**/*.{css,js,mdx}' --write" + "format": "prettier {src,remark}/**/*.{css,js,mdx} --write" }, "browserslist": [ "> 1%" ], "dependencies": { - "@badrap/bar-of-progress": "^0.1.1", + "@badrap/bar-of-progress": "^0.1.2", "@docsearch/react": "^1.0.0-alpha.14", + "@formspree/react": "^2.2.3", "@juggle/resize-observer": "^3.2.0", "@mdx-js/loader": "^1.6.22", "@mdx-js/react": "^1.6.22", - "@next/bundle-analyzer": "^10.0.1", - "@next/mdx": "^10.0.1", - "@reach/rect": "^0.10.5", + "@next/bundle-analyzer": "^11.1.2", + "@next/mdx": "^11.1.2", + "@reach/rect": "^0.16.0", "@silvenon/remark-smartypants": "^1.0.0", "@sindresorhus/slugify": "^1.1.0", - "@svgr/webpack": "^5.4.0", + "@svgr/webpack": "^5.5.0", "@tailwindcss/jit": "^0.1.18", "@tailwindcss/typography": "^0.4.1", - "autoprefixer": "^10.3.1", + "autoprefixer": "^10.3.4", "babel-plugin-preval": "^5.0.0", "clsx": "^1.1.1", "dlv": "^1.1.3", @@ -36,29 +37,30 @@ "framer-motion": "^4.1.17", "front-matter": "^4.0.2", "glob": "^7.1.7", - "intersection-observer": "^0.11.0", + "intersection-observer": "^0.12.0", "minimatch": "^3.0.4", - "next": "^10.0.1", - "postcss": "^8.3.5", + "next": "^11.1.2", + "postcss": "^8.3.6", "postcss-focus-visible": "^5.0.0", - "postcss-import": "^14.0.1", - "postcss-nested": "^4.2.3", - "prismjs": "^1.23.0", - "react": "^16.13.1", - "react-dom": "^16.13.1", + "postcss-import": "^14.0.2", + "postcss-nested": "^5.0.6", + "prismjs": "^1.24.1", + "react": "^17.0.2", + "react-dom": "^17.0.2", "react-intersection-observer": "^8.29.0", "redent": "^3.0.0", "simple-functional-loader": "^1.2.1", - "tailwindcss": "^2.2.6", + "tailwindcss": "^2.2.9", "tinytime": "^0.2.6", "unist-util-visit": "^2.0.3", - "webpack": "4.0.0 || ^5.0.0" + "webpack": "^5.0.0" }, "devDependencies": { "@types/react": "^17.0.14", "@typescript-eslint/eslint-plugin": "2.x", "@typescript-eslint/parser": "2.x", "babel-eslint": "10.x", + "@babel/core":"^7.0.0", "eslint": "6.x", "eslint-config-react-app": "^5.2.1", "eslint-plugin-flowtype": "4.x", @@ -67,6 +69,6 @@ "eslint-plugin-react": "7.x", "eslint-plugin-react-hooks": "2.x", "prettier": "^2.2.1", - "typescript": "^4.3.5" + "typescript": "^4.4.2" } } diff --git a/public/manifest.json b/public/manifest.json index 21cde907..1c92d384 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,5 +1,10 @@ { + "short_name": "Javaistic", "name": "Javaistic", + "start_url": "/", + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone", "icons": [ { "src": "/android-chrome-192x192.png", @@ -11,8 +16,5 @@ "sizes": "512x512", "type": "image/png" } - ], - "theme_color": "#ffffff", - "background_color": "#ffffff", - "display": "standalone" + ] } diff --git a/public/sitemap.xml b/public/sitemap.xml index ed15d9f6..fca89b4d 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -9,57 +9,67 @@ https://javaistic.vercel.app/ - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 1.00 https://javaistic.vercel.app/docs - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.80 https://javaistic.vercel.app/docs/installation - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.80 https://javaistic.vercel.app/programs/introduction - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.80 https://javaistic.vercel.app/programs - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.80 https://javaistic.vercel.app/brand - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.80 https://javaistic.vercel.app/docs/introduction - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.64 https://javaistic.vercel.app/docs/hello-world - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.64 https://javaistic.vercel.app/docs/jvm-jre-jdk - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.64 https://javaistic.vercel.app/docs/variables-and-literals - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 0.64 https://javaistic.vercel.app/docs/variables-primitive-data-types - 2021-08-03T13:34:31+00:00 + 2021-08-30T22:32:17+00:00 + 0.64 + + + https://javaistic.vercel.app/docs/operators + 2021-08-30T22:32:17+00:00 + 0.64 + + + https://javaistic.vercel.app/programs/print-an-integer + 2021-08-30T22:32:17+00:00 0.64 diff --git a/public/urllist.txt b/public/urllist.txt new file mode 100644 index 00000000..a3276ff7 --- /dev/null +++ b/public/urllist.txt @@ -0,0 +1,13 @@ +https://javaistic.vercel.app/ +https://javaistic.vercel.app/docs +https://javaistic.vercel.app/docs/installation +https://javaistic.vercel.app/programs/introduction +https://javaistic.vercel.app/programs +https://javaistic.vercel.app/brand +https://javaistic.vercel.app/docs/introduction +https://javaistic.vercel.app/docs/hello-world +https://javaistic.vercel.app/docs/jvm-jre-jdk +https://javaistic.vercel.app/docs/variables-and-literals +https://javaistic.vercel.app/docs/variables-primitive-data-types +https://javaistic.vercel.app/docs/operators +https://javaistic.vercel.app/programs/print-an-integer diff --git a/src/components/Header.js b/src/components/Header.js index cbba35d1..b80f3907 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -1,8 +1,8 @@ -import Link from 'next/link' +import { Logo } from '@/components/Logo' import { Search } from '@/components/Search' import clsx from 'clsx' +import Link from 'next/link' import Router from 'next/router' -import { Logo } from '@/components/Logo' function BannerMarkMobile(props) { return ( diff --git a/src/components/Testimonials.js b/src/components/Testimonials.js index d2f5c057..06dc7519 100644 --- a/src/components/Testimonials.js +++ b/src/components/Testimonials.js @@ -169,7 +169,7 @@ export function Testimonials() { type: 'tween', duration, ease: 'linear', - loop: Infinity, + repeatType: "loop" }) return controls.stop diff --git a/src/components/home/Footer.js b/src/components/home/Footer.js index 2f45f5e7..b9f44f86 100644 --- a/src/components/home/Footer.js +++ b/src/components/home/Footer.js @@ -22,7 +22,7 @@ const footerNav = { { title: 'Java Docs', href: '/docs' }, { title: 'Java Programs', href: '/programs' }, { title: 'About', href: '/' }, - { title: 'Status', href: 'https://javaistic.betteruptime.com/'}, + { title: 'Status', href: 'https://javaistic.betteruptime.com/' }, ], }, Others: { @@ -74,7 +74,7 @@ export function Footer() {
- +

Powered by diff --git a/src/components/home/Newsletter.js b/src/components/home/Newsletter.js new file mode 100644 index 00000000..d3ebd021 --- /dev/null +++ b/src/components/home/Newsletter.js @@ -0,0 +1,87 @@ +import React from 'react' +import { useForm, ValidationError } from '@formspree/react' +import { BigText, IconContainer, Paragraph, Widont } from '@/components/home/common' +import { ReactComponent as Icon } from '@/img/icons/home/newsletter.svg' +import { gradients } from '@/utils/gradients' + +export function Newsletter() { + const [state, handleSubmit] = useForm('moqyyjvo', { + data: { + _subject: 'Someone joined the newsletter', + pageTitle: function () { + // This function will be evaluated at submission time + return document.title + }, + }, + }) + if (state.succeeded) { + return ( +

+ + + + + + Congratulations! +

You have successfully subscribed to our newsletter.

+
+ ) + } + return ( +
+
+ + + + + Want product news and updates? + + Sign Up for our weekly newsletter. +
+
+
+ +
+
+
+ ) +} diff --git a/src/img/icons/home/newsletter.svg b/src/img/icons/home/newsletter.svg new file mode 100644 index 00000000..b6ce1080 --- /dev/null +++ b/src/img/icons/home/newsletter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/layouts/ContentsLayout.js b/src/layouts/ContentsLayout.js index e70ffb13..e26f48e1 100644 --- a/src/layouts/ContentsLayout.js +++ b/src/layouts/ContentsLayout.js @@ -218,12 +218,10 @@ export function ContentsLayout({ children, meta, classes, tableOfContents }) { Edit this page on GitHub
- - - Powered by ▲Vercel - + + + Powered by ▲Vercel +
diff --git a/src/pages/index.js b/src/pages/index.js index 12a87f7d..80d2d6df 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,6 +1,7 @@ import { BigText, InlineCode, Paragraph, Widont } from '@/components/home/common' import { Footer } from '@/components/home/Footer' import { Hero } from '@/components/home/Hero' +import { Newsletter } from '@/components/home/Newsletter' import { Logo } from '@/components/Logo' import { Search } from '@/components/Search' import { Testimonials } from '@/components/Testimonials' @@ -95,7 +96,7 @@ export default function Home() { @@ -138,6 +139,9 @@ export default function Home() {
+
+ +