diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..44e433e8 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [javaistic] +patreon: # Replace with a single Patreon username +open_collective: javaistic +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/img/javaistic-readme.png b/.github/img/javaistic-readme.png new file mode 100644 index 00000000..bbbc73af Binary files /dev/null and b/.github/img/javaistic-readme.png differ diff --git a/.github/img/powered-by-vercel.svg b/.github/img/powered-by-vercel.svg new file mode 100644 index 00000000..10281f67 --- /dev/null +++ b/.github/img/powered-by-vercel.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/.github/img/search-by-algolia.svg b/.github/img/search-by-algolia.svg new file mode 100644 index 00000000..0495fc7e --- /dev/null +++ b/.github/img/search-by-algolia.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000..d7d4e671 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '33 3 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + 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 + + # 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 + + # 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 + + # ℹ️ 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 + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..45b12cef --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021-present Arghya Ghosh and Javaistic. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 8796a0b0..347b1478 100644 --- a/README.md +++ b/README.md @@ -1 +1,34 @@ -# javaistic +# **[Javaistic](https://javaistic.vercel.app/?utm_source=github&utm_medium=readme-header&utm_campaign=javaistic) ![Stars](https://badgen.net/github/stars/javaistic/javaistic) ![Release](https://badgen.net/github/release/javaistic/javaistic)** + +
+ +[![javaistic](.github/img/javaistic-readme.png)](https://javaistic.vercel.app/?utm_source=github&utm_medium=readme-image&utm_campaign=javaistic) + +### **Javaistic - Java learning made simple.** + +
+ +## **Website : [javaistic.vercel.app](https://javaistic.vercel.app/?utm_source=github&utm_medium=readme-link&utm_campaign=javaistic)** + +## **[Site Status](https://javaistic.betteruptime.com/) [![Better Uptime Badge](https://betteruptime.com/status-badges/v1/monitor/8a3u.svg)](https://betteruptime.com/?utm_source=status_badge)** + +![Stats](https://badgen.net/uptime-robot/status/m788498503-abfbb35c24db9355ed897d6d) +![Stats](https://badgen.net/uptime-robot/day/m788498503-abfbb35c24db9355ed897d6d) +![Stats](https://badgen.net/uptime-robot/week/m788498503-abfbb35c24db9355ed897d6d) +![Stats](https://badgen.net/uptime-robot/month/m788498503-abfbb35c24db9355ed897d6d) +![Stats](https://badgen.net/uptime-robot/response/m788498503-abfbb35c24db9355ed897d6d) + +## **Description** + +A Java Programming learning website packed with information and programs ranging from basics , arrays , string programs to 2D arrays , recursion , matrices and many more. + +## **[License](LICENSE)** + +![License](https://badgen.net/github/license/javaistic/javaistic) + +## **Sponsors** + +A special thanks to our sponsors: + +[![Powered by Vercel](.github/img/powered-by-vercel.svg)](https://vercel.com/?utm_source=javaistic&utm_campaign=oss) +[![Search by Algolia](.github/img/search-by-algolia.svg)](https://algolia.com/?utm_source=javaistic&utm_campaign=oss) diff --git a/public/img/docs/installation/atom.png b/public/img/docs/installation/atom.png new file mode 100644 index 00000000..0ac47833 Binary files /dev/null and b/public/img/docs/installation/atom.png differ diff --git a/public/img/docs/installation/bluej.png b/public/img/docs/installation/bluej.png new file mode 100644 index 00000000..7ff947aa Binary files /dev/null and b/public/img/docs/installation/bluej.png differ diff --git a/public/img/docs/installation/intellij-idea.png b/public/img/docs/installation/intellij-idea.png new file mode 100644 index 00000000..4c6b0f3b Binary files /dev/null and b/public/img/docs/installation/intellij-idea.png differ diff --git a/public/img/docs/installation/vs-code.png b/public/img/docs/installation/vs-code.png new file mode 100644 index 00000000..6c7f5a34 Binary files /dev/null and b/public/img/docs/installation/vs-code.png differ diff --git a/public/img/docs/jvm-jre-jdk/1.svg b/public/img/docs/jvm-jre-jdk/1.svg new file mode 100644 index 00000000..c18e63a9 --- /dev/null +++ b/public/img/docs/jvm-jre-jdk/1.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/img/docs/jvm-jre-jdk/2.svg b/public/img/docs/jvm-jre-jdk/2.svg new file mode 100644 index 00000000..8d16d87e --- /dev/null +++ b/public/img/docs/jvm-jre-jdk/2.svg @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/img/docs/jvm-jre-jdk/3.svg b/public/img/docs/jvm-jre-jdk/3.svg new file mode 100644 index 00000000..8c8fd4b0 --- /dev/null +++ b/public/img/docs/jvm-jre-jdk/3.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/img/docs/jvm-jre-jdk/4.svg b/public/img/docs/jvm-jre-jdk/4.svg new file mode 100644 index 00000000..05bbde33 --- /dev/null +++ b/public/img/docs/jvm-jre-jdk/4.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml index eaa2d126..b2be25d3 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -9,43 +9,53 @@ https://javaistic.vercel.app/ - 2021-07-25T23:02:47+00:00 + 2021-07-30T20:55:43+00:00 1.00 https://javaistic.vercel.app/docs - 2021-07-25T23:02:47+00:00 + 2021-07-30T20:55:43+00:00 0.80 https://javaistic.vercel.app/docs/installation - 2021-07-25T23:02:47+00:00 + 2021-07-30T20:55:43+00:00 0.80 - https://javaistic.vercel.app/docs/introduction - 2021-07-25T23:02:47+00:00 + https://javaistic.vercel.app/programs/introduction + 2021-07-30T20:55:43+00:00 0.80 - https://javaistic.vercel.app/docs/hello-world - 2021-07-25T23:02:47+00:00 + https://javaistic.vercel.app/programs + 2021-07-30T20:55:43+00:00 0.80 - https://javaistic.vercel.app/programs/introduction - 2021-07-25T23:02:47+00:00 + https://javaistic.vercel.app/brand + 2021-07-30T20:55:43+00:00 0.80 - https://javaistic.vercel.app/programs - 2021-07-25T23:02:47+00:00 - 0.80 + https://javaistic.vercel.app/docs/introduction + 2021-07-30T20:55:43+00:00 + 0.64 - https://javaistic.vercel.app/brand - 2021-07-25T23:02:47+00:00 - 0.80 + https://javaistic.vercel.app/docs/hello-world + 2021-07-30T20:55:43+00:00 + 0.64 + + + https://javaistic.vercel.app/docs/jvm-jre-jdk + 2021-07-30T20:55:43+00:00 + 0.64 + + + https://javaistic.vercel.app/docs/variables-and-literals + 2021-07-30T20:55:43+00:00 + 0.64 diff --git a/redirects.json b/redirects.json index e07f6e7f..41839d94 100644 --- a/redirects.json +++ b/redirects.json @@ -1,15 +1,13 @@ [ { "source": "/docs/what-is-javaistic", "destination": "/", "permanent": false }, - { "source": "/discord", "destination": "https://discord.gg/RkHJqvK9r8", "permanent": false }, { "source": "/forum", "destination": "https://github.com/javaistic/javaistic/discussions", "permanent": false }, - { - "source": "/docs/slug", - "destination": "/docs/slug", - "permanent": false - }, - { "source": "/community", "destination": "https://discord.gg/RkHJqvK9r8", "permanent": false } + { "source": "/docs/slug", "destination": "/docs/slug", "permanent": false }, + { "source": "/community", "destination": "https://discord.gg/RkHJqvK9r8", "permanent": false }, + { "source": "/discord", "destination": "https://discord.gg/RkHJqvK9r8", "permanent": false }, + { "source": "/status", "destination": "https://javaistic.betteruptime.com/", "permanent": false }, + { "source": "/stats", "destination": "https://javaistic.betteruptime.com/", "permanent": false } ] diff --git a/src/components/home/Footer.js b/src/components/home/Footer.js index d3c460b7..fc72c970 100644 --- a/src/components/home/Footer.js +++ b/src/components/home/Footer.js @@ -22,6 +22,7 @@ const footerNav = { { title: 'Java Docs', href: '/docs' }, { title: 'Java Programs', href: '/programs' }, { title: 'About', href: '/' }, + { title: 'Status', href: 'https://javaistic.betteruptime.com/'}, ], }, Others: { @@ -73,7 +74,7 @@ export function Footer() {
- +

Powered by diff --git a/src/lib/ga/index.js b/src/lib/ga/index.js new file mode 100644 index 00000000..a756bcba --- /dev/null +++ b/src/lib/ga/index.js @@ -0,0 +1,10 @@ +export const pageview = (url) => { + window.gtag('config', process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS, { + page_path: url, + }) + } + + // log specific events happening. + export const event = ({ action, params }) => { + window.gtag('event', action, params) + } \ No newline at end of file diff --git a/src/navs/documentation.js b/src/navs/documentation.js index c1c219cd..4755e692 100644 --- a/src/navs/documentation.js +++ b/src/navs/documentation.js @@ -8,7 +8,11 @@ const pages = createPageList( export const documentationNav = { 'Getting started': [ pages['installation'], + ], + 'Java Introduction': [ pages['introduction'], pages['hello-world'], + pages['jvm-jre-jdk'], + pages['variables-and-literals'], ], } diff --git a/src/pages/_app.js b/src/pages/_app.js index 301e9fc8..5c1bc76d 100644 --- a/src/pages/_app.js +++ b/src/pages/_app.js @@ -10,6 +10,7 @@ import Router from 'next/router' import { Fragment, useEffect, useState } from 'react' import '../css/fonts.css' import '../css/main.css' +import * as ga from '../lib/ga' if (typeof window !== 'undefined' && !('ResizeObserver' in window)) { window.ResizeObserver = ResizeObserver @@ -41,14 +42,15 @@ export default function App({ Component, pageProps, router }) { useEffect(() => { if (!navIsOpen) return - function handleRouteChange() { + function handleRouteChange(url) { setNavIsOpen(false) + ga.pageview(url) } Router.events.on('routeChangeComplete', handleRouteChange) return () => { Router.events.off('routeChangeComplete', handleRouteChange) } - }, [navIsOpen]) + }, [navIsOpen],[router.events]) const Layout = Component.layoutProps?.Layout || Fragment const layoutProps = Component.layoutProps?.Layout diff --git a/src/pages/_document.js b/src/pages/_document.js index fce97170..1ecfb8e6 100644 --- a/src/pages/_document.js +++ b/src/pages/_document.js @@ -22,6 +22,23 @@ export default class Document extends NextDocument { + {/* Global Site Tag (gtag.js) - Google Analytics */} +