2021-03-30 22:27:36 -07:00
|
|
|
import Link from 'next/link'
|
2021-04-14 12:24:17 -07:00
|
|
|
import Image from 'next/image';
|
2021-09-03 10:13:30 -07:00
|
|
|
import { useEffect, useState, useRef } from 'react'
|
2021-04-13 19:39:58 -07:00
|
|
|
import CodeIcon from '../components/Images/CodeIcon'
|
|
|
|
import DesignIcon from '../components/Images/DesignIcon'
|
|
|
|
import GitHubIcon from '../components/Images/GitHubIcon';
|
|
|
|
import MailIcon from '../components/Images/MailIcon';
|
|
|
|
import TwitterIcon from '../components/Images/TwitterIcon';
|
2021-04-14 12:24:17 -07:00
|
|
|
import Head from 'next/head';
|
2021-03-30 22:27:36 -07:00
|
|
|
|
2021-09-03 10:13:30 -07:00
|
|
|
import Navbar from '../components/Navbar';
|
2021-09-07 10:14:50 -07:00
|
|
|
import Skills from '../components/Skills';
|
|
|
|
import Projects from '../components/Projects';
|
2021-09-03 10:13:30 -07:00
|
|
|
import useOnScreen from '../util/hooks/useOnScreen';
|
|
|
|
|
2021-10-04 16:35:20 -07:00
|
|
|
const Graphics = [
|
|
|
|
{
|
|
|
|
name: 'Personal Logo',
|
|
|
|
src: '/img/designs/NewPersonalLogo.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Old Personal Logo',
|
|
|
|
src: '/img/designs/PersonalLogo.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Demo App Icon',
|
|
|
|
src: '/img/designs/AppIcon.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Stryx Logo',
|
|
|
|
src: '/img/designs/Stryx.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Isometric Building',
|
|
|
|
src: '/img/designs/IsometricBuilding.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'AmusedGrape Icon',
|
|
|
|
src: '/img/designs/Grape.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'New Stryx Icon',
|
|
|
|
src: '/img/designs/StryxNew.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Nyxx Logo',
|
|
|
|
src: '/img/designs/Nyxx.png',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Lunar Design Logo',
|
|
|
|
src: '/img/designs/LunarDesign.png',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
|
2021-03-30 23:16:28 -07:00
|
|
|
const IndexPage = () => {
|
2021-04-14 12:24:17 -07:00
|
|
|
const [timeString, setTimeString] = useState(
|
|
|
|
(new Date().getHours() < 12 ? 'Morning' : (new Date().getHours() >= 12 && new Date().getHours() <= 17 ? 'Afternoon' : (new Date().getHours() >= 17 && new Date().getHours() <= 24 ? 'Evening' : 'Morning')))
|
|
|
|
)
|
2021-03-30 22:27:36 -07:00
|
|
|
|
2021-09-03 10:13:30 -07:00
|
|
|
const homeRef = useRef(null);
|
|
|
|
const aboutRef = useRef(null);
|
|
|
|
const graphicsRef = useRef(null);
|
|
|
|
const projectsRef = useRef(null);
|
|
|
|
const contactRef = useRef(null);
|
|
|
|
|
|
|
|
const viewingHome = useOnScreen(homeRef)
|
|
|
|
const viewingAbout = useOnScreen(aboutRef)
|
|
|
|
const viewingGraphics = useOnScreen(graphicsRef)
|
|
|
|
const viewingProjects = useOnScreen(projectsRef)
|
|
|
|
const viewingContact = useOnScreen(contactRef)
|
|
|
|
|
2021-03-30 23:16:28 -07:00
|
|
|
useEffect(() => {
|
|
|
|
const hours = new Date().getHours()
|
|
|
|
|
|
|
|
console.log(new Date())
|
|
|
|
|
|
|
|
if (hours < 12) {
|
|
|
|
setTimeString('Morning')
|
|
|
|
} else if (hours >= 12 && hours <= 17) {
|
|
|
|
setTimeString('Afternoon')
|
|
|
|
} else if (hours >= 17 && hours <= 24) {
|
|
|
|
setTimeString('Evening')
|
|
|
|
}
|
|
|
|
})
|
2021-03-30 22:27:36 -07:00
|
|
|
|
2021-04-15 11:09:36 -07:00
|
|
|
function calculateAge() {
|
|
|
|
var ageDifMs = Date.now() - new Date('July 13, 2004').getTime();
|
|
|
|
var ageDate = new Date(ageDifMs);
|
|
|
|
return Math.abs(ageDate.getUTCFullYear() - 1970);
|
|
|
|
}
|
|
|
|
|
2021-03-30 23:16:28 -07:00
|
|
|
return (
|
2021-04-13 19:39:58 -07:00
|
|
|
<>
|
2021-04-14 12:24:17 -07:00
|
|
|
<Head>
|
|
|
|
<meta name='description' content='Graphic Designer and Fullstack Developer.' />
|
|
|
|
</Head>
|
2021-09-03 10:13:30 -07:00
|
|
|
<Navbar views={[
|
|
|
|
{ view: 'Home', viewing: viewingHome },
|
|
|
|
{ view: 'About', viewing: viewingAbout },
|
|
|
|
{ view: 'Projects', viewing: viewingProjects },
|
|
|
|
{ view: 'Graphics', viewing: viewingGraphics },
|
|
|
|
{ view: 'Contact', viewing: viewingContact },
|
|
|
|
]} />
|
2021-10-04 16:35:20 -07:00
|
|
|
<header className="flex flex-col flex-wrap items-center justify-center w-full h-screen space-y-2 overflow-hidden lg:px-36" ref={homeRef}>
|
|
|
|
<div className="w-full px-3 my-3 text-center">
|
|
|
|
<h1 className="text-3xl font-extrabold text-white md:text-6xl">Good <span>{timeString}</span>! I'm <span>Jack Merrill</span>.</h1>
|
2021-04-13 19:39:58 -07:00
|
|
|
</div>
|
2021-10-04 16:35:20 -07:00
|
|
|
<div className="w-full px-3 my-3 text-center">
|
|
|
|
<h2 className="text-2xl font-bold text-white md:text-4xl">A {calculateAge()} year old Graphic and UI Designer and Fullstack Developer from the Windy City.</h2>
|
2021-04-13 19:39:58 -07:00
|
|
|
</div>
|
2021-10-04 16:35:20 -07:00
|
|
|
<div className="inline-flex flex-wrap items-center content-center justify-center w-full px-3 pt-4 my-3 space-y-4 text-center md:space-y-0 md:space-x-4">
|
2021-04-13 19:42:57 -07:00
|
|
|
<Link href="#projects">
|
2021-10-04 16:35:20 -07:00
|
|
|
<a className="w-full px-4 py-2 font-bold text-white truncate transition duration-150 border border-white hover:bg-white hover:text-black rounded-xl md:w-1/6">
|
2021-04-13 19:39:58 -07:00
|
|
|
See my Work
|
|
|
|
</a>
|
|
|
|
</Link>
|
2021-10-04 16:35:20 -07:00
|
|
|
<span className="hidden text-sm font-light text-white md:block">or</span>
|
2021-04-13 19:39:58 -07:00
|
|
|
<Link href="mailto:me@jackmerrill.com">
|
2021-10-04 16:35:20 -07:00
|
|
|
<a className="w-full px-4 py-2 font-bold text-white transition duration-150 border border-white hover:bg-white hover:text-black rounded-xl md:w-1/6">
|
2021-04-13 19:39:58 -07:00
|
|
|
Contact Me
|
|
|
|
</a>
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</header>
|
2021-09-07 10:14:50 -07:00
|
|
|
<div ref={aboutRef} id="about">
|
|
|
|
<Skills />
|
2021-04-13 19:39:58 -07:00
|
|
|
</div>
|
2021-10-04 15:13:53 -07:00
|
|
|
<div id='projects' ref={projectsRef}>
|
2021-09-07 10:14:50 -07:00
|
|
|
<Projects />
|
2021-04-13 19:39:58 -07:00
|
|
|
</div>
|
|
|
|
|
2021-10-04 16:35:20 -07:00
|
|
|
<div id='graphics' className='flex flex-wrap justify-center px-12 pt-24 space-y-3 lg:px-64' ref={graphicsRef}>
|
|
|
|
<h1 className='w-full text-3xl font-bold text-center text-white'>My Designs</h1>
|
|
|
|
<p className='w-full text-xl font-semibold text-center text-white'>Here are a few designs I've made!</p>
|
|
|
|
<div className="flex flex-wrap justify-center w-full -mx-1 overflow-hidden">
|
2021-04-13 19:39:58 -07:00
|
|
|
<div className="flex flex-wrap -mx-3 overflow-hidden">
|
2021-10-04 16:35:20 -07:00
|
|
|
{Graphics.map((gfx) => (
|
|
|
|
<div className="w-1/2 px-3 my-3 overflow-hidden md:w-1/3">
|
|
|
|
<Image alt={gfx.name} width='1080px' height='1080px' src={gfx.src} className='rounded-xl' />
|
|
|
|
</div>
|
|
|
|
))}
|
2021-04-13 19:39:58 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-09-03 10:13:30 -07:00
|
|
|
<div id='contact' className='flex flex-wrap justify-center p-12 space-y-4' ref={contactRef}>
|
2021-10-04 16:35:20 -07:00
|
|
|
<h1 className='text-3xl font-bold text-white'>Want to contact me?</h1>
|
|
|
|
<div className='flex justify-center w-full align-middle'>
|
2021-04-13 19:39:58 -07:00
|
|
|
<a
|
|
|
|
href='https://github.com/jackmerrill'
|
|
|
|
target='_blank'
|
2021-10-04 16:35:20 -07:00
|
|
|
className='flex items-center justify-center w-11/12 px-10 py-4 text-xl font-bold text-white lg:w-1/4 bg-github rounded-xl'
|
2021-04-14 12:24:17 -07:00
|
|
|
rel='noreferrer'
|
2021-04-13 19:39:58 -07:00
|
|
|
>
|
2021-10-04 16:35:20 -07:00
|
|
|
<GitHubIcon className='w-6 h-6 mr-3 text-white'/>
|
2021-04-13 19:39:58 -07:00
|
|
|
GitHub Profile
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-10-04 16:35:20 -07:00
|
|
|
<div className='flex justify-center w-full align-middle'>
|
2021-04-13 19:39:58 -07:00
|
|
|
<a
|
|
|
|
href='mailto:me@jackmerrill.com'
|
|
|
|
target='_blank'
|
2021-10-04 16:35:20 -07:00
|
|
|
className='flex items-center justify-center w-11/12 px-10 py-4 text-xl font-bold text-white bg-gray-900 lg:w-1/4 rounded-xl'
|
2021-04-14 12:24:17 -07:00
|
|
|
rel='noreferrer'
|
2021-04-13 19:39:58 -07:00
|
|
|
>
|
2021-10-04 16:35:20 -07:00
|
|
|
<MailIcon className='w-6 h-6 mr-3 text-white'/>
|
2021-04-13 19:39:58 -07:00
|
|
|
Email
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-10-04 16:35:20 -07:00
|
|
|
<div className='flex justify-center w-full align-middle'>
|
2021-04-13 19:39:58 -07:00
|
|
|
<a
|
|
|
|
href='https://twitter.com/jack__merrill'
|
|
|
|
target='_blank'
|
2021-10-04 16:35:20 -07:00
|
|
|
className='flex items-center justify-center w-11/12 px-10 py-4 text-xl font-bold text-white lg:w-1/4 bg-twitter rounded-xl'
|
2021-04-14 12:24:17 -07:00
|
|
|
rel='noreferrer'
|
2021-04-13 19:39:58 -07:00
|
|
|
>
|
2021-10-04 16:35:20 -07:00
|
|
|
<TwitterIcon className='w-6 h-6 mr-3 text-white'/>
|
2021-04-13 19:39:58 -07:00
|
|
|
Twitter
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</>
|
2021-03-30 23:16:28 -07:00
|
|
|
)
|
|
|
|
}
|
2021-03-30 22:27:36 -07:00
|
|
|
|
|
|
|
export default IndexPage
|