Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Enhanced page links
Wrapped `<a>...</a>` tags with `<Link>...</Link>` component from Next JS
  • Loading branch information
arghyaxcodes committed Dec 11, 2021
commit 3c9981eaab734de507dbd5b7861e3cbf59b8c288
135 changes: 71 additions & 64 deletions src/components/home/Menu.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Menu, Transition } from '@headlessui/react'
import { ChevronDownIcon,MenuIcon } from '@heroicons/react/solid'
import { ChevronDownIcon, MenuIcon } from '@heroicons/react/solid'
import { Fragment } from 'react'
import Link from 'next/link'

function classNames(...classes) {
return classes.filter(Boolean).join(' ')
Expand Down Expand Up @@ -30,89 +31,95 @@ export default function MenuButton() {
<div className="py-1">
<Menu.Item>
{({ active }) => (
<a
href="/docs"
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base sm:hidden'
)}
>
Documentation
</a>
<Link href="/docs">
<a
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base sm:hidden'
)}
>
Documentation
</a>
</Link>
)}
</Menu.Item>
<Menu.Item>
{({ active }) => (
<a
href="#"
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base'
)}
>
About
</a>
<Link href="#">
<a
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base'
)}
>
About
</a>
</Link>
)}
</Menu.Item>
<Menu.Item>
{({ active }) => (
<a
href="/sponsors"
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base'
)}
>
Sponsors
</a>
<Link href="/sponsors">
<a
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base'
)}
>
Sponsors
</a>
</Link>
)}
</Menu.Item>
<Menu.Item>
{({ active }) => (
<a
href="/license"
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base'
)}
>
License
</a>
<Link href="/license">
<a
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base'
)}
>
License
</a>
</Link>
)}
</Menu.Item>
<Menu.Item>
{({ active }) => (
<a
href="/changelog"
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block w-full text-left px-4 py-2 text-base'
)}
>
Change Log
</a>
<Link href="/changelog">
<a
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block w-full text-left px-4 py-2 text-base'
)}
>
Change Log
</a>
</Link>
)}
</Menu.Item>
<Menu.Item>
{({ active }) => (
<a
href="https://github.com/javaistic/javaistic"
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base sm:hidden'
)}
>
<div className="flex">
<span className="sr-only">Javaistic on GitHub</span>
<svg className="w-6 h-6 mr-2" viewBox="0 0 16 16" fill="currentColor">
<path
fillRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
/>
</svg>
GitHub
</div>
</a>
<Link href="https://github.com/javaistic/javaistic">
<a
className={classNames(
active ? 'bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-white' : 'text-gray-700 dark:text-gray-200',
'block px-4 py-2 text-base sm:hidden'
)}
>
<div className="flex">
<span className="sr-only">Javaistic on GitHub</span>
<svg className="w-6 h-6 mr-2" viewBox="0 0 16 16" fill="currentColor">
<path
fillRule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"
/>
</svg>
GitHub
</div>
</a>
</Link>
)}
</Menu.Item>

Expand Down
21 changes: 11 additions & 10 deletions src/pages/brand.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function Brand() {
<div className="h-40 sm:h-56 xl:h-64 rounded-2xl bg-gray-200 mb-6 flex items-center justify-center p-6">
<Logo title="Headless UI" component={JavaisticLogo} />
</div>

<div className="flex flex-wrap space-y-2 sm:space-y-0 sm:space-x-4 text-center mt-4 mb-4 ">
<Link href="/">
<a className="w-full sm:w-auto flex-none bg-blue-700 hover:bg-blue-600 text-white text-lg shadow-md leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 focus:outline-none transition-colors duration-200">
Expand All @@ -57,7 +57,7 @@ export default function Brand() {
<div className="h-40 sm:h-56 xl:h-64 rounded-2xl bg-gray-900 mb-6 flex items-center justify-center p-6">
<Logo title="Headless UI" component={JavaisticAltLogo} />
</div>

<div className="flex flex-wrap space-y-2 sm:space-y-0 sm:space-x-4 text-center mt-4 mb-4 ">
<Link href="/">
<a className="w-full sm:w-auto flex-none bg-blue-700 hover:bg-blue-600 text-white text-lg shadow-md leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 focus:outline-none transition-colors duration-200">
Expand All @@ -81,7 +81,7 @@ export default function Brand() {
<div className="h-40 sm:h-56 xl:h-64 rounded-2xl bg-gray-200 mb-6 flex items-center justify-center p-6">
<Logo title="Headless UI" component={JavaisticBlackLogo} />
</div>

<div className="flex flex-wrap space-y-2 sm:space-y-0 sm:space-x-4 text-center mt-4 mb-4 ">
<Link href="/">
<a className="w-full sm:w-auto flex-none bg-blue-700 hover:bg-blue-600 text-white text-lg shadow-md leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 focus:outline-none transition-colors duration-200">
Expand All @@ -99,13 +99,14 @@ export default function Brand() {
<h2 className="text-xl text-gray-900 font-bold mb-4">
Logo White<span className="sr-only">: Javaistic White Logo</span>
</h2>
<a
href="/"
className="h-40 sm:h-56 xl:h-64 rounded-2xl bg-gray-900 mb-6 flex items-center justify-center p-6"
>
<Logo title="Headless UI" component={JavaisticWhiteLogo} />
</a>

<Link href="/">
<a
className="h-40 sm:h-56 xl:h-64 rounded-2xl bg-gray-900 mb-6 flex items-center justify-center p-6"
>
<Logo title="Headless UI" component={JavaisticWhiteLogo} />
</a>
</Link>

<div className="flex flex-wrap space-y-2 sm:space-y-0 sm:space-x-4 text-center mt-4 mb-4 ">
<Link href="/">
<a className="w-full sm:w-auto flex-none bg-blue-700 hover:bg-blue-600 text-white text-lg shadow-md leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 focus:outline-none transition-colors duration-200">
Expand Down
13 changes: 7 additions & 6 deletions src/pages/docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ export default function DocsLandingPage() {
<p className="font-medium text-rose-100 dark:text-rose-100 text-shadow mb-4">
Start coding right now or go through Java code.
</p>
<a
href="/programs"
className="mt-auto bg-rose-900 bg-opacity-50 hover:bg-opacity-75 transition-colors duration-200 rounded-lg font-semibold py-2 px-4 inline-flex"
>
Start coding
</a>
<Link href="/programs">
<a
className="mt-auto bg-rose-900 bg-opacity-50 hover:bg-opacity-75 transition-colors duration-200 rounded-lg font-semibold py-2 px-4 inline-flex"
>
Start coding
</a>
</Link>
</div>
<div className={`${styles.image} relative md:pl-6 xl:pl-8 hidden sm:block`}>
<PlayImage className="absolute top-6 left-6 md:static overflow-visible" />
Expand Down
21 changes: 14 additions & 7 deletions src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Head from 'next/head'
import NextLink from 'next/link'
import Router from 'next/router'
import ThemeChanger from '@/components/ThemeChanger'
import Image from 'next/image'

export default function Home() {
return (
Expand Down Expand Up @@ -123,20 +124,26 @@ export default function Home() {
<figure>
<blockquote>
<Paragraph className="max-w-4xl mx-auto mb-6">
Let's us learn Java by learning concepts and practicing programs.
Let&apos;s us learn Java by learning concepts and practicing programs.
<br /> <Widont>I am sure you will fall in love with Java.</Widont>
</Paragraph>
</blockquote>
<figcaption className="sm:text-xl font-medium flex flex-col items-center">
<div className="p-1 border-2 border-sky-400 rounded-full mb-3">
<img
src={require('@/img/uiuxarghya.png').default}
alt=""
className="w-10 h-10 rounded-full bg-sky-100"
<div className="p-1 border-4 border-sky-400 rounded-full mb-4 object-cover object-center w-24 h-24">
<Image
src={require('@/img/uiuxarghya.jpg').default}
alt="Creator of Javaistic"
className=" bg-sky-400 rounded-full "
width={100}
height={100}
quality={100}
layout="responsive"
blurDataURL={require('@/img/uiuxarghya.jpg').default}
placeholder="blur"
loading="lazy"
/>
</div>
<div className="text-gray-900">Arghya Ghosh</div>
<div className="text-gray-900 dark:text-white">Arghya Ghosh</div>
<div className="text-sky-600">Creator of Javaistic</div>
</figcaption>
</figure>
Expand Down